Docker service does not start post changing docker IP address in /etc/docker/daemon.json
search cancel

Docker service does not start post changing docker IP address in /etc/docker/daemon.json

book

Article ID: 396658

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite)

Issue/Introduction

When  the IP address of cloud Proxy internal docker network is changed to avoid overlap of IP in their network it fails to start the docker service 

Even when the IP address is not in use the logging shows that the gateway address is in use

journalctl -xeu docker.service 

##:##:## : dockerd[1234]: time="" level=info msg="Starting up"
##:##:## : dockerd[1234]: time="" level=info msg="[graphdriver] using prior storage driver: overlay2"
##:##:## : dockerd[1234]: time="" level=info msg="Loading containers: start."
##:##:## : time="" level=info msg="stopping event stream following graceful shutdown" error="<nil>" module=libcontainerd namespace=moby
##:##:## : failed to start daemon: Error initializing network controller: error creating default "bridge" network: failed to allocate gateway (192.168.1.0): Address already in use
##:##:## : systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE

Environment

Aria operations 8.18.x

Cause

Although 192.168.1.0/16 represents the full network range, the .0 address is reserved as the network identifier and cannot be assigned to an interface. Docker requires a valid, usable host IP address for the bridge interface

Resolution

Docker requires a valid host IP address for the bridge interface, so you must specify an IP within the appropriate subnet (e.g., 192.168.1.1/16). Make sure to include a valid IP address in the /etc/docker/daemon.json configuration file

Additional Information

To change internal docker network address - Manually change the internal docker network address 

To change custom bridge network - Updating Docker Custom Bridge Network Subnet