more on InetAddress resolution problem...
Nick Johnson
freebsd at spatula.net
Mon Oct 29 16:05:14 PDT 2007
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/
More information about the freebsd-java
mailing list