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.
Created attachment 573451 [details] Java program
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.
set priority per BZ triage 4/2/2012 (crocuh, loleary, mfoley, asantos)
Ian has done the attach api addition, so he knows this part best.