Unable to start docker containers connector_cm and connector_connectorgateway during HP Anyware Connector installation

Rate this Article
No votes yet

In Ubuntu 18.04.4 LTS or Ubuntu 18.04.5 LTS setting up HP Anyware Connector, if IPV6 was disabled in the vm  those 2 containers will always fail to start.

During the installation or reinstallation of the HP Anyware Connector, connector_cm and connector_connectorgateway doesn't start
rtal


Typing Ctrl C will break the installation or reinstallation of the HP Anyware Connector

Validate the docker services by typing docker service ls

rtalimage


From our engineer team analysis, it depends on how the ipv6 got disabled.

If the ipv6 was disabled using sysctl, the CAC installation will just continue.
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1

However this is only temporary, when you reboot the vm ipv6 will be enabled again

In order to persist you need to modify /etc/sysctl.conf
Add the following into the file
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1

Save the file then run this command to take effect 
sudo sysctl -p

If ipv6 is still enabled after rebooting, you must create (with root privileges) the file /etc/rc.local and fill it with:
#!/bin/bash
# /etc/rc.local

/etc/sysctl.d
/etc/init.d/procps restart 

exit 0

Save it and apply chmod command
sudo chmod 755 /etc/rc.local

If the ipv6 was disabled using grub, you will likely experience those 2 docker containers not starting.
Edit /etc/default/grub, make sure you have administrator privileges 
Then modify GRUB_CMDLINE_LINUX_DEFAULT and GRUB_CMDLINE_LINUX to disable ipv6 on boot:
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
GRUB_CMDLINE_LINUX="ipv6.disable=1"

then run sudo update-grub
The settings should now persist on reboot


Two possible solutions to fix the error:
a) enable ipv6 temporarily then reboot vm
b) downgrade the latest docker version to a specific version then restart the docker service or reboot vm

Downgrading the docker version
sudo apt install docker-ce=5:20.10.5~3-0~ubuntu-bionic
sudo apt-mark hold docker-ce         # This will lock to the specific version of docker

then restart docker
systemctl restart docker

After restarting the docker service type in docker service ls again the docker containers will self heal.

rtalimage


see reference:  https://itsfoss.com/disable-ipv6-ubuntu-linux/