From owner-freebsd-java@FreeBSD.ORG Mon Oct 29 23:05:14 2007 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A578316A417 for ; Mon, 29 Oct 2007 23:05:14 +0000 (UTC) (envelope-from freebsd@spatula.net) Received: from turing.morons.org (turing.morons.org [208.96.51.42]) by mx1.freebsd.org (Postfix) with ESMTP id 95C0213C4A3 for ; Mon, 29 Oct 2007 23:05:14 +0000 (UTC) (envelope-from freebsd@spatula.net) Received: by turing.morons.org (Postfix, from userid 1001) id B3E4117036; Mon, 29 Oct 2007 16:04:39 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by turing.morons.org (Postfix) with ESMTP id 9E88617034 for ; Mon, 29 Oct 2007 16:04:39 -0700 (PDT) Date: Mon, 29 Oct 2007 16:04:39 -0700 (PDT) From: Nick Johnson X-X-Sender: spatula@turing To: freebsd-java@freebsd.org In-Reply-To: <20071028141053.G25435@turing> Message-ID: <20071029152022.H25435@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> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: more on InetAddress resolution problem... X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2007 23:05:14 -0000 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/