Bug 736737

Summary: Tomcat availability check fails silently - no exception is logged in the log file
Product: [JBoss] JBoss Operations Network Reporter: bkramer <bkramer>
Component: Plugin -- TomcatAssignee: Charles Crouch <ccrouch>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: high    
Version: JON 2.4.1CC: hbrock, hrupp, jclere, loleary, lzoubek, spinder
Target Milestone: ---   
Target Release: JON 3.0.1   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: 4.3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 790127 (view as bug list) Environment:
Last Closed: 2013-09-11 11:00:25 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: 683054, 790127    
Attachments:
Description Flags
Proposed patch against release-3.0.1 branch none

Description bkramer 2011-09-08 14:59:32 UTC
Description of problem:

If the connection to the Tomcat server fails for any reason, we end up swallowing the entire exception and simply mark it as down. Availability check of TomcatServerComponent should not fail silently as it does at the moment.

This is due to:

org.jboss.on.plugins.tomcat.TomcatServerComponent.getAvailability() catching all exceptions and simply returning availability as DOWN:

}
catch (Exception e) {
            // If the connection is not servicing requests then close it. this seems necessary for the
            // Tomcat connection as when Tomcat does come up again it seems a new EMS connection is required,
            // otherwise we're not seeing EMS be able to pick up the new process.
            closeConnection();
            }return AvailabilityType.DOWN;
}


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

How reproducible:
Every time

Steps to Reproduce:
1. I reproduced this with Tomcat 5.0.30 
2.
3.
  
Actual results:
Tomcat is marked as DOWN but no exception is logged in the agent.log file

Expected results:
Tomcat is marked as DOWN and the agent.log file contains the appropriate exception.

Additional info:

Comment 1 Larry O'Leary 2011-09-08 22:42:59 UTC
If an exception is thrown by the connection to the Tomcat instance, we should capture this when in debug mode.

Comment 2 Larry O'Leary 2011-09-13 17:18:35 UTC
Created attachment 522968 [details]
Proposed patch against release-3.0.1 branch

Proposed log change. Although minor, still needs a code review before it can be committed anywhere.

Comment 7 Ian Springer 2012-02-14 04:01:37 UTC
This is also done in master: 

http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=1fcca6b

Comment 8 Simeon Pinder 2012-02-17 05:32:59 UTC
Moving to ON_QA for testing with JON 3.0.1.GA RC5 or better:
https://brewweb.devel.redhat.com//buildinfo?buildID=199114