Bug 652247
| Summary: | NPE in agent.log for resources to which connection cannot be established | |||
|---|---|---|---|---|
| Product: | [Other] RHQ Project | Reporter: | Sudhir D <sdharane> | |
| Component: | Configuration | Assignee: | Lukas Krejci <lkrejci> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Corey Welton <cwelton> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | low | |||
| Version: | 3.0.0 | CC: | lkrejci | |
| Target Milestone: | --- | |||
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 653527 (view as bug list) | Environment: | ||
| Last Closed: | 2011-05-24 01:11:34 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: | 616081 | |||
This is not a bug per se, because the error mentioned in the description happens during discovery that is independent of (and doesn't know about) the resources already in the inventory.
But it indeed looks a little bit confusing. I therefore changed the logging logic a bit to log this error only on the DEBUG level in case of automatic discoveries.
In the case of manual discovery, this error will still get logged at INFO so that it ends up in the agent log by default.
commit b583eee673290900afac36b15e4e9a1ed590378d
Author: Lukas Krejci <lkrejci>
Date: Mon Nov 15 17:08:24 2010 +0100
BZ 651826 - Do not log the connection failures during auto-discovery on INFO level.
Please disregard the previous comment, I edited the wrong BZ :( The first exception is actually not an NPE. The NPE is only the ultimate cause of it. The log entry and the stacktrace only inform about the failure to connect to the resource once per 10 connection attempts. The other exception on the other hand will require a code fix. commit ae99b5bc0bf42909308a9d1efc09cee77d06ffc1
Author: Lukas Krejci <lkrejci>
Date: Tue Nov 23 22:09:27 2010 +0100
a couple of robustness enhancements to the apache plugin:
BZ 656449 - use the matching algorithm between SNMP values and augeas nodes also
when matching the vhost node by resource key, because resource key
in RHQ 3 is based on the SNMP value.
BZ 652247 - Log the SNMP errors only on DEBUG level during discovery because SNMP isn't
required for it to work.
BZ 656476 - Do not fail the discovery if a non-existent directory is used in an Include directive
BZ 652247, BZ 656491 - Do not choke on invalid/unresolvable hostnames in VirtualHost or ServerName directives
Verified on jon-server-2.4.1-SNAPSHOT build# ae99b5b. I don't see the above exception. Marking this bug as verified. Bookkeeping - closing bug - fixed in recent release. Bookkeeping - closing bug - fixed in recent release. |
Description of problem: Null pointer exception is thrown in agent.log file for resources to which connection cannot be established. Version-Release number of selected component (if applicable): rhq-server-3.0.1-SNAPSHOT build# cd5a890 How reproducible: Always Steps to Reproduce: 1. Install rhq server and agent where tomcat and httpd is not correctly configured. 2. Monitor the agent.log Actual results: Null Pointer exception is thrown Expected results: NPE should not be thrown. Additional info: 010-11-11 17:27:57,143 WARN [ResourceContainer.invoker.daemon-3] (jboss.on.plugins.tomcat.TomcatServerComponent)- Could not establish connection to the Tomcat instance [11] times for resource [/root/Desktop/JON/apache-tomcat-5.5.29] org.mc4j.ems.connection.EmsConnectException: Could not connect [null] java.lang.NullPointerException at org.mc4j.ems.impl.jmx.connection.support.providers.AbstractConnectionProvider.connect(AbstractConnectionProvider.java:102) at org.jboss.on.plugins.tomcat.TomcatServerComponent.loadConnection(TomcatServerComponent.java:222) at org.jboss.on.plugins.tomcat.TomcatServerComponent.getAvailability(TomcatServerComponent.java:343) at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.NullPointerException at javax.management.remote.JMXServiceURL.<init>(JMXServiceURL.java:122) at org.mc4j.ems.impl.jmx.connection.support.providers.JMXRemotingConnectionProvider.doConnect(JMXRemotingConnectionProvider.java:76) at org.mc4j.ems.impl.jmx.connection.support.providers.AbstractConnectionProvider.connect(AbstractConnectionProvider.java:97) ... 11 more : : : : : Caused by: java.lang.NullPointerException at org.rhq.plugins.apache.ApacheVirtualHostServiceDiscoveryComponent.discoverResources(ApacheVirtualHostServiceDiscoveryComponent.java:147) at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:279) ... 5 more