Re: java.rmi.ConnectException: Connection refused to host
zhang Jackie <[email protected]> Fri, 22 Jun 2007 15:02:01 +0800
| Newsgroups | gmane.comp.java.sun.rmi |
|---|---|
| Message-ID | <[email protected]> |
Sorry ,I made a mistake. In fact the rmiregistry is running on the same host as rmi serer 2007/6/22, zhang Jackie <[email protected]>: > > hi > i write a simple test program using RMI. If the rmiregistry is placed on a > host:10.5.0.57,and rmi server and client are deployed on host :10.5.0.178,then > everything is OK,but when I run the client program on a host: 10.5.0.173,the > client report exceptions as follows: > HelloClient exception: Connection refused to host: 10.5.0.173; nested > exception is: > java.net.ConnectException: Connection refused > java.rmi.ConnectException: Connection refused to host: 10.5.0.173; 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.lookup (Unknown Source) > at examples.rmisocfac.HelloClient.main(HelloClient.java:59) > 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:519) > at java.net.Socket.connect(Socket.java:469) > at java.net.Socket.<init>(Socket.java :366) > at java.net.Socket.<init>(Socket.java:179) > 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) > ... 5 more > Do everyone know why? > > =========================================================================== To unsubscribe, send email to [email protected] and include in the body of the message "signoff RMI-USERS". For general help, send email to [email protected] and include in the body of the message "help". For a list of frequently asked RMI questions please refer to: http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html To view past RMI-USERS postings, please see: http://archives.java.sun.com/archives/rmi-users.html