I can't install kubernetes in CentOS following this installation guide (link).
1: Flannel and docker service can't start after default installation
By default above installation will install Docker 1.12, but flannel and docker service can't start.
● flanneld.service - Flanneld overlay address etcd agent
Loaded: loaded (/usr/lib/systemd/system/flanneld.service; enabled; vendor preset: disabled)
Active: activating (start) since Mon 2017-03-20 11:24:45 EDT; 27s ago
Main PID: 31572 (flanneld)
CGroup: /system.slice/flanneld.service
└─31572 /usr/bin/flanneld -etcd-endpoints=http://127.0.0.1:2379 -etcd-prefix=/atomic.io/network
Mar 20 11:25:00 JackKubeNode1 flanneld-start[31572]: E0320 11:25:00.259468 31572 network.go:102] failed to retrieve network config: client: etcd cluster is unavailable or misconfigured
Mar 20 11:25:01 JackKubeNode1 flanneld-start[31572]: E0320 11:25:01.265559 31572 network.go:102] failed to retrieve network config: client: etcd cluster is unavailable or misconfigured
Mar 20 11:25:02 JackKubeNode1 flanneld-start[31572]: E0320 11:25:02.592586 31572 network.go:102] failed to retrieve network config: client: etcd cluster is unavailable or misconfigured
Mar 20 11:25:03 JackKubeNode1 flanneld-start[31572]: E0320 11:25:03.677965 31572 network.go:102] failed to retrieve network config: client: etcd cluster is unavailable or misconfigured
Mar 20 11:25:04 JackKubeNode1 flanneld-start[31572]: E0320 11:25:04.719815 31572 network.go:102] failed to retrieve network config: client: etcd cluster is unavailable or misconfigured
Mar 20 11:25:05 JackKubeNode1 flanneld-start[31572]: E0320 11:25:05.820301 31572 network.go:102] failed to retrieve network config: client: etcd cluster is unavailable or misconfigured
Mar 20 11:25:09 JackKubeNode1 flanneld-start[31572]: E0320 11:25:09.016167 31572 network.go:102] failed to retrieve network config: client: etcd cluster is unavailable or misconfigured
Mar 20 11:25:10 JackKubeNode1 flanneld-start[31572]: E0320 11:25:10.021494 31572 network.go:102] failed to retrieve network config: client: etcd cluster is unavailable or misconfigured
Mar 20 11:25:11 JackKubeNode1 flanneld-start[31572]: E0320 11:25:11.022784 31572 network.go:102] failed to retrieve network config: client: etcd cluster is unavailable or misconfigured
Mar 20 11:25:12 JackKubeNode1 flanneld-start[31572]: E0320 11:25:12.238389 31572 network.go:102] failed to retrieve network config: client: etcd cluster is unavailable or misconfigured
Mar 20 11:25:13 JackKubeNode1 flanneld-start[31572]: E0320 11:25:13.513397 31572 network.go:102] failed to retrieve network config: client: etcd cluster is unavailable or misconfigured
A dependency job for docker.service failed. See 'journalctl -xe' for details.
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/docker.service.d
└─flannel.conf
Active: inactive (dead) since Mon 2017-03-20 11:25:16 EDT; 1min 29s ago
Docs: http://docs.docker.com
Main PID: 30412 (code=exited, status=0/SUCCESS)
Mar 20 11:18:32 JackKubeNode1 dockerd-current[30412]: time="2017-03-20T11:18:32.059329808-04:00" level=info msg="Daemon has completed initialization"
Mar 20 11:18:32 JackKubeNode1 dockerd-current[30412]: time="2017-03-20T11:18:32.059499814-04:00" level=info msg="Docker daemon" commit="96d83a5/1.12.6" graphdriver=devicemapper version=1.12.6
Mar 20 11:18:33 JackKubeNode1 dockerd-current[30412]: time="2017-03-20T11:18:33.169919003-04:00" level=info msg="API listen on /var/run/docker.sock"
Mar 20 11:18:33 JackKubeNode1 systemd[1]: Started Docker Application Container Engine.
Mar 20 11:25:15 JackKubeNode1 systemd[1]: Stopping Docker Application Container Engine...
Mar 20 11:25:15 JackKubeNode1 dockerd-current[30412]: time="2017-03-20T11:25:15.912002109-04:00" level=info msg="Processing signal 'terminated'"
Mar 20 11:25:16 JackKubeNode1 dockerd-current[30412]: time="2017-03-20T11:25:15.982882827-04:00" level=info msg="stopping containerd after receiving terminated"
Mar 20 11:25:16 JackKubeNode1 dockerd-current[30412]: time="2017-03-20T11:25:16.352579523-04:00" level=error msg="libcontainerd: failed to receive event from containerd: rpc error: code = 13 desc = transport is closing"
Mar 20 11:26:42 JackKubeNode1 systemd[1]: Dependency failed for Docker Application Container Engine.
Mar 20 11:26:42 JackKubeNode1 systemd[1]: Job docker.service/start failed with result 'dependency'.
2: It is said in link above issue is fixed in docker 1.13. So I manually install docker first then install kubernetes. But docker-ce-17.03 was installed, then there was conflicts between kubernetes and docker-ce-17.03 during kubernetes dependency resolves. How to work it around?
Processing Conflict: docker-ce-17.03.0.ce-1.el7.centos.x86_64 conflicts docker\n-Processing Conflict: docker-ce-17.03.0.ce-1.el7.centos.x86_64 conflicts docker\n-Processing Conflict: docker-ce-17.03.0.ce-1.el7.centos.x86_64 conflicts docker-io
Processing Conflict: docker-ce-17.03.0.ce-1.el7.centos.x86_64 conflicts docker-io
Processing Conflict: docker-ce-selinux-17.03.0.ce-1.el7.centos.noarch conflicts docker-selinux
Processing Conflict: docker-ce-selinux-17.03.0.ce-1.el7.centos.noarch conflicts docker-selinux
3: Recently Docker renamed docker-VERSION as docker-ce-VERSION, and looks like kubernetes doesn't accept new name docker-ce-VERSION. I think the issue I met can be worked around if I manually install docker-1.13. But how to install docker-1.13? I always install docker-ce-17.03 when running "yum install docker".
Docker ce 17.03 is basically docker 1.13 which isn't supported yet by stable kubernetes release. See this kuberentes github issue
Related
I prefer to create a situation where on a Raspberry Pi4 Docker is running while the SD-card is read only. This with overlay fs.
In the dockercontainer a database is running, the data of the database is written to an USB-stick (volume mapping).
When overlayfs is activated (after reboot, enabled via “sudo raspi-config”), docker will not start-up any more.
The steps on https://docs.docker.com/storage/storagedriver/overlayfs-driver/
System information:
Linux raspberrypi 5.10.63-v8+ #1488 SMP PREEMPT Thu Nov 18 16:16:16 GMT 2021 aarch64 GNU/Linux
Docker information:
pi#raspberrypi:~ $ docker info
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Build with BuildKit (Docker Inc., v0.6.3-docker)
Server:
Containers: 1
Running: 1
Paused: 0
Stopped: 0
Images: 1
Server Version: 20.10.11
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
………
Status docker after restart:
pi#raspberrypi:~ $ sudo systemctl status docker.*
Warning: The unit file, source configuration file or drop-ins of docker.service changed on disk. Run 'systemctl daemon-reload' to reload units.
● docker.socket - Docker Socket for the API
Loaded: loaded (/lib/systemd/system/docker.socket; enabled; vendor preset: enabled)
Active: failed (Result: service-start-limit-hit) since Thu 2021-12-09 14:30:43 GMT; 1h 13min ago
Triggers: ● docker.service
Listen: /run/docker.sock (Stream)
CPU: 2ms
Dec 09 14:30:36 raspberrypi systemd[1]: Starting Docker Socket for the API.
Dec 09 14:30:36 raspberrypi systemd[1]: Listening on Docker Socket for the API.
Dec 09 14:30:43 raspberrypi systemd[1]: docker.socket: Failed with result 'service-start-limit-hit'
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2021-12-09 14:30:43 GMT; 1h 13min ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 992 (code=exited, status=1/FAILURE)
CPU: 162ms
Dec 09 14:30:43 raspberrypi systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Dec 09 14:30:43 raspberrypi systemd[1]: Stopped Docker Application Container Engine.
Dec 09 14:30:43 raspberrypi systemd[1]: docker.service: Start request repeated too quickly.
Dec 09 14:30:43 raspberrypi systemd[1]: docker.service: Failed with result 'exit-code'.
Dec 09 14:30:43 raspberrypi systemd[1]: Failed to start Docker Application Container Engine.
Running the command given in docker.service with additional overlay flag
pi#raspberrypi:~ $ sudo /usr/bin/dockerd --storage-driver=overlay -H fd:// --containerd=/run/containerd/containerd.sock
unable to configure the Docker daemon with file /etc/docker/daemon.json: the following directives are specified both as a flag and in the configuration file: storage-driver: (from flag: overlay, from file: overlay2)
pi#raspberrypi:~ $ sudo /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
INFO[2021-12-09T14:34:31.667296985Z] Starting up
failed to load listeners: no sockets found via socket activation: make sure the service was started by systemd
Which steps am I missing to be able to run Docker with overlay fs, such that the SD-card in the Raspberry is read only?
Without the overlay fs active it all works as expected.
I ran into this issue as well and found a way around it. In summary, you can't run the default Docker FS driver (overlay2) on overlayfs. Fortunately, Docker supports other storage drivers, including fuse-overlayfs. Switching to this driver resolves the issue but there's one final catch. When Docker starts, it attempts to rename /var/lib/docker/runtimes and since overlayfs doesn't support renames of directories already in lower layers, it fails. If you simply rm -rf this directory while Docker is stopped and before you enable RPi's overlayfs, everything should work.
i have tried all of thes solutions to change the ip-address of my bridge:
Change default docker0 bridge ip address
But i allways got thes error:
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2021-07-10 20:02:29 CEST; 9min ago
Docs: https://docs.docker.com
Process: 3130 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --bip 192.168.198.128/25 (code=exited, status=1/FAILURE)
Main PID: 3130 (code=exited, status=1/FAILURE)
Jul 10 20:02:26 Server systemd[1]: Failed to start Docker Application Container Engine.
Jul 10 20:02:29 Server systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Jul 10 20:02:29 Server systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Jul 10 20:02:29 Server systemd[1]: Stopped Docker Application Container Engine.
Jul 10 20:02:29 Server systemd[1]: docker.service: Start request repeated too quickly.
Jul 10 20:02:29 Server systemd[1]: docker.service: Failed with result 'exit-code'.
Jul 10 20:02:29 Server systemd[1]: Failed to start Docker Application Container Engine.
Jul 10 20:03:09 Server systemd[1]: docker.service: Start request repeated too quickly.
Jul 10 20:03:09 Server systemd[1]: docker.service: Failed with result 'exit-code'.
Jul 10 20:03:09 Server systemd[1]: Failed to start Docker Application Container Engine.
When i try to change it via
dockerd --bip=192.168.198.128/25
Then i recived this:
INFO[2021-07-10T20:30:14.220551981+02:00] Starting up
failed to start daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid
root#Server:/etc/docker# sudo service docker stop
root#Server:/etc/docker# dockerd --bip=192.168.198.128/25
INFO[2021-07-10T20:30:27.749647728+02:00] Starting up
INFO[2021-07-10T20:30:27.751145974+02:00] detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf
INFO[2021-07-10T20:30:27.752521878+02:00] parsed scheme: "unix" module=grpc
INFO[2021-07-10T20:30:27.752770076+02:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2021-07-10T20:30:27.752906825+02:00] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 <nil>}] <nil>} module=grpc
INFO[2021-07-10T20:30:27.753028929+02:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2021-07-10T20:30:27.756109499+02:00] parsed scheme: "unix" module=grpc
INFO[2021-07-10T20:30:27.756411626+02:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2021-07-10T20:30:27.756544438+02:00] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 <nil>}] <nil>} module=grpc
INFO[2021-07-10T20:30:27.756653280+02:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2021-07-10T20:30:27.761446487+02:00] [graphdriver] using prior storage driver: overlay2
WARN[2021-07-10T20:30:27.807419442+02:00] Your kernel does not support swap memory limit
WARN[2021-07-10T20:30:27.807711781+02:00] Your kernel does not support cgroup rt period
WARN[2021-07-10T20:30:27.807832417+02:00] Your kernel does not support cgroup rt runtime
INFO[2021-07-10T20:30:27.808384049+02:00] Loading containers: start.
ERRO[2021-07-10T20:30:28.211882902+02:00] failed to get event error="rpc error: code = Unavailable desc = transport is closing" module=libcontainerd namespace=moby
failed to start daemon: Error initializing network controller: Error creating default "bridge" network: failed to allocate gateway (192.168.198.128): Address already in use
but i dont have it in use, not in my network and not as a ip in the config of any network-connections.
Did anybody has an idea how to change it?
Thanks bevore.
I can't restart docker service. After command system just getting stuck.
docker service status is here:
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: deactivating (stop-sigterm)
Docs: https://docs.docker.com
Main PID: 1216 (dockerd)
Tasks: 9
CGroup: /system.slice/docker.service
└─1216 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Aug 25 15:08:21 hq-rproxy02 dockerd[1216]: time="2020-08-25T15:08:21.179342033-07:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=
Aug 25 15:08:21 hq-rproxy02 dockerd[1216]: time="2020-08-25T15:08:21.631714600-07:00" level=info msg="[graphdriver] using prior storage driver: overlay2"
Aug 25 15:08:23 hq-rproxy02 dockerd[1216]: time="2020-08-25T15:08:23.607526073-07:00" level=warning msg="Your kernel does not support swap memory limit"
Aug 25 15:08:23 hq-rproxy02 dockerd[1216]: time="2020-08-25T15:08:23.608984581-07:00" level=warning msg="Your kernel does not support cgroup rt period"
Aug 25 15:08:23 hq-rproxy02 dockerd[1216]: time="2020-08-25T15:08:23.609119466-07:00" level=warning msg="Your kernel does not support cgroup rt runtime"
Aug 25 15:08:23 hq-rproxy02 dockerd[1216]: time="2020-08-25T15:08:23.609435097-07:00" level=info msg="Loading containers: start."
Aug 25 15:08:32 hq-rproxy02 dockerd[1216]: time="2020-08-25T15:08:32.266035465-07:00" level=info msg="Removing stale sandbox f2295d6e0a7aec8569c42470bbccbc5a1
Aug 25 15:08:32 hq-rproxy02 dockerd[1216]: time="2020-08-25T15:08:32.677509372-07:00" level=warning msg="Error (Unable to complete atomic operation, key modif
Aug 25 15:08:33 hq-rproxy02 dockerd[1216]: time="2020-08-25T15:08:33.339048947-07:00" level=info msg="Default bridge (docker0) is assigned with an IP address
Aug 27 05:12:40 hq-rproxy02 dockerd[1216]: time="2020-08-27T05:12:40.330007214-07:00" level=info msg="Processing signal 'terminated'"
● docker.socket - Docker Socket for the API
Loaded: loaded (/lib/systemd/system/docker.socket; enabled; vendor preset: enabled)
Active: active (running) since Tue 2020-08-25 15:07:44 PDT; 5 days ago
Listen: /var/run/docker.sock (Stream)
Tasks: 0 (limit: 1113)
CGroup: /system.slice/docker.socket
Aug 25 15:07:44 hq-rproxy02 systemd[1]: Starting Docker Socket for the API.
Aug 25 15:07:44 hq-rproxy02 systemd[1]: Listening on Docker Socket for the API.
What can I check?
I'm trying to pull an image off GCR using docker, using:
docker pull eu.gcr.io/<project>/<image>:<tag>
However I keep getting the error:
failed to register layer: ApplyLayer exit status 1 stdout: stderr: Error cleaning up after pivot: remove /.pivot_root347438920: device or resource busy
After receiving the error all calls to docker returns:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
The output of systemctl status docker is:
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2020-08-18 10:38:26 CEST; 14min ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 985 (dockerd)
Tasks: 42
Memory: 175.0M
CGroup: /system.slice/docker.service
└─985 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Aug 18 10:38:25 <my_name> dockerd[985]: time="2020-08-18T10:38:25.329780734+02:00" level=info msg="Loading containers: start."
Aug 18 10:38:26 <my_name> dockerd[985]: time="2020-08-18T10:38:26.093178325+02:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Aug 18 10:38:26 <my_name> dockerd[985]: time="2020-08-18T10:38:26.219186657+02:00" level=info msg="Loading containers: done."
Aug 18 10:38:26 <my_name> dockerd[985]: time="2020-08-18T10:38:26.333584778+02:00" level=info msg="Docker daemon" commit=48a66213fe graphdriver(s)=devicemapper version=19.03.12-ce
Aug 18 10:38:26 <my_name> dockerd[985]: time="2020-08-18T10:38:26.334733161+02:00" level=info msg="Daemon has completed initialization" Aug 18 10:38:26 emil-pc dockerd[985]: time="2020-08-18T10:38:26.389239911+02:00" level=info msg="API listen on /run/docker.sock"
Aug 18 10:38:26 <my_name> systemd[1]: Started Docker Application Container Engine.
Aug 18 10:46:05 <my_name> dockerd[985]: time="2020-08-18T10:46:05.342092783+02:00" level=info msg="Attempting next endpoint for pull after error: failed to register layer: ApplyLayer exit status 1 stdout: stderr: Error cleaning up after pivot: remove /.pivot_root557795275: device or resource busy"
I've tried restarting docker but to no avail. Any help is much appriciated.
Suddently my docker daemon stop and never turned on again. I'm running docker on a Linux raspberrypi 4.1.13-v7+. It worked before until last week when my docker service suddenly stop working and I don't have a clue why.
My docker version is:
raspberrypi:~ $ docker version
Client:
Version: 1.10.3
API version: 1.22
Go version: go1.4.3
Git commit: 20f81dd
Built: Thu Mar 10 22:23:48 2016
OS/Arch: linux/arm
An error occurred trying to connect: Get http:///var/run/docker.sock/v1.22/version: read unix /var/run/docker.sock: connection reset by peer
Socket is ok:
● docker.socket - Docker Socket for the API
Loaded: loaded (/lib/systemd/system/docker.socket; disabled)
Active: active (listening) since Sat 2018-03-17 00:42:46 UTC; 6s ago
Listen: /var/run/docker.sock (Stream)
Looking to my service status you can see the following log:
docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled)
Active: failed (Result: start-limit) since Sat 2018-03-17 00:05:52 UTC; 4min 55s ago
Docs: https://docs.docker.com
Process: 2891 ExecStart=/usr/bin/docker daemon -H fd:// $DOCKER_OPTS (code=exited, status=1/FAILURE)
Main PID: 2891 (code=exited, status=1/FAILURE)
Mar 17 00:05:52 raspberrypi docker[2891]: time="2018-03-17T00:05:52.743474604Z" level=debug msg="ReleaseAddress(LocalDefault/172.17.0.0/16, 172.17.0.1)"
Mar 17 00:05:52 raspberrypi docker[2891]: time="2018-03-17T00:05:52.758090386Z" level=debug msg="ReleasePool(LocalDefault/172.17.0.0/16)"
Mar 17 00:05:52 raspberrypi docker[2891]: time="2018-03-17T00:05:52.772819345Z" level=debug msg="Cleaning up old shm/mqueue mounts: start."
Mar 17 00:05:52 raspberrypi docker[2891]: time="2018-03-17T00:05:52.773269239Z" level=fatal msg="Error starting daemon: Error initializing network controller: Error creating default \"bridge\" network: package not installed"
Mar 17 00:05:52 raspberrypi systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Mar 17 00:05:52 raspberrypi systemd[1]: Failed to start Docker Application Container Engine.
I already tried this solution but for me it didn't work.
How can I make my docker service start again? It seems that a package is not installed but I tried to:
raspberrypi:~ $ modprobe bridge
modprobe: FATAL: Module bridge not found.