Openfire on FreeBSD with IPv6

Guys,

I’m after completing installation of Openfire (in ports it has 3.7.0 Beta). The problem I had with default setup/settings was that it priritizes IPv6 over IPv4. I dn’t mind of course but thing is that most of boxes are yet on IPv4 only. I have DNS configured to resolve both for the Openfire’s host but noticed problem with Spark, at first, and then any client on non-IPv6 box. Once changed in DNS to resolve IPv4 only it was still not fine since the host on which Openfire operates is configured with IPv6. Followed some guidance from this site (http://community.igniterealtime.org/docs/DOC-1033#Disable_IPv6) but could not actually match with my installation. Finally I have added following arguments for JVM in /etc/rc.conf:

openfire_javargs="-Xmx256M -Djava.net.preferIPv4Stack=true"

From that moment everything works, over IPv4 unfortunately. But I woudl like to be able to utilize both if possible. Any advice would be much appreciated.

Looked up this thread http://community.igniterealtime.org/message/169697#169697, changed net.inet6.ip6.v6only to 0, and removed above JVM arguments line from rc.conf and system works fine.

In my case I wanted to have IPv6 connectivity and the problem was that Java was unable to do DNS lookups using “nameserver 127.0.0.1” listed in /etc/resolv.conf. I could work this problem around by setting **java.naming.provider.url **to “dns://[::1]”.

In April 2011 some bugs regarding IPv4/IPv6 socket support were fixed, so it might be worth upgrading. Those fixes make my “java.naming.provider.url” workaround no longer and running with the default

-Djava.net.preferIPv6Stack=true” is not a problem anymore.

1 Like