Re: [RMI] Connection refused error

Niclas Hedhman <[email protected]> Wed, 20 Dec 2006 11:31:54 +0800
Newsgroups gmane.comp.java.sun.rmi
Message-ID <[email protected]>
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