Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Sep 2008 12:17:46 +0200
From:      Benno Overeinder <benno@NLnetLabs.nl>
To:        Marcin Cieslak <saper@system.pl>
Cc:        freebsd-java@freebsd.org
Subject:   Re: FreeBSD Java, IPv6, and DNS SRV query type
Message-ID:  <48BBC14A.5000107@NLnetLabs.nl>
In-Reply-To: <48B6AC4C.1050006@system.pl>
References:  <48B29CB7.9010907@cs.vu.nl> <48B6AC4C.1050006@system.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

Thanks for your reply.

Marcin Cieslak wrote:
> Benno Overeinder wrote:
>> <snip/>
>>
>> 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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48BBC14A.5000107>