JBoss ON apply-updates fails if RHQ_SERVER_HOME is set to an incorrect path

Solution Unverified - Updated

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_HOME is 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.log contains error messages indicating RHQ_SERVER_JBOSS_HOME is 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.log contains 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-updates reports 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_HOME to the same value being used for apply-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 if RHQ_SERVER_HOME or RHQ_SERVER_JBOSS_HOME is set to an unexpected value. On Lunux use the env command and on Windows use the set command.
SBR
Category

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.