This advice is going to be useful to a small subset of folks. But it’s useful nonetheless. With us being nearly exhausted of IPv4 addresses, we should probably not be disabling IPv6, but there are some rare situations where some tests depend on IPV4 only. The Glusterfs regression test framework makes a lot of assumptions. One of them is that the network is always an IPV4 network. Gluster does work with IPv6. However our tests and related regular expressions haven’t yet moved to IPv6.
We’re in the process of moving cloud providers. Every time we move, we run into some trouble with server setup. There’s some setup that’s different in base images across the spectrum. Every time, we run into a trouble with rpcbind refusing to start. Every time, we think we have it figured out and automated it away. This time we found a new way it could break!
Generally, this is how you disable IPV6:
- Add
IPV6INIT=no
line in/etc/sysconfig/network-scripts/ifcfg-eth0
- Add
NETWORKING_IPV6=no
line in/etc/sysconfig/network
- Run
sysctl net.ipv6.conf.all.disable_ipv6=1
- Run
sysctl net.ipv6.conf.default.disable_ipv6=1
After you disable IPv6, rpcbind will fail with the following error:
rpcbind.socket failed to listen on sockets: Address family not supported by protocol
To fix the error you need to reboot with dracut -v -f
and reboot. This process is described on the Red Hat Knowledgebase and has worked for us in the past.
In the new provider, we ran into the same error despite doing that. What we discovered is that we need also remove all /etc/hosts
entry that have ::1
in them. Because, if a reverse DNS entry converts to an IPV6 entry, that causes rpcbind to try to make IPv6 connections and the error looks just as though you did not run the dracut -v -f
command.
Leave a Reply