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, On Thu, Dec 02, 2004 at 03:51:02PM +0000, Alessandro Villamaina wrote: > Hi Darren, > thank you for your answer. > > Unfortunately nothing changes removing the '='. > The only way to solve my problem is to add the IP > address of the machine in /etc/hosts (I would like to > avoid to do this). > > It seems the NameServer always tries to resolve the > hostname to get the address, no matter what parameters > you specify on the command line. > > Any ideas? > > Cheers, > Alessandro > 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 -- 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