Bug 1117423
| Summary: | RHQ Agent Running As Root and Java App Running As Root & Connecting via Dorg.rhq.resourceKey Is Not Discovered | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Operations Network | Reporter: | Matt Mahoney <mmahoney> | ||||
| Component: | Plugin -- Other | Assignee: | Michael Burman <miburman> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Armine Hovsepyan <ahovsepy> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | JON 3.2.2 | CC: | ahovsepy, jshaughn, mfoley, miburman, mmahoney, myarboro | ||||
| Target Milestone: | ER03 | Keywords: | Triaged | ||||
| Target Release: | JON 3.3.0 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-12-11 14:03:14 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Matt Mahoney
2014-07-08 16:34:47 UTC
I can't reproduce this bug. I created a java-application with just MBeans running, ran it as root and set the following parameters for it: -Dorg.rhq.resourceKey=aegaeon -Dcom.sun.management.jmxremote.port=10190 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false Given those parameters, a root agent could find it. The issue here is most likely to the fact that we can't find anything without those com.sun.management command line parameters, as we simply ignore them. Why is described in BZ 799532. Are you running the agent with a JDK? I believe you need the JDK to access the tool.jar, which has the Java Attach API support... I agree that the reproduction attempt by Mike wasn't quite right because he enabled jmxremote, the attach API is only used if jmxremote isn't enabled. Well, I tested this with just -Dorg.rhq.resourceKey=aegaeon and no other parameters, running as root and agent running as root. It was detected correctly (and I ran through the debugger the whole process and everything seemed to check out also). Jay's assumption that tools.jar was not correctly used (JRE instead of JDK) sounds like a correct assumption. The agent does print that to the logs, so it can be checked there. Created attachment 940481 [details]
jmx_root_agent_app
verified in JON3.3 ER03, screen-shot attached |