Re: NameService and getHostByName()

"Alessandro Villamaina" <[email protected]>
Newsgroups gmane.comp.corba.orbacus
Message-ID <[email protected]>
Hi Darren,

> After doing a bit more digging around in the code, I think the issue you
> are seeing has to do with a machine/network configuration issue.  The
> particular piece of code that is causing the COMM_FAILURE exception is a
> call to the JDKs InetAddress.getLocalHost().  This is used by the
> NameServer to obtain its local address.  In this particular case, the
> exception being thrown, an UnknownHostException, is raised when an IP
> address for the host can't be found.
> 
> I did a bit of research on this particular method call and found that in
> most cases, this exception is raised on machines that are not registered
> with a DNS.  In fact, when I disconnected my machine from the network (and
> in the process preventing access to the DNS), I was able to duplicate the 
> exact error that you are seeing.  
> 
> My best advice would be to make sure your machine is registered with the
> DNS on your network.  It may also be possible to set a static IP address
> on your machine, but I have not been able to try this and verify whether or
> not this works.
> 
> Regards,
> Darren

That's exactly my problem. The fact is that the network I have to work on
does not have a DNS, all machines connect to other by specifying numeric
IP addresses only. These machines all have a static IP address.

The question is: why does NameService try to get the IP address of the machine it
is running on by its hostname? Is it possible to specify the (static) numeric IP address
of the machine on the command line? Please note that (if possible) I would try to
avoid specifying the hostname - IP address correspondence in /etc/hosts.

Regards,
Alessandro

_______________________________________________
OB-Users Mailing List - [email protected]
http://mail.ooc.nf.ca/mailman/listinfo/ob-users
Visit our support FAQ before you send a message.
http://www.orbacus.com/faq/support.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.