Description of problem: It is impossible to find out the failures during getAvailability() of the apache server from the log files. Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. do not configure SNMP in the apache server 2. enter an invalid URL to the connection properties of the apache server resource Actual results: The availability goes down but there is no mention about the cause of that fact even on the debug level. Expected results: the availability goes down and the logs reveal the cause for that fact at least on the debug level. Additional info:
Created attachment 489220 [details] Patch diff to add debug and warning logging for IOException and SSLException Proposed patch which adds missing logging to availability check for ApacheServerComponent and ApacheVirtualHostServiceComponent. Any connection time IOException gets logged at debug level. Any connection time SSLException gets logged at warn level. This way, any certificate errors or invalid SSL communications (non SSL end-point, expired certificate, invalid certificate host, non trusted certificate, etc) can be seen as warnings instead of requiring debug level logging to see these types of configuration issues.
see if we can fix or at minimum document the workarounds somewhere
(In reply to comment #2) > see if we can fix or at minimum document the workarounds somewhere Now sure what this refers to. The fix is attached. There are no workarounds. If the connection to the HTTP URL provided by the Apache plug-in configuration fail, it happens completely silently. The only way to workaround the issue would be to install a network packet sniffer between the agent and the Apache instance and even then, that may not help if SSL is in use.
> Now sure what this refers to. (sorry, this was a quick bulk change while doing triage.) dev should look at the attached patch and incorporate as necessary
Incorporated patch along changes for bug 690430.
Incorporated patch along with changes for bug 690430.
Forgot to mention commit hash in previous comment. commit: 4dce488060dcf08592daad2571560b16ba20241c
Verified on build#137 (Version: 4.1.0-SNAPSHOT Build Number: 7377e26) Followed the steps and verified that the the availability of Apache resource goes down and the server log displays below at the debug level. 2011-06-15 18:15:14,681 DEBUG [org.rhq.enterprise.communications.command.client.ClientRemotePojoFactory] {ClientRemotePojoFactory.execution-failure}Failed to execute remote POJO method [updatePluginConfiguration]. Cause: org.rhq.core.clientapi.agent.discovery.InvalidPluginConfigurationClientException:Unable to connect to managed resource of type [Apache HTTP Server] using the specified connection properties. Failed to start component for resource Resource[id=10012, type=Apache HTTP Server, key=/etc/httpd||/etc/httpd/conf/httpd.conf, name=suniltest.usersys.redhat.com:80, parent=suniltest, version=2.2.3]. -> org.rhq.core.util.exception.WrappedRemotingException:Value of 'url' connection property ('testtest') is not a valid URL. Marking as verified.
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.