This problem came up from customer problem report: =========================================== From a newly installed JON 2.3 server, the browser will download "rhq-enterprise-agent-1.2.0.GA.jar" because the browser cached the agent jar previously installed. Please note the download URL is "http://<host>:7080/agentupdate/download" and the URL doesn't have the file name. I didn't notice that 1.2.0.GA jar was the old one when I installed it. I installed the 1.2 jar - running the rhq-agent.sh, I got the following: ----- [fminamot@localhost bin]$ ./rhq-agent.sh RHQ 1.2.0.GA [3862] (null) This version of the agent is not supported by the server - an agent update must be applied The agent update thread has started - will begin the agent auto-update now! The agent will wait for [5] threads to die Failed to start the agent org.rhq.core.clientapi.server.core.AgentNotSupportedException at org.rhq.enterprise.agent.AgentMain.waitForServer(AgentMain.java:1518) at org.rhq.enterprise.agent.AgentMain.start(AgentMain.java:619) at org.rhq.enterprise.agent.AgentMain.main(AgentMain.java:398) Downloaded the agent update binary to [/home/fminamot/jboss/rhq-enterprise-agent-1.3.0.GA.jar] Missing the envvar [RHQ_AGENT_JAVA_EXE_FILE_PATH] - will try to find a Java executable to use. Will use the Java executable [/usr/java/jdk1.6.0_16/jre/bin/java] Now executing agent update - if all goes well, this is the last you will hear of this agent: [ProcessExecution: executable=[/usr/java/jdk1.6.0_16/jre/bin/java], args=[[-jar, /home/fminamot/jboss/rhq-enterprise-agent-1.3.0.GA.jar, --pause=20000, --update=/home/fminamot/jboss/rhq-agent]], env-vars=[null], working-dir=[/home/fminamot/jboss], wait=[0], capture-output=[false], kill-on-timeout=[false], executable-is-command=[true]] ---- Proposed Solution: ==================================== RHQ server should add "no-cache" to the download response header in order to prevent caching the agent jar. We can avoid this trouble by cleaning the browser cache before installation but there is a better way to disable cache by the server side [1][2]. So I think RHQ server should add "no-cache" to the download response header in order to prevent caching the agent jar. [1] http://blog.httpwatch.com/2008/10/15/two-important-differences-between-firefox-and-ie-caching/ [2] http://onjava.com/onjava/excerpt/jebp_3/index2.html Current HTTP request/response are as follows: ----- GET /agentupdate/download HTTP/1.0 User-Agent: Wget/1.11.4 (Red Hat modified) Accept: */* Host: 10.64.193.190:7080 Connection: Keep-Alive HTTP/1.1 200 OK Server: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.2.0.CR2 (build: SVNTag=JBoss_4_2_0_CR2 date=200704160918)/Tomcat-5.5 Content-Disposition: attachment; filename=rhq-enterprise-agent-1.3.0.GA.jar Last-Modified: Thu, 17 Sep 2009 03:28:46 GMT Content-Type: application/octet-stream Content-Length: 9883586 Date: Thu, 24 Sep 2009 04:24:41 GMT Connection: keep-alive -----
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-2440
mass add of key word FutureFeature to help track
i thought I added all the different no cache headers to the response. I'll double check this.
git commit 1aacb18 I added the following response headers, which should disable caching: Cache-Control: no-cache, no-store Expires: -1 Pragma: no-cache I added this on all the download servlets - agent, CLI, bundle deployer tool and connectors.
documenting the response headers as follows (from FF Firebug) Pragma no-cache Cache-Control no-cache verified.
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.