Hello Hello
I am using MxBeans for a small uitiliy in my application and also have a small client program of my own which will connect to the jmx port of my applicaition and invoke the operation on the MxBean. This all was working fine. However I am facing one small issue now and need some help to fix it. (I am not a very n/w and RMI person).
With same client which was working all this time, I am now facing connection refused exception. I really don't understand why it is behaving like this now. Below is the exception excerpt....
------------------------------------------------------------------------------------------------------------------------
Exception in
thread "main" java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.2; nested exception is:
java.net.ConnectException: Connection refused]
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:338)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
at com.example.Client.main(Client.java:59)
Caused by: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.2; nested exception is:
java.net.ConnectException: Connection refused]
at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:101)
at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1886)
at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1856)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:257)
... 2 more
Caused by: java.rmi.ConnectException: Connection refused to host: 127.0.0.2; nested exception is:
java.net.ConnectException: Connection refused
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.j
--------------------------------------------------------------------------------------------------------------------
I am running the program on a linux m/c running OPEN Suse linux.
Need help, where do I need to find the problem.
Thanks
Mehul