Bug 595727

Summary: Upgrade JON 2.3 to JON 2.4 gives error in server log - UndeclaredThrowableException
Product: [Other] RHQ Project Reporter: Rajan Timaniya <rtimaniy>
Component: Core ServerAssignee: Heiko W. Rupp <hrupp>
Status: CLOSED WONTFIX QA Contact: Corey Welton <cwelton>
Severity: medium Docs Contact:
Priority: low    
Version: 3.0.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-25 16:10:12 UTC Type: ---
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: 565628    
Attachments:
Description Flags
server log none

Description Rajan Timaniya 2010-05-25 13:24:40 UTC
Created attachment 416407 [details]
server log

Description of problem:
Upgrade JON 2.3 to JON 2.4 (JON build #166) with Postgres 8.4 gives exception
(UndeclaredThrowableException) in server log file.

2010-05-25 16:21:51,969 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/jboss-remoting-servlet-invoker].[ServerInvokerServlet]] Servlet.service() for servlet ServerInvokerServlet threw exception
java.lang.reflect.UndeclaredThrowableException
	at $Proxy433.processRequest(Unknown Source)
	at org.jboss.remoting.transport.servlet.web.ServerInvokerServlet.processRequest(ServerInvokerServlet.java:128)
	at org.jboss.remoting.transport.servlet.web.ServerInvokerServlet.doPost(ServerInvokerServlet.java:157)
	...
Caused by: javax.management.InstanceNotFoundException: jboss.remoting:service=invoker,transport=servlet is not registered.
	at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:523)


Version-Release number of selected component (if applicable):
JON build #166 - Revision:  10620
http://hudson-qe.rhq.rdu.redhat.com:8080/job/jon/166/

How reproducible:
Always

Steps to Reproduce:
1) Install JON 2.3 with Postgres 8.4
2) Install one more JON 2.3 server with same database  (High Availability)
3) Install/configure 3 rhq-agests
4) Perform operations on JON 2.3
 (i) Create alerts for platform, JBoss AS4, RHQ Agent, Compatible group (alert
condition is Free Memory > 0.1 OR Total Memory < 999999)
 (ii) Create groups (Mix, Compatible, Group defination)
 (iii)Content repository syncronization (for JBoss Patch)
 (iv) Create Roles and Users
 (v) Change INVENTORY -> CONNECTION of JBoss AS4 
 (vi)Change configuration values of 'RHQ Agent' and create 'History'
 (vii)Perform LDAP settings
 (viii)Create 'SCHEDULES' for 'View Process List' on platform
5) Upgrade JON 2.3 to JON 2.4 (JON build #166) - Complete installation process
6) Log-in JON 2.4 (JON build #166)
7) Check server log for any database error/exception
  
Actual results:
Upgrade JON 2.3 to JON 2.4 with Postgres 8.4 gives error/exception
(UndeclaredThrowableException) in server log file.

Expected results:
Upgrade JON 2.3 to JON 2.4 should upgrade with all its data without any
error/exception.

Additional info:
Please refer attached server log.

Comment 1 Heiko W. Rupp 2010-05-25 15:36:12 UTC
Rajan,
did you stop the agents before step 5?

Comment 2 Heiko W. Rupp 2010-05-25 15:41:40 UTC
See my previous comment - it looks like the agents try to talk to the server "too early" the error messages
vanish as soon as this line is reached:

2010-05-25 16:25:57,714 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/]] initializer: Starting the server-agent communications services

Comment 3 Charles Crouch 2010-05-25 15:52:10 UTC
(10:42:04 AM) pilhuhn: ccrouch: https://bugzilla.redhat.com/show_bug.cgi?id=595727 looks like a pilot error
(10:43:15 AM) ccrouch: pilhuhn: ok great, though i think there is still a bug here right?
(10:43:40 AM) ccrouch: i.e. we shouldn't let the agents connect until we're ready to receive them
(10:44:26 AM) pilhuhn: one could perhaps start the agent-comm service somewhat earlier. The underlying issue is that Tomcat sees the foo.war and directly offers this as available to clients
(10:44:40 AM) ccrouch: with agent autoupgrade there is no requirement to shutdown all agents prior to upgrading the server right?
(10:44:47 AM) pilhuhn: and tomcat is starteed very early
(10:44:58 AM) ccrouch: right, so that is something we could look at addressing in the future
(10:47:38 AM) pilhuhn: I don't think that you need to shut them down.Actually one of the agents connects initially as 1.3.0 and later re-connects as 3.0.0 version
(10:48:04 AM) pilhuhn: So yes there is room for future improvement, ccrouch 
(10:48:33 AM) ccrouch: ok, i think this is acceptable for right now
(10:48:40 AM) ccrouch: i'll lower the priority
(10:49:06 AM) pilhuhn: I'll write a FR
(10:50:18 AM) ccrouch: pilhuhn: ok great, can you close this one out and link it to your new one

Comment 4 Charles Crouch 2010-05-25 16:10:12 UTC
We've added  https://bugzilla.redhat.com/show_bug.cgi?id=595792 for a feature request to try to prevent these messages in the future.