0

I am trying to connect JMC to my remote server.

Added the following flags to the the JVM:

-Dcom.sun.management.jmxremote.port=7000 
-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.jmxremote.ssl=false

Opened port 7000 in my firewall, but everytime I try to connect from JMC, I get the following error:

Could not connect to Prod : Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: java.io.EOFException]

Can't seem to get this working, I have tried to add another flag:

-Dcom.sun.management.jmxremote.rmi.port=7000

But it did not help.

Any help will be appreciated..

Ran
  • 1,089
  • 1
  • 12
  • 30

1 Answers1

1

The flags seem to be correct. Probably the issue is related to firewall. Have you tried without the firewall? If it still doesn't work, you can try the following:

-Dcom.sun.management.jmxremote.autodiscovery=true

and the connection will show up automatically in JMC, if you are on the same network.

Arnab Biswas
  • 4,495
  • 3
  • 42
  • 60
Kire Haglin
  • 6,569
  • 22
  • 27
  • Have tried without the firewall with no success. Regarding auto discovery, unfortunately I am not on the same network at all so I am not sure this can work.. – Ran Dec 17 '15 at 20:14