From owner-freebsd-java@FreeBSD.ORG Mon Sep 1 10:17:52 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 29F621065686 for ; Mon, 1 Sep 2008 10:17:52 +0000 (UTC) (envelope-from benno@NLnetLabs.nl) Received: from open.nlnetlabs.nl (open.nlnetlabs.nl [IPv6:2001:7b8:206:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id B068C8FC1D for ; Mon, 1 Sep 2008 10:17:51 +0000 (UTC) (envelope-from benno@NLnetLabs.nl) Received: from tinkerbell.nlnetlabs.nl (tinkerbell.nlnetlabs.nl [213.154.224.13]) (authenticated bits=0) by open.nlnetlabs.nl (8.14.2/8.14.2) with ESMTP id m81AHkJ7069307 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 1 Sep 2008 12:17:47 +0200 (CEST) (envelope-from benno@NLnetLabs.nl) Message-ID: <48BBC14A.5000107@NLnetLabs.nl> Date: Mon, 01 Sep 2008 12:17:46 +0200 From: Benno Overeinder User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Marcin Cieslak References: <48B29CB7.9010907@cs.vu.nl> <48B6AC4C.1050006@system.pl> In-Reply-To: <48B6AC4C.1050006@system.pl> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (open.nlnetlabs.nl [213.154.224.1]); Mon, 01 Sep 2008 12:17:47 +0200 (CEST) X-Spam-Status: No, score=-100.0 required=5.0 tests=USER_IN_WHITELIST autolearn=unavailable version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on open.nlnetlabs.nl Cc: freebsd-java@freebsd.org 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: Mon, 01 Sep 2008 10:17:52 -0000 Hi, Thanks for your reply. Marcin Cieslak wrote: > Benno Overeinder wrote: >> >> >> All set and go, and IPv6 worked with our Java programs, including the >> Openfire server. >> >> However, DNS SRV _xmpp-server._tcp.domain.name resolution fails with the >> 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) > but I tried a small jython program: Just for clarification, you also compiled and installed jdk16 (ports package java/jdk16)? And the test program also fails to resolve the DNS SRV request _xmpp-server._tcp.google.com? The test program is more or less the isolated code from the Openfire XMPP server. Hmmm, I wonder why there are not more messages mentioning this problem with Java on FreeBSD. > import java > from javax.naming import Context > from javax.naming.directory import InitialDirContext > > env = java.util.Hashtable() > env.put(Context.INITIAL_CONTEXT_FACTORY, > "com.sun.jndi.dns.DnsContextFactory") > ictx = InitialDirContext(env) > print ictx.getAttributes("_xmpp-server._tcp.google.com", ["SRV"]) > > the result: > > {srv=SRV: 20 0 5269 xmpp-server3.l.google.com., 20 0 5269 > xmpp-server4.l.google.com., 5 0 5269 xmpp-server.l.google.com., 20 0 > 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=5042453 Thanks. But the Java code does run successfully on Linux or Solaris with IPv6 enabled. Cheers, -- Benno -- Benno J. Overeinder NLnet Labs http://www.nlnetlabs.nl/