Bug 1117449 - Add logging to isolate -- Two platforms created for a single agent; one Java one Linux
Summary: Add logging to isolate -- Two platforms created for a single agent; one Java ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Agent
Version: JON 3.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER01
: JON 3.2.3
Assignee: Michael Burman
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 1029610
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-08 17:45 UTC by Amana
Modified: 2021-03-11 14:14 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1128210 (view as bug list)
Environment:
Last Closed: 2014-09-05 15:40:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
dupe-platform.png (30.13 KB, image/png)
2014-07-08 17:45 UTC, Amana
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1123733 0 None None None Never

Description Amana 2014-07-08 17:45:01 UTC
Created attachment 916499 [details]
dupe-platform.png

Description of problem:
See attached screenshot.

One of the servers was created with two associated platform instances.

It is not possible to monitor both resources after importing the second one discovered:

2013-11-12 17:33:19,267 INFO  [InventoryManager.discovery-1] (AutoDiscoveryExecutor)- Discovered new platform with 3 child server(s).
2013-11-12 17:33:19,267 INFO  [InventoryManager.discovery-1] (InventoryManager)- Sending [server] inventory report to Server...
2013-11-12 17:33:19,437 WARN  [InventoryManager.discovery-1] (AutoDiscoveryExecutor)- Exception caught while executing server discovery scan.
[Warning] javax.ejb.EJBTransactionRolledbackException: result returns more than one elements
        at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:138)
        at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:228)
        at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:317)
        at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:214)        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
        at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
        at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
        at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
        at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
        at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
        at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
        at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)
        at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:182)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
        at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
        at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72)
        at org.rhq.enterprise.server.discovery.DiscoveryBossLocal$$$view100.getResourceSyncInfo(Unknown Source)
        at org.rhq.enterprise.server.discovery.DiscoveryBossBean.mergeInventoryReport(DiscoveryBossBean.java:237)

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

3.2 GA

How reproducible:

Unclear. The server itself could have been under a lot of load, or some other condition during the upgrade. It seems like OS Platform resource has been imported before upgrading (in 3.1.2), and after that a new Java Platform resource has been discovered as well.

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Amana 2014-07-08 17:46:27 UTC
The work-around this problem mostly works:

1) First find the resources for the agent:

select * from rhq_resource where agent_id = 14439
order by resource_type_id 

2) The Platform resource should appear as resource type in the lower numbers, but be called 'Java' or something. Change the type ID to another type, like '10016' (file system), also set the parent resource ID. Update the row. Then go to the UI and uninventory.

Comment 6 Jay Shaughnessy 2014-08-01 19:23:33 UTC
master commit 90794dc7a122a1f519bc7f96fa2078d697a160f5
Author: Jay Shaughnessy <jshaughn>
Date:   Fri Aug 1 15:09:12 2014 -0400

    Add some logging that would have been helpful investigating this issue.

Comment 7 Rafael Pereira 2014-08-01 19:38:28 UTC
//System.out.println(System.getProperty("os.name").toLowerCase(Locale.US));
java TestProp 
linux
[root@webserver ~]# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL="

Comment 13 Jay Shaughnessy 2014-08-08 15:32:51 UTC

release/jon3.2.x commit abea2375bd42099d4e48237672a6b2e79b04398f

    Cherry-Pick Master 2a09fd40f5d0b25c5d1c3ba37c553095dc366e60



release/jon3.2.x  commit a421d25c5125c8298dca44a28cc2574fbbf2b110

    Conflicts:
        modules/core/native-system/src/main/java/org/rhq/core/system/JavaSystemInfo.java

    Cherry-Pick master 90794dc7a122a1f519bc7f96fa2078d697a160f5

Comment 14 Simeon Pinder 2014-08-15 03:19:13 UTC
Moving to ON_QA as this is available for test in JON 3.2.3 ER01 build:

http://jon01.mw.lab.eng.bos.redhat.com:8042/dist/release/jon/3.2.3.GA/8-14-14/


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