Re: Rmi working only on localhost

Vinod Johnson - Sun Microsystems <[email protected]>
Newsgroups gmane.comp.java.sun.rmi
Message-ID <[email protected]>
>>>
>> Note quite sure how those '*||*' characters ended up in my mail (some
>> html to ascii rendering glitch I presume), but I meant to say
>> java  -Djava.rmi.server.hostname=192.168.10.46 example.hello.Server
>>
> Vinod,
> Not sure if this is the problem, but linux /etc/hosts sometimes has
> localhost first in the list and then the actual hostname/IP address
> second. If you try to use "getLocalHost()" [or whatever the method is
> called] then you'll get 127.0.0.1 for the hostname. Switching the
> hostname/IP entry to be first in the /etc/hosts file might help. I'm
> pretty sure this has shown up on the users list before, but I can't
> seem to search right now.
>
I'm not completely sure of all the specifics of Linux host name
resolution - as you suggest the desireable solution would be to actually
fix the host name resolution. The suggestion above was indeed merely a
workaround.

> Bob



--
- vinod

===========================================================================
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.