Bug 736737 - Tomcat availability check fails silently - no exception is logged in the log file
Tomcat availability check fails silently - no exception is logged in the log ...
Status: CLOSED CURRENTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- Tomcat (Show other bugs)
JON 2.4.1
All All
high Severity medium
: ---
: JON 3.0.1
Assigned To: Charles Crouch
Mike Foley
:
Depends On:
Blocks: ews1.0.2 790127
  Show dependency treegraph
 
Reported: 2011-09-08 10:59 EDT by bkramer
Modified: 2015-02-01 18:27 EST (History)
6 users (show)

See Also:
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 07:00:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Proposed patch against release-3.0.1 branch (1.83 KB, patch)
2011-09-13 13:18 EDT, Larry O'Leary
no flags Details | Diff

  None (edit)
Description bkramer 2011-09-08 10:59:32 EDT
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 18:42:59 EDT
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 13:18:35 EDT
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-13 23:01:37 EST
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 00:32:59 EST
Moving to ON_QA for testing with JON 3.0.1.GA RC5 or better:
https://brewweb.devel.redhat.com//buildinfo?buildID=199114

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