Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Oct 2007 16:04:39 -0700 (PDT)
From:      Nick Johnson <freebsd@spatula.net>
To:        freebsd-java@freebsd.org
Subject:   more on InetAddress resolution problem...
Message-ID:  <20071029152022.H25435@turing>
In-Reply-To: <20071028141053.G25435@turing>
References:  <20071023195511.GA27666@misty.eyesbeyond.com> <20071023170536.H25435@turing> <20071024210348.GA34044@misty.eyesbeyond.com> <20071026205754.15950c80@tinca> <20071026121159.A25435@turing> <20071026134734.M25435@turing> <20071026162351.B25435@turing> <20071028130627.A25435@turing> <20071028141053.G25435@turing>

next in thread | previous in thread | raw e-mail | index | archive | help
Another piece of interesting information, maybe...

This only happens after Tomcat has been running for a few hours, and it 
isn't that it is negative caching bad domains; rather, I have confirmed 
that InetAddress doesn't even make an initial attempt to resolve a name.  
It just starts refusing to resolve ANY name at all.

It happens regardless of whether Tomcat is running with its native 
libraries.

I ran a ktrace on the java process, and when it comes time to do the name 
resolution, it's repeatedly making NAMI requests for 
/etc/nsswitch.conf, /etc/services; reading /etc/services each time 
(apparently looking up the "domain" service, because it stops reading 
shortly after that), then it reads /etc/hosts.

Then it opens a socket, immediately closes it, twice, and then throws an 
exception.

Here's that part, starting immediately after /etc/hosts is read (from fd 
1413):

 31013 jsvc     CALL  read(0x585,0x82da000,0x1000)
 31013 jsvc     GIO   fd 1413 read 0 bytes
       ""
 31013 jsvc     RET   read 0
 31013 jsvc     CALL  close(0x585)
 31013 jsvc     RET   close 0
 31013 jsvc     CALL  kqueue
 31013 jsvc     RET   kqueue 1413/0x585
 31013 jsvc     CALL  socket(0x2,0x2,0)
 31013 jsvc     RET   socket 1414/0x586
 31013 jsvc     CALL  close(0x586)
 31013 jsvc     RET   close 0
 31013 jsvc     CALL  close(0x585)
 31013 jsvc     RET   close 0
 31013 jsvc     CALL  kqueue
 31013 jsvc     RET   kqueue 1413/0x585
 31013 jsvc     CALL  socket(0x2,0x2,0)
 31013 jsvc     RET   socket 1414/0x586
 31013 jsvc     CALL  close(0x586)
 31013 jsvc     RET   close 0
 31013 jsvc     CALL  close(0x585)
 31013 jsvc     RET   close 0
 31013 jsvc     CALL  socket(0x2,0x1,0)
 31013 jsvc     RET   socket 1413/0x585
 31013 jsvc     CALL  write(0x1,0xb175a80c,0x157e)
 31013 jsvc     GIO   fd 1 wrote 4096 bytes
(exception printed here)

One thing I notice is that these FD numbers seem -really- high, but there 
aren't any errors in response to these syscalls either.

   Nick

-- 
"Courage isn't just a matter of not being frightened, you know. It's being
 afraid and doing what you have to do anyway."
   Doctor Who - Planet of the Daleks
This message has been brought to you by Nick Johnson 2.3b1 and the number 6.
http://healerNick.com/       http://morons.org/        http://spatula.net/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071029152022.H25435>