Results 1 to 4 of 4

Thread: Unable to make a remote JMX connection to tc server

  1. #1
    Join Date
    Oct 2009
    Posts
    7

    Default Unable to make a remote JMX connection to tc server

    Hi,

    I am trying to connect to my tc server developer edition 2.0.3 installation via jconsole/visualvm(i.e. via remote jmx), but I am unable to do so. In my server.xml of spring-instance-insight, I have the following setting :-
    Code:
     <Listener className="com.springsource.tcserver.serviceability.rmi.JmxSocketListener"
                port="${jmx.port}"
                bind="10.120.0.152"
                useSSL="false"      
                passwordFile="${catalina.base}/conf/jmxremote.password"
                accessFile="${catalina.base}/conf/jmxremote.access"    
                authenticate="false"/>
    So, I cannot connect to this server with visualvm/jconsole remotely using the connection string 10.120.0.152:6969. However, I am able to connect to the tc server if it is on my local machine. So, with the following server.xml setting:-

    Code:
     <Listener className="com.springsource.tcserver.serviceability.rmi.JmxSocketListener"
                port="${jmx.port}"
                bind="127.0.0.1"
                useSSL="false"      
                passwordFile="${catalina.base}/conf/jmxremote.password"
                accessFile="${catalina.base}/conf/jmxremote.access"    
                authenticate="false"/>
    I can connect to the tc server if the visualvm instance is on the same machine as the server and using the connection string localhost:6969.

    Since no one else has raised has raised this issue, I must be doing something silly here. Can someone please help me out with this?

    Thanks,
    Vineeth.
    Vineeth Varghese
    TenXperts Technologies

  2. #2
    Join Date
    Oct 2008
    Location
    Melbourne, Florida
    Posts
    80

    Default

    That should work without a problem.

    - Did you change the jmx.port in the catalina.properties to something other than 6969?

    - From the remote system, what is the output of "telnet 10.120.0.152 6969"?

  3. #3
    Join Date
    Oct 2009
    Posts
    7

    Default

    Yep I tried all that. If I use 127.0.0.1, things are fine but I can't remote connect.

    I noticed the following stacktrace in the catalina.out during startup:-
    Code:
    23-Nov-2010 06:54:22.979 SEVERE com.springsource.tcserver.serviceability.rmi.JmxSocketListener.init Unable to expose the remote JMX registry.
     java.io.IOException: Cannot bind to URL [rmi://vineeth-dell:6969/jmxrmi]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: vineeth-dell; nested exception is: 
    	java.net.ConnectException: Connection refused]
    	at javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:804)
    	at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:417)
    	at com.springsource.tcserver.serviceability.rmi.JmxSocketListener.init(JmxSocketListener.java:129)
    	at com.springsource.tcserver.serviceability.rmi.JmxSocketListener.lifecycleEvent(JmxSocketListener.java:76)
    	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    	at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:770)
    	at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
    	at org.apache.catalina.startup.Catalina.load(Catalina.java:548)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:597)
    	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Caused by: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: vineeth-dell; nested exception is: 
    	java.net.ConnectException: Connection refused]
    	at com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:126)
    	at com.sun.jndi.toolkit.url.GenericURLContext.bind(GenericURLContext.java:208)
    	at javax.naming.InitialContext.bind(InitialContext.java:400)
    	at javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:625)
    	at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:412)
    	... 12 more
    Caused by: java.rmi.ConnectException: Connection refused to host: vineeth-dell; 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.java:198)
    	at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
    	at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
    	at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
    	at com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:120)
    	... 16 more
    Caused by: java.net.ConnectException: Connection refused
    	at java.net.PlainSocketImpl.socketConnect(Native Method)
    	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    	at java.net.Socket.connect(Socket.java:525)
    	at java.net.Socket.connect(Socket.java:475)
    	at java.net.Socket.<init>(Socket.java:372)
    	at java.net.Socket.<init>(Socket.java:186)
    	at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
    	at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
    	at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
    	... 21 more
    
    23-Nov-2010 06:54:23.67 INFO org.apache.coyote.http11.Http11Protocol.init Initializing Coyote HTTP/1.1 on http-8080
    23-Nov-2010 06:54:23.196 INFO org.apache.catalina.core.StandardService.start Starting service Catalina
    Vineeth Varghese
    TenXperts Technologies

  4. #4

    Default

    Are you running the remote application on virtual OR a physical machine.

    I had the similar problem when I was running the application on a virtual machine.

    I could overcome the problem by using the computer name rather than the IP address but got in other issues, still looking for a clean solution.

    Thanks,
    YA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •