JBoss ON apply-updates fails if RHQ_SERVER_HOME is set to an incorrect path
Environment
- Red Hat JBoss Operations Network (ON) 3.3
- Applying JBoss ON update-07 (3.3.7) to an existing JBoss ON server installation
- The environment variable
RHQ_SERVER_HOMEis set to a path different then the target JBoss ON server being updated
Issue
-
WARNING: Failed to apply jboss-cli updates, these may need to be applied manually. Continuing...
-
update.logcontains error messages indicatingRHQ_SERVER_JBOSS_HOMEis not valid:The system cannot find the path specified. ERROR RHQ_SERVER_JBOSS_HOME is not pointing to a valid AS instance Missing "C:\jon-server-3.3.0.GA-update-07\jboss-modules.jar" ERROR! RHQ_SERVER_JBOSS_HOME is not pointing to a valid AS instance Missing /tmp/jon-server-3.3.0.GA-update-07/jboss-modules.jar -
update.logcontains connection failure message for JBoss CLI updates:Failed to connect, retrying JBoss CLI updates... Unable to apply patch as [Server/cli interface] component(s) not yet running. Retrying... -
apply-updatesreports script failure:/opt/jboss/on/jon-server-3.3.0.GA/bin/rhqctl: line 109: cd: /tmp/jon-server-3.3.0.GA-update-07/jbossas: No such file or directory
Resolution
Before executing apply-update be certain that RHQ_SERVER_HOME is unset or set it to the same location as the JBoss ON server installation being updated.
- Unset
RHQ_SERVER_HOME:-
Linux:
unset RHQ_SERVER_HOME -
Windows:
set RHQ_SERVER_HOME=
-
- Set
RHQ_SERVER_HOMEto the same value being used forapply-updates:-
Linux:
export RHQ_SERVER_HOME=/opt/jboss/on/jon-server-3.3.0.GA -
Windows:
set RHQ_SERVER_HOME=C:\opt\jboss\on\jon-server-3.3.0.GA
-
Root Cause
The RHQ_SERVER_HOME environment variable is being used by the various scripts that apply-updates invokes as part of the update process. If RHQ_SERVER_HOME is set to the path of another server installation or version, it can result in unexpected and undetermined behavior.
This issue has been captured in This content is not included.Red Hat Bugzilla 1408321 and will be addressed in a future release.
Diagnostic Steps
- As the user who is running
apply-update, review the current environment to see ifRHQ_SERVER_HOMEorRHQ_SERVER_JBOSS_HOMEis set to an unexpected value. On Lunux use theenvcommand and on Windows use thesetcommand.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.