Archived

This forum has been archived. Please start a new discussion on GitHub.

Java adapters create IPv6 sockets even when IPv4 is disabled

A simple "hello world" type application written in Java.

Contents of config file:
OA.Endpoints=tcp -p 9999
Ice.IPv6=0

$ netstat -tnl
tcp6 0 0 :::9999 :::* LISTEN

No tcp IPv4 socket? The same example in C++ binds only on a tcp IPv4 socket.

The consequence is that IPv4 requests are not delivered unless net.ipv6.bindv6only is set to zero in /etc/sysctl.conf (on Linux). Alternatively one may always use -Djava.net.preferIPv4Stack=true.

When IPv6 is not disabled the master socket is also bound to IPv6. But there is no IPv4 socket available for IPv4 clients.

I didn't notice this behaviour before because previously Debian set net.ipv6.bindv6only to zero by default.

Am I doing something wrong?

Comments