Any known incompatabilities with InetAddress and BIND 9?...

M

mclTunes

Are there any known incompatibilities with InetAddres and BIND 9?
We're regression testing an app in Solaris 10 which uses BIND 9. The
app performs a simple DNS check by calling:

InetAddress ia = InetAddress.getByName( hostname );

followed by:

String ipAddress = ia.getHostAddress();

On the new server we can't resolve any name passed into it, although
nslookup from a shell on the same server can lookup the names without
a problem.
 
G

Gordon Beaton

On the new server we can't resolve any name passed into it, although
nslookup from a shell on the same server can lookup the names
without a problem.

This sounds like a host configuration issue.

AFAIK nslookup talks directly with your nameserver, whereas the Java
methods you mention (and ultimately gethostbyname() & friends) use
/etc/nsswitch.conf and other files on the host, which may lead to
different results unless the host is configured correctly.

/gordon
 
M

mclTunes

This sounds like a host configuration issue.

AFAIK nslookup talks directly with your nameserver, whereas the Java
methods you mention (and ultimately gethostbyname() & friends) use
/etc/nsswitch.conf and other files on the host, which may lead to
different results unless the host is configured correctly.

/gordon

Gordon,

Thank you so much! I also found this web resource which addresses
how to configure /etc/nsswitch.conf to use DNS:
http://www.faqs.org/docs/securing/chap6sec71.html

So we changed this line:

hosts: files

to read:

hosts: dns files

and now the code resolves the name. Excellent!

There appear to be performance issues right now, but we have other
things going on with that box that could account for that.

Thanks again for your contribution!
-- Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top