From owner-freebsd-java@FreeBSD.ORG Thu Aug 28 13:47:21 2008 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 C721C1065679 for ; Thu, 28 Aug 2008 13:47:21 +0000 (UTC) (envelope-from freebsd-java@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 54CD78FC3C for ; Thu, 28 Aug 2008 13:47:20 +0000 (UTC) (envelope-from freebsd-java@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KYhqG-0002mE-1L for freebsd-java@freebsd.org; Thu, 28 Aug 2008 13:47:16 +0000 Received: from 81.210.229.80 ([81.210.229.80]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 Aug 2008 13:47:16 +0000 Received: from saper by 81.210.229.80 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 Aug 2008 13:47:16 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-java@freebsd.org From: Marcin Cieslak Date: Thu, 28 Aug 2008 15:46:52 +0200 Lines: 75 Message-ID: <48B6AC4C.1050006@system.pl> References: <48B29CB7.9010907@cs.vu.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enigE3D3E56794DDD250093FC2FA" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 81.210.229.80 User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8.1.16) Gecko/20080721 MultiZilla/1.8.3.4e SeaMonkey/1.1.11 In-Reply-To: <48B29CB7.9010907@cs.vu.nl> X-Enigmail-Version: 0.95.6 Sender: news Subject: Re: FreeBSD Java, IPv6, and DNS SRV query type 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: Thu, 28 Aug 2008 13:47:21 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE3D3E56794DDD250093FC2FA Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: quoted-printable Benno Overeinder wrote: > Hi, >=20 > Sometimes you just want it all: Java, IPv6, *and* DNS SRV query type > requests. Well, why? We run an Openfire Jabber/XMPP server and want t= o > run this service with IPv6 support. >=20 > So what is the situation. With the Diablo Caffe/Latte package, IPv6 > support is not enabled. (I don't know why, maybe someone can shed a > light on this?) >=20 > To get Java with IPv6 support, we installed jdk15 (and later jdk16) > using ports (java/jdk15 and java/jdk16). During installation process w= e > enabled IPv6 in the configuration. >=20 > All set and go, and IPv6 worked with our Java programs, including the > Openfire server. >=20 > However, DNS SRV _xmpp-server._tcp.domain.name resolution fails with th= e > ports java/jdk16 build. (Consequently, only Jabber servers that are > running on hosts known by their DNS domain name are found.) For > example, contacts with a Google Talk account are not found. I don't know what's wrong with your code (it gives me the same results)=20 but I tried a small jython program: import java from javax.naming import Context from javax.naming.directory import InitialDirContext env =3D java.util.Hashtable() env.put(Context.INITIAL_CONTEXT_FACTORY,=20 "com.sun.jndi.dns.DnsContextFactory") ictx =3D InitialDirContext(env) print ictx.getAttributes("_xmpp-server._tcp.google.com", ["SRV"]) the result: {srv=3DSRV: 20 0 5269 xmpp-server3.l.google.com., 20 0 5269=20 xmpp-server4.l.google.com., 5 0 5269 xmpp-server.l.google.com., 20 0=20 5269 xmpp-server1.l.google.com., 20 0 5269 xmpp-server2.l.google.com.} The funny part begins when I enter IPv6 DNS server address (I run one on my LAN) in /etc/resolv.conf (say, "2001:DB8::1"). But this = is a known bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=3D5042453 --Marcin --------------enigE3D3E56794DDD250093FC2FA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQCVAwUBSLasTz2W2v2wY27ZAQNZ+gP9Hw+vaV+13StIfpFeOeHMHAoOBBn3g0AL vCt9rWKehz9s/16ZwqrOzHc3wN63oO1955Vnl+30t3KhxeYtSV0GVPQ17CEzHBXj wrghK+9AAKAUQ6zzUtBAXPlBpkqagHgh6+GLLwnQ5uHazeeUvu5taPeYAMDs6VOM jnlWDSStRJE= =O75H -----END PGP SIGNATURE----- --------------enigE3D3E56794DDD250093FC2FA--