Bug 1395293 - JON Agent can't detect JBossAS7 if launched with jsvc
Summary: JON Agent can't detect JBossAS7 if launched with jsvc
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 7
Version: JON 3.3.2
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ER01
: One-off release
Assignee: Michael Burman
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 1393276
Blocks: 1327633
TreeView+ depends on / blocked
 
Reported: 2016-11-15 16:05 UTC by Filip Brychta
Modified: 2019-12-16 07:23 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1393274
Environment:
Last Closed: 2017-07-13 15:17:14 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1393274 0 high CLOSED JON Agent can't detect JBossAS7 if launched with jsvc 2021-02-22 00:41:40 UTC
Red Hat Knowledge Base (Solution) 2754491 0 None None None 2016-11-15 16:05:26 UTC

Internal Links: 1393274

Description Filip Brychta 2016-11-15 16:05:26 UTC
+++ This bug was initially created as a clone of Bug #1393274 +++

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:15:46 UTC
Fixed in the master:

commit 430ab6406669c627a1cbb306a67fb890dff358ee
Author: Michael Burman <miburman>
Date:   Tue Mar 7 13:14:29 2017 +0200

    [BZ 1395293] Only check the program parameters for AS-specific strings, ignore the starting program (java or not)


Note You need to log in before you can comment on or make changes to this bug.