Error response from daemon: --live-restore daemon configuration is incompatible with swarm mode

I’m trying to follow Create a swarm - Docker and getting following error(s):

$ docker swarm init
Error response from daemon: could not choose an IP address to advertise since this system has multiple addresses on different interfaces (10.52.208.221 on eno1 and 192.168.122.1 on virbr0) - specify one with --advertise-addr
$ docker swarm init --advertise-addr 10.52.208.221
Error response from daemon: --live-restore daemon configuration is incompatible with swarm mode
$

My environment:

$ cat /etc/redhat-release 
CentOS Linux release 7.3.1611 (Core) 
$ uname -a
Linux X 3.10.0-514.6.1.el7.x86_64 #1 SMP Wed Jan 18 13:06:36 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ rpm -q docker
docker-1.12.5-14.el7.centos.x86_64
$

Please advise.

The feature is not supported yet. However it’s known to be a pain point and Docker crew is taking a look at it.

According to this url: Live restore | Docker Docs

Live restore and swarm mode

The live restore option is not compatible with Docker Engine swarm mode. When
the Docker Engine runs in swarm mode, the orchestration feature manages tasks
and keeps containers running according to a service specification.

If you have this
cat /etc/docker/daemon.json
{
“live-restore”: true
}

you should change to:

cat /etc/docker/daemon.json
{
“live-restore”: false
}

systemctl restart docker

docker swarm init
Swarm initialized: current node (5rd4bnmxev46jpoyl4f0toy2x) is now a manager.

To add a worker to this swarm, run the following command:

docker swarm join \
--token SWMTKN-1-567nnnvaz0p0hbaxw448mjqlvfv9slv0516ceby635dqgxf7zu-1r7phknegu52y6sqj5ld32noi \
192.168.99.70:2377

To add a manager to this swarm, run ‘docker swarm join-token manager’ and follow the instructions.

cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

4 Likes

In addition to the previous I did the following just in case if needed:

Disable selinux

cat /etc/selinux/config

SELINUX=disabled

Also uncomment ADD REGISTRY

cat /etc/sysconfig/docker

ADD_REGISTRY=‘–add-registry registry.access.redhat.com

switching live-restore from true to false did the job for me:

# cat /etc/docker/daemon.json 
{
    "live-restore": false
}
# docker swarm init
Swarm initialized: current node (cdw7tv7omkja97mf1bql2mifp) is now a manager.

To add a worker to this swarm, run the following command:

    docker swarm join \
    --token SWMTKN-1-0pxn4kapleu0bufil1mttsz44r5f6nrtrbtaj3yjb8pp12ij3w-3x9g9439klahytgs17g6esx60 \
    10.52.17.101:2377

To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.

#
1 Like

switching live-restore from true to false did the job for me.

it’s right for me.
thanks!

for those who can’t find /etc/docker/daemon.json try /etc/sysconfig/docker

live-restore option is there:

OPTIONS=’–selinux-enabled --log-driver=journald --live-restore’

2 Likes

On Fedora30 with docker-1.13.1-67 installed, below steps worked for me.

sed -i 's/--live-restore//g' /etc/sysconfig/docker

And restart service using systemctl restart docker

Verify daemon is running using systemctl status docker

Try running docker swarm init again. :wink:

Is there a reason why you use the docker OS package, instead of the latest official Docker CE package (from Docker Inc.)?

The is no guaranty that the os package is 100% compatible with the documentation. I would suggest to install a recent Docker CE package and try again.