Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
mclTunes - 07 Feb 2007 18:24 GMT
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 - 08 Feb 2007 07:14 GMT
> 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

Signature

[ 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 - 09 Feb 2007 19:16 GMT
> > 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
[quoted text clipped - 12 lines]
> [ 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.