Bug 822299

Summary: [gui] attempting to create a child Resource when the corresponding Agent is not running results in an exception + stack trace
Product: [Other] RHQ Project Reporter: Ian Springer <ian.springer>
Component: Core UIAssignee: John Sanda <jsanda>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: high    
Version: 4.4CC: ccrouch, hrupp, jsanda
Target Milestone: ---   
Target Release: RHQ 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 828568 (view as bug list) Environment:
Last Closed: 2013-09-01 10:05:03 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 828568    

Description Ian Springer 2012-05-17 01:17:49 UTC
The exception is below. 

Instead the GUI should just return a non-alarming error informing the user the Resource cannot be created because the platform's Agent is down or unreachable. There should be no stack trace, since it's a non-exceptional state.

We should see if a similar issue exists for delete-child-Resource, manual-add/import, and pretty much all other GUI operations that require a connection to an Agent.

---

Failed to create a new resource
Severity :	
Error
	
Time :	
Wednesday, 2012 May 16 21:12:06 UTC-4
Detail :	

java.lang.RuntimeException:[1337217126168] javax.ejb.EJBException:java.lang.RuntimeException: Error while sending create resource request to agent service -> java.lang.RuntimeException:Error while sending create resource request to agent service -> org.jboss.remoting.CannotConnectException:Can not get connection to server. Problem establishing socket connection for InvokerLocator [socket://127.0.0.1:16163/?backlog=200&clientMaxPoolSize=304&enableTcpNoDelay=true&maxPoolSize=303&numAcceptThreads=1&rhq.communications.connector.rhqtype=agent&socketTimeout=60000] -> java.net.ConnectException:Connection refused
--- STACK TRACE FOLLOWS ---
[1337217126168] javax.ejb.EJBException:java.lang.RuntimeException: Error while sending create resource request to agent service -> java.lang.RuntimeException:Error while sending create resource request to agent service -> org.jboss.remoting.CannotConnectException:Can not get connection to server. Problem establishing socket connection for InvokerLocator [socket://127.0.0.1:16163/?backlog=200&clientMaxPoolSize=304&enableTcpNoDelay=true&maxPoolSize=303&numAcceptThreads=1&rhq.communications.connector.rhqtype=agent&socketTimeout=60000] -> java.net.ConnectException:Connection refused
   at Unknown.collect_0(Unknown Source)
   at Unknown.createStackTrace_0(Unknown Source)
   at Unknown.fillInStackTrace_0(Unknown Source)
   at Unknown.fillInStackTrace(Unknown Source)
   at Unknown.$fillInStackTrace(Unknown Source)
   at Unknown.$$init_38(Unknown Source)
   at Unknown.Throwable_0(Unknown Source)
   at Unknown.Exception_0(Unknown Source)
   at Unknown.RuntimeException_0(Unknown Source)
   at Unknown.instantiate_30(Unknown Source)
   at Unknown.$instantiate(Unknown Source)
   at Unknown.instantiate_77(Unknown Source)
   at Unknown.deserialize_81(Unknown Source)
   at Unknown.readObject(Unknown Source)
   at Unknown.onResponseReceived(Unknown Source)
   at Unknown.onResponseReceived_6(Unknown Source)
   at Unknown.$fireOnResponseReceived(Unknown Source)
   at Unknown.onReadyStateChange_0(Unknown Source)
   at Unknown.anonymous(Unknown Source)
   at Unknown.apply(Unknown Source)
   at Unknown.entry0(Unknown Source)
   at Unknown.anonymous(Unknown Source)
   at Unknown.anonymous(Unknown Source)

Comment 1 Ian Springer 2012-05-17 15:40:40 UTC
This issue has been reproduced with JON 3.0.1.GA as well.

Comment 3 John Sanda 2012-06-04 20:33:30 UTC
Changes have been made so that now for manual import, resource create, and resource delete, if the agent is unreachable, we log a more informative message in the UI and do not log the exception. The change has been pushed to master.

commit hash: 9c406d090c83d0e2ae265366722c591889fa1c33

Comment 4 Charles Crouch 2012-06-04 22:07:19 UTC
This is fixed in master, so setting target release appropriately.

Comment 6 Heiko W. Rupp 2013-09-01 10:05:03 UTC
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.