Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Aug 2008 15:46:52 +0200
From:      Marcin Cieslak <saper@system.pl>
To:        freebsd-java@freebsd.org
Subject:   Re: FreeBSD Java, IPv6, and DNS SRV query type
Message-ID:  <48B6AC4C.1050006@system.pl>
In-Reply-To: <48B29CB7.9010907@cs.vu.nl>
References:  <48B29CB7.9010907@cs.vu.nl>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Benno Overeinder wrote:
> Hi,
> 
> 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 to
> run this service with IPv6 support.
> 
> 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?)
> 
> To get Java with IPv6 support, we installed jdk15 (and later jdk16)
> using ports (java/jdk15 and java/jdk16).  During installation process we
> enabled IPv6 in the configuration.
> 
> 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:

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

--Marcin


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----

iQCVAwUBSLasTz2W2v2wY27ZAQNZ+gP9Hw+vaV+13StIfpFeOeHMHAoOBBn3g0AL
vCt9rWKehz9s/16ZwqrOzHc3wN63oO1955Vnl+30t3KhxeYtSV0GVPQ17CEzHBXj
wrghK+9AAKAUQ6zzUtBAXPlBpkqagHgh6+GLLwnQ5uHazeeUvu5taPeYAMDs6VOM
jnlWDSStRJE=
=O75H
-----END PGP SIGNATURE-----
help

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