java -jar rhq-enterprise-agent-3.0.0.Beta1.jar --install=C:\opt
to install the 3.0.0.Beta1 Agent. There was already an Agent installed on the box in C:\opt\rhq-agent, but I'm not sure whether it was running or not.
I just remembered that the Agent start bat file will use RHQ_AGENT_HOME, rather than its parent dir, as the Agent dir, if that env var is set. I checked the env vars in my current command window and sure enough the following vars were set:
RHQ_AGENT_JAVA_OPTS=-Xms64m -Xmx128m -Djava.net.preferIPv4Stack=true
C:\opt\rhq-agent-OLD is where the 1.2.0.GA Agent is installed, which explains the "RHQ 1.2.0.GA  (Mon Apr 27 16:55:22 EDT 2009)" printed when the Agent starts up (even though I'm starting it from C:\opt\rhq-agent which is a 3.0.0.Beta1 install). I didn't set these variables myself, so I'm guessing either the upgrade/install process or the start bat file set them and not from within a SETLOCAL/ENDLOCAL block, so they got updated in the enclosing command window. I would check carefully that anywhere you set RHQ_AGENT_* env vars is enclosed in SETLOCAL/ENDLOCAL.
My Agent updater/installer logs are attached.
Created attachment 421996 [details]
agent update log (contains multiple install/update runs)
Created attachment 421997 [details]
not sure if this has any relevance, but attaching just in case (it was in the /opt dir, which was what I passed as the arg to --install)
Ian, can you confirm the commands you ran. The only way for the "-OLD" directories to be created was if you did a "--upgrade". So, I think somewhere along the line, you did an --upgrade. Do you know for sure if you did?
I also think this might have something to do with the errors in the log about not being able to delete files. I suspect another command window (or some other process) had a current working directory of the C:\opt\rhq-agent (or subdirectory) and thus had it locked (i.e. windows won't be able to delete it). This looks to cause the install/update to encounter an error and try to roll back the install.
I just saw one thing that may explain this.
If you --install the 1.2 agent in C:\opt, then you --install (NOT update) the 3.0 agent in the same C:\opt, this is bad and you will get overlapping agents (e.g. I see both rhq-core-enterprise-agent.jars from both 1.2 and 3.0 - which is bad and makes it look like the agent you are running is still the 1.2 version becaues that jar is picked up first).
You must not --install twice in the same directory - if you already have an agent installed in C:\opt, you can "overlay" an agent in the same location, but you must use the --update.
(I still haven't been able to replicate the environment variables getting set in my console.)
I'm on Windows XP.
unassigning and lowering severity. I've not been able to reproduce this. Should get someone else to attempt to reproduce to see if its really a problem or not.