Bug 659604 - JBossAS5 server gets discovered and deleted after running discovery command from agent prompt
Summary: JBossAS5 server gets discovered and deleted after running discovery command f...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Agent
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
low
medium vote
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Corey Welton
URL:
Whiteboard:
Depends On:
Blocks: jon241-bugs jon30-bugs
TreeView+ depends on / blocked
 
Reported: 2010-12-03 07:08 UTC by Sudhir D
Modified: 2011-05-24 01:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-24 01:12:45 UTC


Attachments (Terms of Use)

Description Sudhir D 2010-12-03 07:08:59 UTC
Description of problem:
JBoss AS 5 Server discovery fails on the Fedora 12 box.

Version-Release number of selected component (if applicable):
jon-server-2.4.1-SNAPSHOT build# 34.

How reproducible:
Always

Steps to Reproduce:
1. Install JON Server on RHEL 5.5. Ensure that JBoss AS 5 plugins are present.
2. Install the Agent on Fedora 12.
3. Inventory the newly installed Agent on the Server Dashboard.
4. Start JBoss AS 5 where the Agent is running (Fedora 12)
5. From the agent prompt, run discovery.
  
Actual results:
JBoss AS 5 server gets discovered but it also says deleted.

Below is the PID for JBoss AS 5 server,
sdharane  9123  9036  0 11:25 pts/1    00:00:00 /bin/sh ./run.sh -b 0.0.0.0
sdharane  9148  9123  3 11:25 pts/1    00:00:51 java -Dprogram.name=run.sh -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Djava.endorsed.dirs=/home/sdharane/Downloads/JBoss/jboss-5.0.0.GA/lib/endorsed -classpath /home/sdharane/Downloads/JBoss/jboss-5.0.0.GA/bin/run.jar org.jboss.Main -b 0.0.0.0

Output of agent command prompt when discovery command is run,
> discovery
RHQAgent.RHQ Agent: Starting discovery...
RHQAgent.RHQ Agent: key=[RHQ Agent], name=[RHQ Agent], version=[3.0.1-SNAPSHOT], description=[RHQ Management Agent]
RHQAgent.RHQ Agent: Done.

Tomcat.Tomcat Server: Starting discovery...
Tomcat.Tomcat Server: Done.

Apache.Apache HTTP Server: Starting discovery...
Apache.Apache HTTP Server: Done.

JBossAS5.JBossAS Server: Starting discovery...
JBossAS5.JBossAS Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*,arg|org.jboss.Main|match=.*], name=[jbossas]], process=[process: pid=[9148], name=[/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java (deleted)], ppid=[9123]]
JBossAS5.JBossAS Server: Done.

JBossAS.JBossAS Server: Starting discovery...
JBossAS.JBossAS Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*,arg|org.jboss.Main|match=.*], name=[JBoss4]], process=[process: pid=[9148], name=[/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java (deleted)], ppid=[9123]]
JBossAS.JBossAS Server: Done.

Script.Script Server: Starting discovery...
Script.Script Server: Done.

Postgres.Postgres Server: Starting discovery...
Postgres.Postgres Server: Done.

IIS.IIS: Starting discovery...
IIS.IIS: Done.

JMX.JMX Server: Starting discovery...
JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=[8991], name=[/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java (deleted)], ppid=[8978]]
JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=[9148], name=[/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java (deleted)], ppid=[9123]]
JMX.JMX Server: Done.


The log snippet of agent.log,
agent.log:2010-12-03 11:39:22,405 INFO  [InventoryManager.discovery-1] (rhq.core.pc.inventory.AutoDiscoveryExecutor)- Process scan auto-detected new server resource: scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], discovered-process=[process: pid=[9148], name=[/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java (deleted)], ppid=[9123]]


Expected results:
JBoss AS 5 should be discovered and be available for inventory.

Comment 1 Charles Crouch 2010-12-13 22:52:06 UTC
I'm ok with this not getting fixed in 2.4.1 if the workaround is just to restart the agent. Can you test that Sudhir?

Comment 2 Heiko W. Rupp 2010-12-21 13:11:08 UTC
Sudhir,
what is the output of 'discovery --full' ? Is the AS then offered for import?
I have the impression, that pure 'discovery' without arguments is just checking for stuff, but not actually
offering to the server (never looked this up in source though).

'discovery --full' would be the equivalent of restarting here, as a restart would reset the timers for AD-runs and directly after PC initialization trigger an AD run.

Comment 3 Sunil Kondkar 2010-12-22 12:53:34 UTC
Verified on Fedora 12 box on Jon241 build#55 (build number: 10970:3cea406)

1. Installed JON Server.
2. Installed the Agent on Fedora 12.
3. Inventoried the newly installed Agent on the Server Dashboard.
4. Started JBoss AS 5 where the Agent is running (Fedora 12)
5. From the agent prompt, executed 'discovery --full'.

The JBoss AS 5 server is auto discovered successfully.
Marking this as verified.

Comment 4 David Tardon 2011-01-13 06:29:24 UTC
*** Bug 669261 has been marked as a duplicate of this bug. ***

Comment 5 Corey Welton 2011-05-24 01:12:45 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 6 Corey Welton 2011-05-24 01:12:45 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 7 Corey Welton 2011-05-24 01:13:02 UTC
Bookkeeping - closing bug - fixed in recent release.


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