0

I am trying to start jmx process trhough java ProcessBuilder in windows 2008, When I set jvmOpts.add( "-Dcom.sun.management.jmxremote.port=8999") The error message it shows is

Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: hostName : hostName

When I remove jmdremote.port The error message it throws is

Error: Exception thrown by the agent : java.rmi.server.ExportException: Listen failed on port: 0; nested exception is: 
    java.net.SocketException: Unrecognized Windows Sockets error: 10106: create

My jmx options are 
    jvmOpts.add( "-Dcom.sun.management.jmxremote")  
    jvmOpts.add( "-Dcom.sun.management.jmxremote.authenticate=false" )
    jvmOpts.add( "-Dcom.sun.management.jmxremote.ssl=false" )   
    jvmOpts.add( "-Dcom.sun.management.jmxremote.port=8999")
    jvmOpts.add( "-Djava.rmi.server.hostname=hostName")
    jvmOpts.add( "-Dcom.sun.management.jmxremote.local.only=false")

When I run the same program without using java processBuilder directly from command line it is working perfectly fine. When I execute the same progam using ProcessBuilder in Unix the program is working fine. Can any one please let me know what am I missing here. Do I need to load any windows environment variables to the ProcessBilder (As it is working fine from command line). Thanks in advance.

Neela
  • 1
  • 3
  • from the error message, the problem is with `hostName`, check this post http://stackoverflow.com/questions/834581/remote-jmx-connection – Katona Aug 08 '13 at 06:08
  • Actually jmx is starting from the command line of windows. It is not working from javaProcess Builder. I already tried all the options from that post. but still no go. thanks for your quick response. – Neela Aug 08 '13 at 07:08

0 Answers0