Docker Community Forums

Share and learn in the Docker community.

Systemctl start docker fails with bip= [Solved]

Expected behaviour

Docker0 to start with a custom IP

Actual behaviour

Docker fails to start.

Additional Information

https://container-solutions.com/set-the-ip-of-the-docker-bridge-with-systemd/

sudo systemctl status -l docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Fri 2019-05-03 11:46:38 BST; 2s ago
     Docs: https://docs.docker.com
  Process: 9941 ExecStart=/usr/bin/dockerd $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_ADD_RUNTIMES (code=exited, status=1/FAILURE)
  Process: 9933 ExecStartPre=/usr/libexec/docker/docker-setup-runtimes.sh (code=exited, status=0/SUCCESS)
  Process: 9926 ExecStartPre=/bin/mkdir -p /run/docker (code=exited, status=0/SUCCESS)
 Main PID: 9941 (code=exited, status=1/FAILURE)

May 03 11:46:38 AWS-Workspace systemd[1]: Unit docker.service entered failed state.
May 03 11:46:38 AWS-Workspace systemd[1]: docker.service failed.
May 03 11:46:38 AWS-Workspace systemd[1]: docker.service holdoff time over, scheduling restart.
May 03 11:46:38 AWS-Workspace systemd[1]: start request repeated too quickly for docker.service
May 03 11:46:38 AWS-Workspace systemd[1]: Failed to start Docker Application Container Engine.
May 03 11:46:38 AWS-Workspace systemd[1]: Unit docker.service entered failed state.
May 03 11:46:38 AWS-Workspace systemd[1]: docker.service failed.

File: /etc/docker/daemon.json

{
  "bip": "192.168.169.1/24"
}
$ docker version
Client:
 Version:           18.06.1-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        e68fc7a215d7133c34aa18e3b72b4a21fd0c6136
 Built:             Mon Mar  4 21:25:41 2019
 OS/Arch:           linux/amd64
 Experimental:      false
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Steps to reproduce the behaviour

  1. Follow the instructions from LINK 1
  2. Follow the instructions from LINK 2

Issue Description

The problem occurs on AWS Linux Workspaces, where in some users are reporting being unable to reach internal resources. The affected users have installed containers some of which generate a br-InterfaceName which overrides normal routing and prevents access to services. These bridge interfaces were identified as coming from docker. The first article referenced indicates that the Docker0 bridge overlaps with one or more of our subnets.
Therefore, we are trying to move the Docker0 ip subnet to remove the conflict. The instructions above are followed and then Docker won’t start.

I have achieved my primary goal of allowing access to various local resources.

This was achieved by editing one line of: /etc/sysconfig/docker

This line now looks like:

OPTIONS="--default-ulimit nofile=1024:4096 --bip=192.168.169.1/24"

The files daemon.json and docker.conf respectively from the above instruction sets have been removed.

This does not mean that the error message is resolved however, that is not a high priority.