Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Any known incompatabilities with InetAddress and BIND 9?... (http://www.velocityreviews.com/forums/t390687-any-known-incompatabilities-with-inetaddress-and-bind-9-a.html)

mclTunes 02-07-2007 06:24 PM

Any known incompatabilities with InetAddress and BIND 9?...
 
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.


Gordon Beaton 02-08-2007 07:14 AM

Re: Any known incompatabilities with InetAddress and BIND 9?...
 
On 7 Feb 2007 10:24:04 -0800, mclTunes wrote:
> 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

--
[ don't email me support questions or followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e

mclTunes 02-09-2007 07:16 PM

Re: Any known incompatabilities with InetAddress and BIND 9?...
 
On Feb 8, 2:14 am, Gordon Beaton <n...@for.email> wrote:
> On 7 Feb 2007 10:24:04 -0800,mclTuneswrote:
>
> > 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
>
> --
> [ don't email me support questions or followups ]
> g o r d o n + n e w s @ b a l d e r 1 3 . s e


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



All times are GMT. The time now is 07:26 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.