Re: NameService and getHostByName()

Darren Middleman <[email protected]>
Newsgroups gmane.comp.corba.orbacus
Organization IONA | Making Software Work Together TM
Message-ID <[email protected]>
Hi Alessandro,

> [...]
> 
> 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

Sorry for the delay in responding to you.

The Name Service, as with any CORBA server, uses Acceptors when accepting
connections.  It is during the creation of these Acceptors that the local
address is retrieved and stored for use with some internal Orbacus
functions.  Unfortunately, the particular Java call that is used to
retrieve the local address requires that the machine be configured
properly.  If not, and Java is unable to resolve the local address of the
machine, the result is what you are seeing, an UnknownHostException.

I don't think there would be anyway to pass the IP address of the machine
on the command line and have this work.  The problem here is that the JVM 
has to be able to resolve this address, since the call that is creating 
the exception is a Java InetAddress method call.  Passing the IP address 
to the Name Service would still not provide this address to the JVM.  I 
think the only way to resolve this is to ensure that you have a completely 
configured system.

Regards,
Darren

-- 
Darren Middleman
Team Orbacus - Your CORBA Source
Email: mailto:[email protected]
WWW: http://www.orbacus.com/
_______________________________________________
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.