Results 1 to 2 of 2

Thread: RemoteConnectFailureException

  1. #1
    Join Date
    Apr 2008
    Posts
    23

    Default RemoteConnectFailureException

    I am currently experimenting with spring rmi. Sever side everything is working fine. However when I execute the client class which calls the remote service method, I get the following:

    Code:
    Exception in thread "main" org.springframework.remoting.RemoteConnectFailureException: Cannot connect to remote service [rmi://localhost:1099/CurrencyConverter]; nested exception is java.rmi.ConnectException: Connection refused to host: 81.107.98.43; nested exception is: 
    	java.net.ConnectException: Connection timed out: connect
    Caused by: java.rmi.ConnectException: Connection refused to host: 81.107.98.43; nested exception is: 
    	java.net.ConnectException: Connection timed out: connect
    	at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
    	at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
    	at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
    	at sun.rmi.server.UnicastRef.invoke(Unknown Source)
    	at org.springframework.remoting.rmi.RmiInvocationWrapper_Stub.invoke(Unknown Source)
    	at org.springframework.remoting.rmi.RmiClientInterceptor.doInvoke(RmiClientInterceptor.java:400)
    	at org.springframework.remoting.rmi.RmiClientInterceptor.doInvoke(RmiClientInterceptor.java:344)
    	at org.springframework.remoting.rmi.RmiClientInterceptor.invoke(RmiClientInterceptor.java:259)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
    	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
    	at $Proxy0.poundsToDollars(Unknown Source)
    	at client.Driver.main(Driver.java:16)
    Caused by: java.net.ConnectException: Connection timed out: connect
    	at java.net.PlainSocketImpl.socketConnect(Native Method)
    	at java.net.PlainSocketImpl.doConnect(Unknown Source)
    	at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    	at java.net.PlainSocketImpl.connect(Unknown Source)
    	at java.net.SocksSocketImpl.connect(Unknown Source)
    	at java.net.Socket.connect(Unknown Source)
    	at java.net.Socket.connect(Unknown Source)
    	at java.net.Socket.<init>(Unknown Source)
    	at java.net.Socket.<init>(Unknown Source)
    	at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
    	at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
    	... 12 more
    When I ping 81.107.98.43 (local area connection) i get request timed out. XP firewall is turned off???

  2. #2
    Join Date
    Apr 2008
    Posts
    6

    Default

    Try the following on the client machine and see if it is successful

    ftp <server ip/name> <rmi port>

    If this fails to connect then it is a network issue else it is your code issue.

    - SD

Posting Permissions

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