• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

JMX cannot get connected, Maybe due wrong stub???

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I know that JMX connections issues are kind of common, however my problem is a bit more complex.

My JMX client gets binded to the remote JMX server, I can see this trace taken with tcpdump:
10.0.0.1 10.0.0.2 RMI JRMI, Version: 2, StreamProtocol

When the client invokes a object, it looks like this:
10.0.0.1 10.0.0.2 RMI JRMI, Call

The remote server responses:
10.0.0.1 10.0.0.2 RMI JRMI, ReturnData
Java Serialization
PV^PV-E?@@I
3H|^N.
npTQwSI*'jsr.javax.management.remote.rmi.RMIServerImpl_Stubpxrjava.rmi.server.RemoteStubepxrjava.rmi.server.RemoteObjectaa3pxpw2
UnicastRef127.0.0.1nW _SI*'x

So, we can see that the communication is established, but the JMX client throws this exception:
java.net.ConnectException: Connection refused
java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
java.net.ConnectException: Connection refused
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)


So, it seems the server answers, but IMO seems like the stub it returns is wrong, it has 127.0.0.1, Why is not responding the remote server address?
or
Maybe the server responses with the right stub, an stub that the client should allocate locally, but then the client cannot invoke the local stub in 127.0.0.1.

The client runs with this vm options (a Tomcat hosted webapp):
-server
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.port=13197


These are the server's vmoptions (another Tomcat hosted webapp):
-server
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.port=13199


Any ideas?
Thanks in advanced.





 
Robert Garrido
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
solution:

-Djava.rmi.server.hostname=
 
reply
    Bookmark Topic Watch Topic
  • New Topic