Sounds like you're exporting an RMI URL with //localhost (127.0.0.1) from
one machine.  If you're constructing the RMI URL by invoking the InetAddress
getLocalHost() method, that may be returning the loop-back interface
address.  I thought this problem was solved with the latest JDK, but
you can work around it, by changing the order in which the IP addresses
are defined in /etc/hosts (move your eth0 name/IP address first).

Alexander

On Thu, Mar 16, 2000 at 04:15:45PM -0500, David Marshall wrote:
> [EMAIL PROTECTED] wrote:
> 
> > I have been attempting to get an RMI Client and Server to run using
> > 2 Linux boxes running Red Had 6.1 (one dual boots 95).  The Client
> > and Server are "textbook" examples.
> >
> > I have run them succesuffly on Win95, WinNT and Solaris
> > networks. When I run both on the same linux machine, it works.  In
> > addition,  when I run the Server on the Win95 box and the Client on
> > the Linux box the program works but when the Server is on the Linux box I
> > get the same error message that I get when the client is on one linux box
> > and the server is on another:
> >
> > java.rmi.ConnectException: Connection refused to host: 127.0.0.1;
> > nested exception is: java.net.ConnectException: Connection 
> > refused.net.ConnectException: Connection refused at
> 
> > My questions are
> > 1) Has anyone EVER gotten RMI to work properly between multiple
> > linux machines?  If my analysis is correct, it should never work.
> 
> RMI on Linux works fine.
> 
> >
> > 2)Is there something I could do on the Server side to get it to return the
> > correct address 192.168.0.2 to the client?
> 
> I suspect you don't have an RMIRegistry on Linux - I can produce an identical
> stack trace by running an RMI client app and pointing it at an RMI Registry
> that isn't running.
> 
> Choose one of your Linux boxes to act as your RMIRegistry and then start the
> registry in the background via:
> 
>     rmiregistry &
> 
> Also make sure that your server's bind() call and client's lookup() call are
> pointing at the same registry ('rmi://registryHostName/yourObjectBoundName' if
> your using URL style.)


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to