Bug 807828

Summary: JMX Plugin - Unable to attach to jsvc.exec process; command line not available
Product: [Other] RHQ Project Reporter: Elias Ross <genman>
Component: PluginsAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: medium    
Version: 4.3CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
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 Flags
Java program none

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.