Bug 807828 - JMX Plugin - Unable to attach to jsvc.exec process; command line not available
Summary: JMX Plugin - Unable to attach to jsvc.exec process; command line not available
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 4.3
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-28 20:29 UTC by Elias Ross
Modified: 2022-03-31 04:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)
Java program (2.29 KB, text/plain)
2012-03-28 20:33 UTC, Elias Ross
no flags Details

Description Elias Ross 2012-03-28 20:29:27 UTC
Description of problem:

Processes started with 'jsvc.exec' (Java Daemon loader, http://commons.apache.org/daemon/jsvc.html) do not provide command line information.

Thus org.rhq.plugins.jmx.util.ConnectionProviderFactory fails to connect to these processes. For example, run the attached program where jsvc.exec runs...

$ java -cp /usr/java/jdk1.6.0_17/lib/tools.jar:. Test
14489 14489 cl[Test] true null
32349 32349 cl[] true service:jmx:rmi://127.0.0.1/stub/rO0ABXNyAC5qYXZheC5tYW5hZ2VtZW50LnJlbW90ZS5ybWkuUk1JU2VydmVySW1wbF9TdHViAAAAAAAAAAICAAB4cgAaamF2YS5ybWkuc2VydmVyLlJlbW90ZVN0dWLp/tzJi+FlGgIAAHhyABxqYXZhLnJtaS5zZXJ2ZXIuUmVtb3RlT2JqZWN002G0kQxhMx4DAAB4cHc4AAtVbmljYXN0UmVmMgAADTE3LjE3Mi4yMC4xMjEAAJTQl9zFCeR+jBjhkE/RAAABNlpkrjOAAQB4

The specific issue is:

import sun.jvmstat.monitor.MonitoredVmUtil;

s = MonitoredVmUtil.commandLine(monitoredvm);

returns an empty string. It appears that there is an empty string for 'java.rt.vmArgs' as well.


Version-Release number of selected component (if applicable):

RHQ JMX plugin 4.4.0-SNAPSHOT


Additional info:

Bug was created at jsvc site: https://issues.apache.org/jira/browse/DAEMON-248
Work-around is to avoid the attach API for these processes.

Comment 1 Elias Ross 2012-03-28 20:33:03 UTC
Created attachment 573451 [details]
Java program

Comment 2 Elias Ross 2012-03-28 21:15:42 UTC
Basically, the bug is a request. I need another way to attach to these processes.

It might be that command line matching is done using Sigar.

I may or may not develop a fix for this.

Comment 3 Mike Foley 2012-04-02 16:00:09 UTC
set priority per BZ triage 4/2/2012 (crocuh, loleary, mfoley, asantos)

Comment 4 Heiko W. Rupp 2012-06-06 16:19:14 UTC
Ian has done the attach api addition, so he knows this part best.


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