DNS issue in Java - Need help

Danny Mayer mayer at gis.net
Wed Jun 2 22:46:38 UTC 2004


At 07:51 AM 6/2/2004, David Botham wrote:
>bind-users-bounce at isc.org wrote on 05/28/2004 10:04:29 AM:
> > hi
> >  We are having our network built on DNS server.let us assume DNS entry
> > for one of the PC is removed where the application (server) is
> > running.Im trying to connect the client from another PC(windows) by
> > giving ip address(say http://192.x.y.z:9090),the client hangs and the
> > process is very very slow.I want to know whether "providing the DNS
> > entry of the server PC (where application is running) in DNS server"
> > is the only possible solution??
> >  My application is based on Java.When the same kind of application
> > built in C is connected i dont see any issue connecting from windows
> > PC.Is this a known issue in Java?? When i calculated the time taken
> > for the foll process,in windows it takes around 4 sec,but in linux it
> > takes around 40 ms only.
> >   "InetAddress.getByName(ipaddress)).getHostName()"
>
>I am not a hardcore programmer, however, that call looks an awful lot like
>a "reverse" lookup.  In other words, if there is no PTR RR for "ipaddress"
>in the domain name space, you will experience a timeout delay while the
>resolver tries to find the PTR RR.

It's more likely that the code doesn't recognize that 192.x.y.z is already 
an IP
address and doesn't require a lookup. It's probably trying to find an A record
for the IP address and that won't exist. How long it takes for a system's
resolver to resolve a nonexistant address takes an indeterminant amount of
time dependant on the machine's local resolver and cache (DNS Client on
Windows), the nameserver's cache and resolver (the nameserver listed in
resolv.conf on Unix, in the registry on Windows), the search list that may be
used to try to find the address and a horde of other factors.

Danny


>hth,
>
>
>Dave...



More information about the bind-users mailing list