Bug 1393274

Summary: JON Agent can't detect JBossAS7 if launched with jsvc
Product: [JBoss] JBoss Operations Network Reporter: bkramer <bkramer>
Component: Plugin -- JBoss EAP 6Assignee: Michael Burman <miburman>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: high    
Version: JON 3.3.2CC: fbrychta, loleary, miburman, spinder
Target Milestone: ER01Keywords: Triaged
Target Release: One-off release   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1395293 (view as bug list) Environment:
Last Closed: 2017-07-13 15:17:50 UTC 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: 1393276    
Bug Blocks: 1327633    

Description bkramer 2016-11-09 09:07:19 UTC
Description of problem:

JON 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 JBoss ON. 



Version-Release number of selected component (if applicable):
JBoss ON 3.3.2

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 ( https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Operations_Network/3.3/html/Users_Guide/importing-resources-manually.html) of the EAP instance started with jsvc will work fine.

Comment 1 Michael Burman 2017-03-07 11:17:33 UTC
Fixed in the master:

commit 308fe067d1e25ee01e06d78dc77c2dcb8e0a426d
Author: Michael Burman <miburman>
Date:   Tue Mar 7 13:17:09 2017 +0200

    [BZ 1393274] Ignore the process name when scanning for AS processes