Bug 557558

Summary: Starting the agent w/ only RHQ_AGENT_JAVA_HOME set does not work
Product: [Other] RHQ Project Reporter: wes hayutin <whayutin>
Component: AgentAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Rajan Timaniya <rtimaniy>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.3.1CC: cwelton, mazz, rtimaniy
Target Milestone: ---Keywords: SubBug
Target Release: ---   
Hardware: All   
OS: Linux   
URL: na
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-02 07:24:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 565628, 593121    

Description wes hayutin 2010-01-21 19:47:51 UTC
Description of problem:

Starting a jon2.3 rhq 1.3 agent w/ only RHQ_AGENT_JAVA_HOME set to the jdk path does not work

get an error:
[root@10-16-120-123 bin]# ./rhq-agent.sh 
There is no JVM available.
[root@10-16-120-123 bin]# 

after setting RHQ_AGENT_JAVA_EXE_FILE_PATH the agent will now start.

Basically the language in the error should be changed to:

Please set RHQ_AGENT_JAVA_EXE_FILE_PATH appropriately.

Comment 1 wes hayutin 2010-02-16 16:57:40 UTC
Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs.

new = Tracking + FutureFeature + SubBug

Comment 2 wes hayutin 2010-02-16 17:02:34 UTC
making sure we're not missing any bugs in rhq_triage

Comment 3 Charles Crouch 2010-05-25 20:15:46 UTC
So the workaround is:

"after setting RHQ_AGENT_JAVA_EXE_FILE_PATH the agent will now start."

But I really think the bug is get it so that you only need to set RHQ_AGENT_JAVA_HOME to have the agent work.

Comment 4 John Mazzitelli 2010-05-25 20:25:57 UTC
This is working for me:

$ env | grep JAVA_HOME
$ ./rhq-agent.sh --nostart
RHQ 3.0.0-SNAPSHOT [2413b00] (Mon May 24 15:37:10 GMT-05:00 2010)
> quit
Agent no longer accepting input at prompt.
Shutting down...
The agent will wait for [0] threads to die
Shutdown complete - agent will now exit.

When you try this again, export the RHQ_AGENT_DEBUG variable, setting it to true ("export RHQ_AGENT_DEBUG=true"). When you start rhq-agent.sh, it will dump alot of debug messages to stdout, including variables it uses to start (like RHQ_AGENT_JAVA_HOME) and the command line it tries when attempting to start the agent. This might help debug your problem. I don't think its a bug, I think it is probably a problem in the user environment.

Comment 5 Rajan Timaniya 2010-09-14 09:12:40 UTC
Verified on JON 2.4 GA

1) Installed JON Server
2) On agent box only set 'RHQ_AGENT_JAVA_HOME' (make sure that there is neither set 'RHQ_AGENT_JAVA_EXE_FILE_PATH' nor 'JAVA_HOME')
3) Install RHQ-Agent 

RHQ-Agent successfully installed with environment variable 'RHQ_AGENT_JAVA_HOME'.

[root@rajanlaptop bin]# export RHQ_AGENT_DEBUG=true
[root@rajanlaptop bin]# export RHQ_AGENT_JAVA_HOME=/usr/java/jdk1.6.0_18
[root@rajanlaptop bin]# ./rhq-agent.sh -s
rhq-agent.sh: Loading environment script: /NotBackedUp/install/jon2.4/rhq-agent/bin/rhq-agent-env.sh
rhq-agent.sh: RHQ_AGENT_HOME: /NotBackedUp/install/jon2.4/rhq-agent
rhq-agent.sh: RHQ_AGENT_JAVA_HOME: /usr/java/jdk1.6.0_18
rhq-agent.sh: RHQ_AGENT_JAVA_EXE_FILE_PATH: /usr/java/jdk1.6.0_18/bin/java
rhq-agent.sh: CLASSPATH entry: /NotBackedUp/install/jon2.4/rhq-agent/lib/commons-httpclient-2.0.2.jar
rhq-agent.sh: CLASSPATH entry: /NotBackedUp/install/jon2.4/rhq-agent/lib/commons-logging-1.1.0.jboss.jar
rhq-agent.sh: CLASSPATH entry: /NotBackedUp/install/jon2.4/rhq-agent/lib/concurrent-1.3.4-jboss-update1.jar
rhq-agent.sh: CLASSPATH entry: /NotBackedUp/install/jon2.4/rhq-agent/lib/dom4j-1.6.jar
rhq-agent.sh: CLASSPATH entry: /NotBackedUp/install/jon2.4/rhq-agent/lib/getopt-1.0.13.jar
rhq-agent.sh: CLASSPATH entry: /NotBackedUp/install/jon2.4/rhq-agent/lib/i18nlog-1.0.10.jar
rhq-agent.sh: CLASSPATH entry: /NotBackedUp/install/jon2.4/rhq-agent/lib/jboss-common-1.2.1.GA.jar

Comment 6 Heiko W. Rupp 2013-09-02 07:24:50 UTC
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.