5 Replies Latest reply on Mar 14, 2005 9:48 PM by jieshengz

    rmi:Connection refused to host

    gumreal Newbie

      I have EJBs on my jboss server. On remote I run a client program.
      But there is a ConnectException when the client calls some method.
      Looking up JNDI has succeed because the output showing this.
      Thanks for your help!

      Here are the result:

      after context.lookup("ejb/RoleAgent"), objref is ejb/RoleAgentHome
      after context.lookup("ejb/UserAgent"), objref is ejb/UserAgentHome
      after context.lookup("ejb/ProjectAgent"), projectHome is ejb/ProjectAgentHome
      java.rmi.ConnectException: Connection refused to host: xxx.xx.xx.xx; nested exception is:
      java.net.ConnectException: Connection timed out: connect
      at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
      at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
      at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invokeHome(Unknown Source)
      at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invokeHome(HomeProxy.java:258)
      at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:182)
      at $Proxy2.create(Unknown Source)
      at test.JNDITester.main(JNDITester.java:49)
      Caused by: java.net.ConnectException: Connection timed out: connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
      at java.net.Socket.connect(Socket.java:426)
      at java.net.Socket.connect(Socket.java:376)
      at java.net.Socket.(Socket.java:291)
      at java.net.Socket.(Socket.java:119)
      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:562)
      ... 8 more