Bug 564514
Summary: | NPE in Agent when scanning JVM with password-protected JMX | ||||||
---|---|---|---|---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Ondřej Žižka <ozizka> | ||||
Component: | Plugins | Assignee: | Stefan Negrea <snegrea> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 1.3 | CC: | cwelton, mazz, snegrea | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2013-09-02 07:25:32 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, 565628, 567481 | ||||||
Attachments: |
|
Description
Ondřej Žižka
2010-02-12 22:45:17 UTC
Created attachment 390602 [details]
Agent log.
I've removed " of Tomcat 5" from the bug's title. Perhaps it's not Tomcat-related, but I found it when testing EWS. Tomcat 5.5.28 from EWS 1.0.1 CR1 RHEL x64, download here: http://download.devel.redhat.com/devel/candidates/JBEWS/1.0.1_CR1/RHEL5/ Note that other Tomcat sub-nodes are OK; and JVM monitoring works with unprotected JMX. Temporarily adding the keyword "SubBug" so we can be sure we have accounted for all the bugs. keyword: new = Tracking + FutureFeature + SubBug making sure we're not missing any bugs in rhq_triage mazz, jshaughn - any thoughts? looks like an NPE in the jmx plugin: Caused by: java.lang.NullPointerException at org.rhq.plugins.jmx.MBeanResourceComponent.loadBean(MBeanResourceComponent.java:183) and this might be something jay s fixed a while ago. i don't have the bz handy, but there was an issue where the EMS bean cache was invalid and I think caused an NPE. In other words, this might be fixed alreaedy. Needs to be reproduced to see if it is still a problem. In particular the following information would be helpful: a) Were the jmxremote settings enabled in Tomcat prior to it being initially discovered or added as part of enabling security? b) Is this a problem if Tomcat 5 is secured before its discovered. Still happens. Actually I reported this as a new JIRA, but not BZ. https://issues.jboss.org/browse/JBQA-4380 Summary: 1) Have a secured Tomcat 2) *Don't* set principal and credentials in Connection tab 3) discovery [-f] To answer Charles' questions: a) No, jmx were disabled when initially discovered. b) Not tried yet. Will try. To clarify, the sequence was: 1) Instalation with EWS default - no JMX 2) Inventorized 3) Enabled JMX without security 4) discovery -f 5) Secured JMX 6) discovery -f => NPE 7) set credentials in Connection tab => OK The errors reported above are displayed only in the logs, they are not visible to the users. The users will sees the resources without correct credentials as Down until the correct credentials are provided. Updated the JMX plugin code to gracefully handle the case when the ems connection is null due to missing JMX credentials. Also, updated mod_cluster plugin code that had a similar loadBean method implementation. When retesting this issue, the null pointer exception is replaced by an Ems exception. This new exception is normal since the resource requires authentication but no credentials have been provided yet by the user. The exception is visible only in the agent logs; in UI the resource is down until the user provides a correct set of username/password. Here is a snippet from the new exception: org.mc4j.ems.connection.EmsConnectException: Could not connect [service:jmx:rmi:///jndi/rmi://localhost:12345/jmxrmi] java.lang.SecurityException: Authentication failed! Username or password is null Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago. |