Domino on Linux/Unix, Troubleshooting, Best Practices, Tips and more ...

alt

Daniel Nashed

Force Traveler to use IPv4 instead of IPv6

Daniel Nashed – 28 July 2014 13:41:26
We ran into this in a customer situation.
The code used in Traveler is Java based. For the Servlet and also for the Travler servertask.
Even if you specify notes.ini NTS_HOST_IP_ADDR with an IPv4 address Traveler might use IPv6.
If you are in stand-alone mode this should not cause any issues.
But if you are in HA mode connecting to a remote machine might cause trouble in some situations.

My recommendation would be to completely disable IPv6 on the machine unless you really need it.
At some hosted environments like a hosted virtual server (not a root server) you cannot disable IPv6 on Linux completely -- because it needs to be changed on kernel level and you don't control that on those machines.

On my machine hosted at a provider I went thru the hotline to find out that I cannot disable it.

But I still wanted to use a IPv4 address for my Traveler server.

There are two steps that you have to follow.

First of all convince the Traveler servertask to use IPv4 addresses.
That can be done with the following options that you pass to Java.

NTS_JAVA_PARMS=-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false

Second you have to convince the Traveler servlet to use IPv4 only.

You can pass Java parameters via the HTTP configuration.

Create a read-only file that is owned by root like this -- Can be located in the data directory if you set the right permissions.

-rw-r--r-- 1 root root 31 Jul 21 16:27 JvmOptions.properties

Add the following parameter:

java.net.preferIPv4Stack=true

And specify the file in the notes.ini of your Traveler server:

notes.ini JavaUserOptionsFile=/local/notesdata/JvmOptions.properties


After restarting the Traveler servertask and HTTP you should see via netstat, that 50125 (Traveler Servertask) and 50126 (Traveler OSGI Servelet) are binding to IPv4.


-- Daniel




Links

    Archives


    • [HCL Domino]
    • [Domino on Linux]
    • [Nash!Com]
    • [Daniel Nashed]