From owner-freebsd-java@FreeBSD.ORG Sat Nov 12 00:40:10 2005 Return-Path: X-Original-To: freebsd-java@freebsd.org Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D1ECB16A41F; Sat, 12 Nov 2005 00:40:10 +0000 (GMT) (envelope-from sean@mcneil.com) Received: from mail.mcneil.com (mcneil.com [24.199.45.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id 684BE43D5C; Sat, 12 Nov 2005 00:40:07 +0000 (GMT) (envelope-from sean@mcneil.com) Received: from localhost (localhost.mcneil.com [127.0.0.1]) by mail.mcneil.com (Postfix) with ESMTP id D20FFF24DC; Fri, 11 Nov 2005 16:40:06 -0800 (PST) Received: from mail.mcneil.com ([127.0.0.1]) by localhost (triton.mcneil.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00818-08; Fri, 11 Nov 2005 16:40:06 -0800 (PST) Received: from mcneil.com (mcneil.com [24.199.45.54]) by mail.mcneil.com (Postfix) with ESMTP id ED837F2453; Fri, 11 Nov 2005 16:40:05 -0800 (PST) From: Sean McNeil To: Richard Schilling In-Reply-To: <43753947.3040108@rsmba.biz> References: <43753947.3040108@rsmba.biz> Content-Type: text/plain Date: Fri, 11 Nov 2005 16:40:05 -0800 Message-Id: <1131756005.6959.12.camel@triton.mcneil.com> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at mcneil.com Cc: freebsd-amd64@freebsd.org, freebsd-java@freebsd.org Subject: Re: BindAddress exception error (was BindAddress error with jdk1.5 and Tomcat and Resin) 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: Sat, 12 Nov 2005 00:40:11 -0000 On Fri, 2005-11-11 at 16:37 -0800, Richard Schilling wrote: > I'm narrowing down a problem with BindAddress on jdk1.5, FreeBSD RELENG_6 . > > uname -a output: > FreeBSD newbox.cognitiongroup.biz 6.0-STABLE FreeBSD 6.0-STABLE #3: Fri > Nov 4 23:36:56 PST 2005 > rschilling@cognitiongroup.biz:/usr/obj/usr/src/sys/PRODUCTION amd64 > > Here's the error: > > $ java TestServer localhost 8080 > Host Address=localhost > Port =8080 > Exception in thread "main" java.net.BindException: Can't assign > requested address > at java.net.PlainSocketImpl.socketBind(Native Method) > at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359) > at java.net.ServerSocket.bind(ServerSocket.java:319) > at java.net.ServerSocket.bind(ServerSocket.java:277) > at TestServer.main(TestServer.java:15) What does netstat -a | grep 8080 show you? Have you tried starting it with java.net.preferIPv4Stack=true set? Cheers, Sean