Bug 736737 - Tomcat availability check fails silently - no exception is logged in the log file
Summary: Tomcat availability check fails silently - no exception is logged in the log ...
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- Tomcat
Version: JON 2.4.1
Hardware: All
OS: All
Target Milestone: ---
: JON 3.0.1
Assignee: Charles Crouch
QA Contact: Mike Foley
Depends On:
Blocks: ews1.0.2 790127
TreeView+ depends on / blocked
Reported: 2011-09-08 14:59 UTC by bkramer
Modified: 2018-11-14 10:40 UTC (History)
6 users (show)

Doc Type: Bug Fix
Doc Text:
Clone Of:
: 790127 (view as bug list)
Last Closed: 2013-09-11 11:00:25 UTC
Type: ---

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

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.
            }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 
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: 


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:

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