Bug 598610

Summary: operations fail on an inventoried tomcat6 server
Product: [Other] RHQ Project Reporter: John Sefler <jsefler>
Component: PluginsAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED DUPLICATE QA Contact: Corey Welton <cwelton>
Severity: medium Docs Contact:
Priority: low    
Version: 3.0.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-22 15:17:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 562434    

Description John Sefler 2010-06-01 17:49:09 UTC
Description of problem:
After successful inventory of a tomcat6 resource, attempts to run the Shutdown operation fail.

Server Identifier: Apache Tomcat/6.0.18


Version-Release number of selected component (if applicable):
 RHQ
version: 3.0.0-SNAPSHOT
build number: 11e04e1 

How reproducible:


Steps to Reproduce:
1. Open inventoried resource Tomcat (8080)
2. click Operations > New > Shutdown > SCHEDULE
  
Actual results:
Failure

The agent.log contains:

2010-06-01 13:37:51,088 WARN  [ResourceDiscoveryComponent.invoker.daemon-24] (jboss.on.plugins.tomcat.TomcatDiscoveryComponent)- Failed to determine Tomcat Server Version Given:
VersionInfo:/root/JBossEWS100/jboss-ews-1.0/tomcat6/bin/catalina.sh: line 362: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/bin/java: No such file or directory

catalinaHome: /root/JBossEWS100/jboss-ews-1.0/tomcat6
Script:/root/JBossEWS100/jboss-ews-1.0/tomcat6/bin/version.sh
timeout=10000


My environment vars are:
[root@rlx-0-04 bin]# env | grep HOME
CATALINA_HOME=/root/JBossEWS100/jboss-ews-1.0/tomcat6
JAVA_HOME=/usr/lib/jvm/jre-openjdk/


I can successfully run version.sh from the command line:

[root@rlx-0-04 bin]# ./version.sh 
Using CATALINA_BASE:   /root/JBossEWS100/jboss-ews-1.0/tomcat6
Using CATALINA_HOME:   /root/JBossEWS100/jboss-ews-1.0/tomcat6
Using CATALINA_TMPDIR: /root/JBossEWS100/jboss-ews-1.0/tomcat6/temp
Using JRE_HOME:       /usr/lib/jvm/jre-openjdk/
Server version: Apache Tomcat/6.0.18
Server built:   Mar 25 2009 04:09:44
Server number:  6.0.18.0
OS Name:        Linux
OS Version:     2.6.18-128.el5
Architecture:   i386
JVM Version:    1.6.0-b09
JVM Vendor:     Sun Microsystems Inc.


Line 362 of catalina.sh is:
    359 elif [ "$1" = "version" ] ; then
    360 
    361     $_RUNJAVA   \
    362       -classpath "$CATALINA_HOME/lib/catalina.jar" \
    363       org.apache.catalina.util.ServerInfo





[root@rlx-0-04 bin]# ls -l /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0
total 8
drwxr-xr-x 4 root root 4096 Sep  9  2009 jre

[root@rlx-0-04 bin]# echo $JAVA_HOME
/usr/lib/jvm/jre-openjdk/
[root@rlx-0-04 bin]# ls $JAVA_HOME
bin  lib




I'm not sure where the bad path /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/bin/java is coming from.



Additional info:

Comment 1 John Sefler 2010-06-22 15:17:05 UTC

*** This bug has been marked as a duplicate of bug 604444 ***