Created attachment 1119192 [details] summary Description of problem: Remote agent auto upgrade failed when sslsocket encryption(only) enabled. Upgrade test performed from JON 3.3.0 GA to JON 3.3.5 CR01. Local agent upgraded successfully. But remote agent failed to upgrade from agent.log(remote agent): ----------------------------- 2016-01-28 09:55:54,572 FATAL [RHQ Agent Update Thread] (org.rhq.enterprise.agent.AgentUpdateThread)- {PromptCommand.update.download-failed}Failed to download the agent update binary. Cause: Unexpected end of file from server Version-Release number of selected component (if applicable): JON 3.3.5 CR01 Version : 3.3.0.GA Update 05 Build Number : 4242930:1c9f74b GWT Version : 2.5.0 SmartGWT Version : 3.0p How reproducible: always Steps to Reproduce: 1. Enable sslscoket encryption only mode on server and agent in the version JON 3.3.0 GA. Follow https://bugzilla.redhat.com/show_bug.cgi?id=1302322 2. Upgrade Server to JON 3.3.5 CR01 version(local agent will be upgraded along with server upgrade) 3. Remote agent will upgraded once server comes up. In this setup remote agent failed to upgrade and throws error mentioned above. 4. Restarted agent manually. say upgrading/done but often seeing the message "(org.rhq.enterprise.agent.AgentShutdownHook)- {AgentShutdownHook.wait}The agent will wait for [9] threads to die", after certain timeout agent get shutdown by "(org.rhq.enterprise.agent.AgentShutdownHook)- {AgentShutdownHook.no-more-wait}[8] threads are not dying - agent will not wait anymore" Actual results: remote agent auto upgrade not successful when sslsocket encryption(only) enabled. Expected results: remote auto upgrade should happen successfully. Additional info: Server and agent log files are attached
Created attachment 1119193 [details] complete report
After checking the code and getting info on it, turns out that when using sslsocket you need to set these properties on the agent configuration: rhq.agent.agent-update.version-url - The agent-update servlet's url for the version. rhq.agent.agent-update.download-url - The agent-update servlet's url for the download. By default the URL is http(s)://ip_or_host:port/agentupdate/version and http(s)://ip_or_host:port/agentupdate/download e.g. in agent-configuration.xml ... <entry key="rhq.agent.agent-update.version-url" value="https://10.0.1.11:7443/agentupdate/version"/> <entry key="rhq.agent.agent-update.download-url" value="https://10.0.1.11:7443/agentupdate/download"/> ... Note: on step 1.g of https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Operations_Network/3.3/html/Admin_and_Config/configuring-ssl.html If you are using sslsocket, the secure port has to be different than the sslsocket port. Exit the agent and restart it, using the --cleanconfig option to load the new configuration. agentRoot/rhq-agent/bin/rhq-agent.sh --cleanconfig
commit e182c36d81289d0c96cdafcfff6ead66df93cea5 Merge: 1d73d1e 7daa7fd Author: Michael Burman <yak> Date: Sat Jun 11 11:16:12 2016 +0300 Merge pull request #256 from josejulio/bugs/1302800 Bug 1302800 - Remote agent auto upgrade failed when sslsocket encrypt… commit 7daa7fd320b32127fabc21fe2d596d4df708390c Author: Josejulio Martínez <jmartine> Date: Mon May 23 12:56:06 2016 -0500 Bug 1302800 - Remote agent auto upgrade failed when sslsocket encryption enabled Added new server service to send the public agent update endpoint address.
Moving to ON_QA as available to test with the following build: https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=502442 Note: jon-server-patch-3.3.0.GA.zip maps to JON 3.3.6(jon-server-3.3.0.GA-update-06.zip)
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHEA-2017-0285.html