Bug 1393276

Summary: RHQ Agent can't detect JBossAS7 if launched with jsvc
Product: [Other] RHQ Project Reporter: bkramer <bkramer>
Component: PluginsAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.12CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1393274, 1395293    

Description bkramer 2016-11-09 09:10:08 UTC
Description of problem:

RHQ Agent can't detect JBossAS7 if launched with jsvc. The process info query:

********************************************************
<process-scan name="StandaloneAS" query="process|basename|match=^java.*,arg|org.jboss.as.standalone|match=.*"/>
********************************************************

will look for all processes whose executable file has "java" at the start of it and whose command lines have any argument named "org.jboss.as.standalone".

So, the command lines for EAP instance started using ./standalone.sh will look like: 


jboss     7981 13.3  4.7 3964640 381308 pts/0  Sl+  13:46   0:06 /opt/test/Java/jdk1.8.0/bin/java -D[Standalone] -server -XX:+UseCompressedOops -verbose:gc -Xloggc:/opt/test/jboss-eap-6.4/standalone/log/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.modules.policy-permissions=true -Dorg.jboss.boot.log.file=/opt/test/jboss-eap-6.4/standalone/log/boot.log -Dlogging.configuration=file:/opt/test/jboss-eap-6.4/standalone/configuration/logging.properties -jar /opt/test/jboss-eap-6.4/jboss-modules.jar -mp /opt/test/jboss-eap-6.4/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/opt/test/jboss-eap-6.4 -Djboss.server.base.dir=/opt/test/jboss-eap-6.4/standalone

and it will be properly discovered. At the same time, the command line for the EAP instance started using jsvc will look like:

jboss     8315  8.0  2.7 4709812 217780 ?      Sl   13:54   0:06 jsvc.exec -home /opt/test/Java/jdk1.8.0 -outfile /dev/null -errfile /dev/null -pidfile /opt/test/jboss-eap-6.4/standalone-node1/jsvc.pid -user jboss -D[Standalone] -XX:+UseCompressedOops -Djgroups.bind_addr=10.11.12.13 -Djboss.default.multicast.address=x.x.x.x -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/test/jboss-eap-6.4/standalone-node1/log -XX:ErrorFile=/opt/test/jboss-eap-6.4/standalone-node1/log/hs_err_pid%p.log -Djava.awt.headless=false -Duser.language=en -Dfile.encoding=UTF8 -Djboss.server.name=test.server.name -Djboss.server.base.dir=../standalone-node1 -Djboss.bind.address=0.0.0.0 -Djboss.socket.binding.port-offset=10000 -Djboss.mod_cluster.proxyList=10.11.12.13:16666 -Dbv.jboss.enable_pooling=true -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/opt/test/jboss-eap-6.4/standalone-node1/log/server.log -Dlogging.configuration=file:/opt/test/jboss-eap-6.4/standalone-node1/configuration/logging.properties -Djboss.modules.policy-permissions -cp /opt/test/jboss-eap-6.4/jboss-modules.jar:/opt/test/jboss-eap-6.4/modules/system/layers/base/native/sbin/commons-daemon.jar -Djboss.home.dir=/opt/test/jboss-eap-6.4 -Djboss.server.base.dir=/opt/test/jboss-eap-6.4/standalone-node1 @org.jboss.modules.Main -start-method main -mp /opt/test/jboss-eap-6.4/modules:/opt/test/jboss-eap-6.4/shared-conf -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone

and it will not be auto-discovered in RHQ. 



Version-Release number of selected component (if applicable):
RHQ 4.12

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:
EAP instance is not discovered.

Expected results:
EAP instance is properly discovered.

Additional info:
Manual inventory of the EAP instance started with jsvc will work fine.