patterndockerMinor
docker swarm init made docker go corrupted
Viewed 0 times
swarmcorruptedmadedockerinit
Problem
I started learning docker recently and I set up a virtual machine (VirtualBox) with Lubuntu image:
So unless I have started acquaintance with swarm everything was going smoothly. However after I executed
When I'm trying to run
Restarting does not help. The only things that makes docker run is reverting to the snapshot that I luckily made before calling
So I would appreciate your help or advice how I do fix everything out.
- Linux verion:
Linux 4.18.0-10-generic i686
- Docker version:
18.06.1-ce, API-version:1.38, Go version:go1.10.4, Git commit:e68fc7a
So unless I have started acquaintance with swarm everything was going smoothly. However after I executed
docker swarm init daemon seemed going down and whatever command I'm now trying to execute, it responds with: Cannot connect to Docker daemon at..When I'm trying to run
sudo dockerd it shows the output where there're some warnings like failed to load plugin io.containerd.snapshotter.v1.btrfa and one error saying error creating cluster object... error="name conflicts with an existing object" module=node node.id=.... Eventually the output ends with floating point exception with some address in memory.Restarting does not help. The only things that makes docker run is reverting to the snapshot that I luckily made before calling
swarm init.So I would appreciate your help or advice how I do fix everything out.
Solution
This response is for
Kernel: Linux 4.4.132-1075-rockchip-ayufan-ga83beded8524
Architecture: aarch64 aarch64 aarch64 GNU/Linux
I had the same issue when issuing commands to a cluster in swarm mode.
Running
Running
Running
Running
Running
Looking in
string
sudo grep -r "105rworelt1fvw9ttjhnf61aw" /var/lib/docker/swarm/
Those two files were
At this point I wasn't feeling very surgical so I removed all files and folders under the
Note: Don't delete the
After this a
Kernel: Linux 4.4.132-1075-rockchip-ayufan-ga83beded8524
Architecture: aarch64 aarch64 aarch64 GNU/Linux
I had the same issue when issuing commands to a cluster in swarm mode.
Running
docker info would result in Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?Running
sudo systemctl start docker would result in a failed service state and output reading Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.Running
systemctl status docker.service would result indocker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-05-16 06:03:46 UTC; 1min 12s ago
Docs: https://docs.docker.com
Process: 3874 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (cod
Main PID: 3874 (code=exited, status=2)Running
journalctl -xe wouldn't result in any information related to docker Running
sudo dockerd -D would result in lots of output with a certain line readingerror="name conflicts with an existing object" module=node node.id=105rworelt1fvw9ttjhnf61awLooking in
/var/lib/docker there is a folder called swarm and doing a grep on all files and folders in the swarm directory for the string
105rworelt1fvw9ttjhnf61aw came up with two files with the string 105rworelt1fvw9ttjhnf61aw in them.sudo grep -r "105rworelt1fvw9ttjhnf61aw" /var/lib/docker/swarm/
Those two files were
/var/lib/docker/swarm/.tmp-state.json504201306 and /var/lib/docker/swarm/state.jsonAt this point I wasn't feeling very surgical so I removed all files and folders under the
/var/lib/docker/swarm and then tried sudo systemctl start docker againA bit surgical: sudo rm -ri /var/lib/docker/swarm/Note: Don't delete the
swarm directory. If you do just create it again.After this a
docker info would work and I was able to docker swarm init again and deploy a stack without issuesCode Snippets
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-05-16 06:03:46 UTC; 1min 12s ago
Docs: https://docs.docker.com
Process: 3874 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (cod
Main PID: 3874 (code=exited, status=2)A bit surgical: sudo rm -ri /var/lib/docker/swarm/Context
StackExchange DevOps Q#5778, answer score: 5
Revisions (0)
No revisions yet.