6.7. Manually Upgrading the JBoss ON Agent
To ensure compatibility with the JBoss ON server, each agent must be upgraded to the same version of JBoss ON as the server.
Agents have the ability to auto-update themselves. So, under most conditions, it isn't necessary to manually upgrade agents. However, if the auto-update fails for some reason or you disabled agent auto-update, then the agent can be upgraded manually.
Note
All agents must be upgraded at the same time. Having agents of different versions is not supported.
- Shut down the JBoss ON agent.
- Windows only.. If the agent is running as a Windows service, uninstall the Windows service:
cd old-agent-install-dir/bin ./rhq-agent-wrapper.bat remove
- Upgrade the JBoss ON server, as in Chapter 4, Upgrading JBoss ON Servers and Storage Nodes. The JBoss ON server must be upgraded before any agents are upgraded.
- Restart the upgraded JBoss ON servers if they are not yet started.
- Download the agent update binary from the server.
- Copy the agent update binary JAR file into the parent directory where the agent is installed. For example:
cp agent-update-binary.jar /opt/rhq/rhq-agent
- Extract the new JBoss ON agent from the agent update binary by running the following command:
java -jar agent-update-binary.jar --update=agent_installation_directory
This will tell the agent update binary to extract the JBoss ON agent distribution and update the current agent that is found inrhq-agent
subdirectory. At this point, the upgraded JBoss ON agent is located in the originalrhq-agent
directory. The old agent has been backed up to therhq-agent-old
directory. Any upgrade errors are written to the agent's log files. - Finally, start the JBoss ON agent.