In a previous post (Documentum 21.4 PostgreSQL WSL2 Install Guide) we saw how to install Documentum in WSL2. However, if you try to connect from Windows to the WSL2 repository the connection might fail. Why is that? Windows automatically does NAT between the WSL2 machine and the host OS, however it does it with IPv6.
In order for this configuration to work properly we need to perform the following steps:
- Configure /etc/hosts on the WSL2 machine so the hostname used in CS install resolves also to IPv6
sudo vi /etc/hosts 127.0.0.1 localhost 127.0.1.1 <your_hostname_here>.localdomain <your_hostname_here> # We need to add to this line our hostname ::1 ip6-localhost ip6-loopback <add_your_hostname_here>
- Make sure ip_mode on server.ini is not set to v4only or set it to dualstack (which is the default value)
After doing these changes (and restarting docbroker/repository) a telnet localhost 1489 / telnet localhost <repository port> should work. So now we need to make our DFC client work with WSL2 NAT. For this we need to:
- Change your dfc.properties on Windows to the following:
- Then, we need to force Java to use IPv6 by default by setting the following properties:
And now you should be able to connect to a repository in WSL2 without problems.