Bug 729329

Summary: if RHQ server is down, UI shows globally uncaught exception
Product: [Other] RHQ Project Reporter: Mike Foley <mfoley>
Component: Core UIAssignee: Jay Shaughnessy <jshaughn>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: low Docs Contact:
Priority: high    
Version: 4.1CC: hrupp, jshaughn, mazz
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: 4.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-07 19:29:51 UTC Type: ---
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: 730796    

Description Mike Foley 2011-08-09 14:25:28 UTC
Description of problem: if RHQ server is down, UI shows globally uncaught exception


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


How reproducible:
100%

Steps to Reproduce:
1.
2.
3.
  
Actual results:
globally uncaught exception.

Expected results:
caught exceptions, meaningful and informative error messages for negative tests.

Additional info:
Message :	
Globally uncaught exception
Severity :	
Error
	
Time :	
Tuesday, August 9, 2011 10:21:34 AM Etc/GMT+4
Detail :	
com.google.gwt.core.client.JavaScriptException:(NS_ERROR_NOT_AVAILABLE): Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.statusText] QueryInterface: function QueryInterface() { [native code] } result: 2147746065 filename: http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/CD68A0FA5B670B2762438075E8E6B4A7.cache.html lineNumber: 156880 columnNumber: 0 inner: null data: null initialize: function initialize() { [native code] }
--- STACK TRACE FOLLOWS ---
(NS_ERROR_NOT_AVAILABLE): Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.statusText] QueryInterface: function QueryInterface() { [native code] } result: 2147746065 filename: http://localhost:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/CD68A0FA5B670B2762438075E8E6B4A7.cache.html lineNumber: 156880 columnNumber: 0 inner: null data: null initialize: function initialize() { [native code] }

Comment 1 Jay Shaughnessy 2011-08-23 13:44:18 UTC
I don't think the severity here is medium, resetting to low, as the server
is rarely down and if it is the UI is not usable anyway.  

To solve this we need to figure out at the RPC level when we can't send to
the server and perhaps generate a better exception like 'Server
Unreachable'.

Comment 2 Jay Shaughnessy 2011-08-24 01:40:50 UTC
Raising the priority because although this is unusual, it is annoying and 
the user is left wondering what is going on.

Turned out to be a bit of a pain to track down, and actually has browser 
specific behavior due to an oddity in Firefox.

Test Note: can try this by

1) start server

2) connect a browser session

   note - test all supported browser types

3) log in and go to global dashboard

4) stop server

5) either wait for auto refresh or force a portlet refresh

Ensure a proper message is displayed, indicating the server is probably down.


master commit 101f9542e726a2a3b68fa74f83422110d4be5f61
Catch certain http response codes and use them to inform the user that
the server is not reachable. For Firefox, handle the fact that even
trying to read the response code causes a javascript exception.

Comment 3 Mike Foley 2012-02-07 19:29:51 UTC
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE

Comment 4 Mike Foley 2012-02-07 19:30:23 UTC
marking VERIFIED BZs to CLOSED/CURRENTRELEASE