openjdk11- tomcat9- no ipv6

x86 machine, freebsd12, tomcat9, openjdk8 >> openjdk11 (from ports, amd64)

Hi all,

Running tomcat on openjdk11 (apparently my webapp needs it) results in no ipv6. No mention of a problem in catalina.out unless I set connector.address to ipv6-specific ip number. Then catalina.out includes:

Code:
19-Mar-2020        12:15:20.602 SEVERE [main]        org.apache.catalina.util.LifecycleBase.handleSubClassException        Failed to initialize component [Connector[HTTP/1.1-8443]]
org.apache.catalina.LifecycleException:        Protocol handler initialization failed at org.apache.catalina.connector.Connector.initInternal(Connector.java:983)
... 
Caused        by: java.net.SocketException: Protocol family unavailable

It works nicely with openjdk8. With openjdk11 it works (so far) on ipv4.
On ubuntu dev machine, tomcat9 runs fine with openjdk11.

Your thoughts?
 
Last edited by a moderator:
Write short program that reads a page on a web server using its IPv6 address in the URL.
If it fails, the problem might be in the port of OpenJDK, or the machine's configuration.
If it works, the problem is in Tomcat's configuration.

But before doing this, check you have the following lines in your /etc/fstab:

proc /proc procfs rw 0 0
fdesc /dev/fd fdescfs rw 0 0

And that module fdescfs is loaded (procfs is already compiled into the kernel by default).
 
Thank you for your response.
I am thinking its the jdk11. All works fine with jdk8. The OS works regardless; DNS-6, ICMP-6, etc all fine. One tomcat cfg change to jdk11 and no ipv6 for web (netstat shows listener on tcp4 only). I was under the impression that my .war files contained their own jvm and that the tomcat jvm was irrelevant. This is apparently not so, as my .war files do not start in tomcat/ jdk8 since I reconfigured my IDE to compile using jdk11(because some libraries need it and jdk8 is becoming somewhat deprecated). Otherwise I would be happy to just leave tomcat on jdk8.
Is this the right forum, or should I try to contact the freebsd-java people?
Thanks again for your help.
 
Tried: sysctl -w net.inet6.ip6.v6only=0
Effect: tomcat still listens only on tcp4 (using jdk11)

Using: netstat -an after tomcat restart
Code:
relevant line:
tcp4       0      0 *.8443                 *.*                    LISTEN
BTW, newbie >> moderator: what tag to use for paste from stdout? (preserve tab formatting, etc)
 
Tried: sysctl -w net.inet6.ip6.v6only=0
Effect: tomcat still listens only on tcp4 (using jdk11)

Using: netstat -an after tomcat restart
Code:
relevant line:
tcp4       0      0 *.8443                 *.*                    LISTEN
BTW, newbie >> moderator: what tag to use for paste from stdout? (preserve tab formatting, etc)

since I didn't use/test ipv6-mapping myself yet , you could reopen :
or send us a new issue-report :
thank you
-- edit:--
if you're not familiar with git or jdk-details just send
issue-report to freebsd-java@freebsd.org , it will directly be read by the jdk-team
 
Back
Top