Re: [RMI] Connection refused error
"Vanfleet, David" <[email protected]> Wed, 20 Dec 2006 05:20:41 -0800
| Newsgroups | gmane.comp.java.sun.rmi |
|---|---|
| Message-ID | <352366D52DA72B4295106E3C65E1719103A410A8@USCYMPLM004.net.plm.eds.com> |
Thanks for your response (again), Genady Beryozkin informed me that my problem was that I was missing -Djava.rmi.server.hostname=<hostname> from the command line when starting the server. When I added this it fixed the problem. Apparently this is a Linux issue. Thanks, David -----Original Message----- From: Niclas Hedhman [mailto:[email protected]] Sent: Tuesday, December 19, 2006 8:32 PM To: [email protected] Subject: Re: [RMI] Connection refused error On Wednesday 20 December 2006 00:37, Vanfleet, David wrote: > java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested > exception is: > > java.net.ConnectException: Connection refused: connect > > >From my windows system I can get the registry object and list the names: > > Registry registry = LocateRegistry.getRegistry("orion"); Have you started the Registry on your localhost?? You can either do that with LocateRegistry.createRegistry( port ) or use the "rmid" commandline utility in the JRE/JDK. The former has the advantage of being embedded in your application, but you will need some exception handling code to deal with multiple instances of your application on the same machine racing for the TCP port(s). Cheers Niclas ======================================================================== === 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 =========================================================================== 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