在这些更新之后,我无法运行任何 docker 映像,并且在apt purge docker-ce docker-ce-cli
安装多个不同版本之后docker-ce
仍然出现相同的错误:
$ sudo apt-get install docker-ce=5:18.09.8~3-0~ubuntu-xenial docker-ce-cli=5:18.09.8~3-0~ubuntu-xenial containerd.io
Reading package lists... Done
Building dependency tree
Reading state information... Done
containerd.io is already the newest version (1.2.6-3).
The following NEW packages will be installed:
docker-ce docker-ce-cli
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/30.4 MB of archives.
After this operation, 155 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package docker-ce-cli.
(Reading database ... 278709 files and directories currently installed.)
Preparing to unpack .../docker-ce-cli_5%3a18.09.8~3-0~ubuntu-xenial_amd64.deb ...
Unpacking docker-ce-cli (5:18.09.8~3-0~ubuntu-xenial) ...
Selecting previously unselected package docker-ce.
Preparing to unpack .../docker-ce_5%3a18.09.8~3-0~ubuntu-xenial_amd64.deb ...
Unpacking docker-ce (5:18.09.8~3-0~ubuntu-xenial) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu21.22) ...
Processing triggers for ureadahead (0.100.0-19.1) ...
Setting up docker-ce-cli (5:18.09.8~3-0~ubuntu-xenial) ...
Setting up docker-ce (5:18.09.8~3-0~ubuntu-xenial) ...
update-alternatives: using /usr/bin/dockerd-ce to provide /usr/bin/dockerd (dockerd) in auto mode
Job for docker.service canceled.
invoke-rc.d: initscript docker, action "start" failed.
● 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: 21851 (dockerd)
Tasks: 17
Memory: 29.3M
CPU: 51ms
CGroup: /system.slice/docker.service
└─21851 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
אוג 14 16:08:39 ofirm-X580VD dockerd[21851]: time="2019-08-14T16:08:39.418924857+03:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
אוג 14 16:08:39 ofirm-X580VD dockerd[21851]: time="2019-08-14T16:08:39.418996602+03:00" level=info msg="parsed scheme: \"unix\"" module=grpc
אוג 14 16:08:39 ofirm-X580VD dockerd[21851]: time="2019-08-14T16:08:39.419003973+03:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
אוג 14 16:08:39 ofirm-X580VD dockerd[21851]: time="2019-08-14T16:08:39.419114630+03:00" level=info msg="ccResolverWrapper: sending new addresses to cc: [{unix:///run/containerd/containe..." module=grpc
אוג 14 16:08:39 ofirm-X580VD dockerd[21851]: time="2019-08-14T16:08:39.419131467+03:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
אוג 14 16:08:39 ofirm-X580VD dockerd[21851]: time="2019-08-14T16:08:39.419121817+03:00" level=info msg="ccResolverWrapper: sending new addresses to cc: [{unix:///run/containerd/containe..." module=grpc
אוג 14 16:08:39 ofirm-X580VD dockerd[21851]: time="2019-08-14T16:08:39.419150295+03:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
אוג 14 16:08:39 ofirm-X580VD dockerd[21851]: time="2019-08-14T16:08:39.419168956+03:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc420185bc0, CONNECTING" module=grpc
אוג 14 16:08:39 ofirm-X580VD dockerd[21851]: time="2019-08-14T16:08:39.419431635+03:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc420836a20, CONNECTING" module=grpc
אוג 14 16:08:39 ofirm-X580VD dockerd[21851]: time="2019-08-14T16:08:39.419437883+03:00" level=info msg="blockingPicker: the picked transport is not ready, loop back to repick" module=grpc
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package docker-ce (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (229-4ubuntu21.22) ...
Processing triggers for ureadahead (0.100.0-19.1) ...
Errors were encountered while processing:
docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)
下列的这些说明,我运行了,check_config.sh
结果如下:
bash check_config.sh
warning: /proc/config.gz does not exist, searching other paths for kernel config ...
info: reading kernel config from /boot/config-4.15.0-58-generic ...
Generally Necessary:
- cgroup hierarchy: properly mounted [/sys/fs/cgroup]
- apparmor: enabled and tools installed
- CONFIG_NAMESPACES: enabled
- CONFIG_NET_NS: enabled
- CONFIG_PID_NS: enabled
- CONFIG_IPC_NS: enabled
- CONFIG_UTS_NS: enabled
- CONFIG_CGROUPS: enabled
- CONFIG_CGROUP_CPUACCT: enabled
- CONFIG_CGROUP_DEVICE: enabled
- CONFIG_CGROUP_FREEZER: enabled
- CONFIG_CGROUP_SCHED: enabled
- CONFIG_CPUSETS: enabled
- CONFIG_MEMCG: enabled
- CONFIG_KEYS: enabled
- CONFIG_VETH: enabled (as module)
- CONFIG_BRIDGE: enabled (as module)
- CONFIG_BRIDGE_NETFILTER: enabled (as module)
- CONFIG_NF_NAT_IPV4: enabled (as module)
- CONFIG_IP_NF_FILTER: enabled (as module)
- CONFIG_IP_NF_TARGET_MASQUERADE: enabled (as module)
- CONFIG_NETFILTER_XT_MATCH_ADDRTYPE: enabled (as module)
- CONFIG_NETFILTER_XT_MATCH_CONNTRACK: enabled (as module)
- CONFIG_NETFILTER_XT_MATCH_IPVS: enabled (as module)
- CONFIG_IP_NF_NAT: enabled (as module)
- CONFIG_NF_NAT: enabled (as module)
- CONFIG_NF_NAT_NEEDED: enabled
- CONFIG_POSIX_MQUEUE: enabled
Optional Features:
- CONFIG_USER_NS: enabled
- CONFIG_SECCOMP: enabled
- CONFIG_CGROUP_PIDS: enabled
- CONFIG_MEMCG_SWAP: enabled
- CONFIG_MEMCG_SWAP_ENABLED: missing
(cgroup swap accounting is currently not enabled, you can enable it by setting boot option "swapaccount=1")
- CONFIG_LEGACY_VSYSCALL_EMULATE: enabled
- CONFIG_BLK_CGROUP: enabled
- CONFIG_BLK_DEV_THROTTLING: enabled
- CONFIG_IOSCHED_CFQ: enabled
- CONFIG_CFQ_GROUP_IOSCHED: enabled
- CONFIG_CGROUP_PERF: enabled
- CONFIG_CGROUP_HUGETLB: enabled
- CONFIG_NET_CLS_CGROUP: enabled (as module)
- CONFIG_CGROUP_NET_PRIO: enabled
- CONFIG_CFS_BANDWIDTH: enabled
- CONFIG_FAIR_GROUP_SCHED: enabled
- CONFIG_RT_GROUP_SCHED: missing
- CONFIG_IP_NF_TARGET_REDIRECT: enabled (as module)
- CONFIG_IP_VS: enabled (as module)
- CONFIG_IP_VS_NFCT: enabled
- CONFIG_IP_VS_PROTO_TCP: enabled
- CONFIG_IP_VS_PROTO_UDP: enabled
- CONFIG_IP_VS_RR: enabled (as module)
- CONFIG_EXT4_FS: enabled
- CONFIG_EXT4_FS_POSIX_ACL: enabled
- CONFIG_EXT4_FS_SECURITY: enabled
- Network Drivers:
- "overlay":
- CONFIG_VXLAN: enabled (as module)
- CONFIG_BRIDGE_VLAN_FILTERING: enabled
Optional (for encrypted networks):
- CONFIG_CRYPTO: enabled
- CONFIG_CRYPTO_AEAD: enabled
- CONFIG_CRYPTO_GCM: enabled
- CONFIG_CRYPTO_SEQIV: enabled
- CONFIG_CRYPTO_GHASH: enabled
- CONFIG_XFRM: enabled
- CONFIG_XFRM_USER: enabled (as module)
- CONFIG_XFRM_ALGO: enabled (as module)
- CONFIG_INET_ESP: enabled (as module)
- CONFIG_INET_XFRM_MODE_TRANSPORT: enabled (as module)
- "ipvlan":
- CONFIG_IPVLAN: enabled (as module)
- "macvlan":
- CONFIG_MACVLAN: enabled (as module)
- CONFIG_DUMMY: enabled (as module)
- "ftp,tftp client in container":
- CONFIG_NF_NAT_FTP: enabled (as module)
- CONFIG_NF_CONNTRACK_FTP: enabled (as module)
- CONFIG_NF_NAT_TFTP: enabled (as module)
- CONFIG_NF_CONNTRACK_TFTP: enabled (as module)
- Storage Drivers:
- "aufs":
- CONFIG_AUFS_FS: enabled (as module)
- "btrfs":
- CONFIG_BTRFS_FS: enabled (as module)
- CONFIG_BTRFS_FS_POSIX_ACL: enabled
- "devicemapper":
- CONFIG_BLK_DEV_DM: enabled
- CONFIG_DM_THIN_PROVISIONING: enabled (as module)
- "overlay":
- CONFIG_OVERLAY_FS: enabled (as module)
- "zfs":
- /dev/zfs: missing
- zfs command: missing
- zpool command: missing
Limits:
- /proc/sys/kernel/keys/root_maxkeys: 1000000
journalctl -xe
运行后输出sudo systemctl start docker
:
אוג 14 16:47:01 ofirm-X580VD sudo[4613]: ofirm : TTY=pts/2 ; PWD=/home/ofirm ; USER=root ; COMMAND=/bin/systemctl start docker
אוג 14 16:47:01 ofirm-X580VD sudo[4613]: pam_unix(sudo:session): session opened for user root by (uid=0)
אוג 14 16:47:01 ofirm-X580VD systemd[1]: Starting Docker Socket for the API.
-- Subject: Unit docker.socket has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has begun starting up.
אוג 14 16:47:01 ofirm-X580VD systemd[1]: Starting containerd container runtime...
-- Subject: Unit containerd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit containerd.service has begun starting up.
אוג 14 16:47:01 ofirm-X580VD systemd[1]: Listening on Docker Socket for the API.
-- Subject: Unit docker.socket has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has finished starting up.
--
-- The start-up result is done.
אוג 14 16:47:01 ofirm-X580VD systemd[1]: Started containerd container runtime.
-- Subject: Unit containerd.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit containerd.service has finished starting up.
--
-- The start-up result is done.
אוג 14 16:47:01 ofirm-X580VD systemd[1]: Starting Docker Application Container Engine...
-- Subject: Unit docker.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has begun starting up.
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: time="2019-08-14T16:47:01.662754633+03:00" level=info msg="starting containerd" revision=894b81a4b802e4eb2a91d1ce216b8817763c29fb version=1.2.6
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: time="2019-08-14T16:47:01.664551472+03:00" level=info msg="loading plugin "io.containerd.content.v1.content"..." type=io.containerd.content.v1
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: time="2019-08-14T16:47:01.664592642+03:00" level=info msg="loading plugin "io.containerd.snapshotter.v1.btrfs"..." type=io.containerd.snapshotter.v1
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: time="2019-08-14T16:47:01.664806344+03:00" level=warning msg="failed to load plugin io.containerd.snapshotter.v1.btrfs" error="path /var/lib/containerd/io.co
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: time="2019-08-14T16:47:01.664873131+03:00" level=info msg="loading plugin "io.containerd.snapshotter.v1.aufs"..." type=io.containerd.snapshotter.v1
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: time="2019-08-14T16:47:01.666242170+03:00" level=info msg="loading plugin "io.containerd.snapshotter.v1.native"..." type=io.containerd.snapshotter.v1
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: time="2019-08-14T16:47:01.666276833+03:00" level=info msg="loading plugin "io.containerd.snapshotter.v1.overlayfs"..." type=io.containerd.snapshotter.v1
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: time="2019-08-14T16:47:01.666339525+03:00" level=info msg="loading plugin "io.containerd.snapshotter.v1.zfs"..." type=io.containerd.snapshotter.v1
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: time="2019-08-14T16:47:01.666537375+03:00" level=warning msg="failed to load plugin io.containerd.snapshotter.v1.zfs" error="path /var/lib/containerd/io.cont
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: time="2019-08-14T16:47:01.666547201+03:00" level=info msg="loading plugin "io.containerd.metadata.v1.bolt"..." type=io.containerd.metadata.v1
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: time="2019-08-14T16:47:01.666557591+03:00" level=warning msg="could not use snapshotter zfs in metadata plugin" error="path /var/lib/containerd/io.containerd
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: time="2019-08-14T16:47:01.666562135+03:00" level=warning msg="could not use snapshotter btrfs in metadata plugin" error="path /var/lib/containerd/io.containe
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: panic: invalid freelist page: 29, page type is leaf
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: goroutine 1 [running]:
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: github.com/containerd/containerd/vendor/go.etcd.io/bbolt.(*freelist).read(0xc00032eb70, 0x7fa8513f3000)
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: /go/src/github.com/containerd/containerd/vendor/go.etcd.io/bbolt/freelist.go:237 +0x31f
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: github.com/containerd/containerd/vendor/go.etcd.io/bbolt.(*DB).loadFreelist.func1()
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: /go/src/github.com/containerd/containerd/vendor/go.etcd.io/bbolt/db.go:292 +0x119
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: sync.(*Once).Do(0xc00030e148, 0xc0004ef4a0)
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: /.GOROOT/src/sync/once.go:44 +0xb5
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: github.com/containerd/containerd/vendor/go.etcd.io/bbolt.(*DB).loadFreelist(0xc00030e000)
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: /go/src/github.com/containerd/containerd/vendor/go.etcd.io/bbolt/db.go:285 +0x58
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: github.com/containerd/containerd/vendor/go.etcd.io/bbolt.Open(0xc000352dc0, 0x3a, 0x5588000001a4, 0x5588581e6b20, 0xc00036bca8, 0x1, 0x0)
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: /go/src/github.com/containerd/containerd/vendor/go.etcd.io/bbolt/db.go:262 +0x2e8
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: github.com/containerd/containerd/services/server.LoadPlugins.func2(0xc000307340, 0x558856da6bf5, 0xf, 0xc0001edcc0, 0x1e)
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: /go/src/github.com/containerd/containerd/services/server/server.go:264 +0x494
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: github.com/containerd/containerd/plugin.(*Registration).Init(0xc00034a5f0, 0xc000307340, 0xc00034a5f0)
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: /go/src/github.com/containerd/containerd/plugin/plugin.go:97 +0x3a
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: github.com/containerd/containerd/services/server.New(0x5588576f5f00, 0xc00003e018, 0xc00036a120, 0x1, 0xc0004efc90, 0x0)
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: /go/src/github.com/containerd/containerd/services/server/server.go:120 +0x541
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: github.com/containerd/containerd/cmd/containerd/command.App.func1(0xc0001b4000, 0xc0001b4000, 0xc0004efd17)
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: /go/src/github.com/containerd/containerd/cmd/containerd/command/main.go:141 +0x674
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: github.com/containerd/containerd/vendor/github.com/urfave/cli.HandleAction(0x5588574c2980, 0x5588576ceee8, 0xc0001b4000, 0xc0003461e0, 0x0)
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: /go/src/github.com/containerd/containerd/vendor/github.com/urfave/cli/app.go:502 +0xca
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: github.com/containerd/containerd/vendor/github.com/urfave/cli.(*App).Run(0xc0001ac000, 0xc00003a1b0, 0x1, 0x1, 0x0, 0x0)
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: /go/src/github.com/containerd/containerd/vendor/github.com/urfave/cli/app.go:268 +0x5b9
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: main.main()
אוג 14 16:47:01 ofirm-X580VD containerd[4628]: github.com/containerd/containerd/cmd/containerd/main.go:33 +0x51
אוג 14 16:47:01 ofirm-X580VD systemd[1]: containerd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
אוג 14 16:47:01 ofirm-X580VD systemd[1]: containerd.service: Unit entered failed state.
אוג 14 16:47:01 ofirm-X580VD systemd[1]: containerd.service: Failed with result 'exit-code'.
אוג 14 16:47:01 ofirm-X580VD sudo[4613]: pam_unix(sudo:session): session closed for user root
אוג 14 16:47:01 ofirm-X580VD systemd[1]: Stopped Docker Application Container Engine.
-- Subject: Unit docker.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has finished shutting down.
אוג 14 16:47:01 ofirm-X580VD systemd[1]: Closed Docker Socket for the API.
-- Subject: Unit docker.socket has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has finished shutting down.
אוג 14 16:47:11 ofirm-X580VD sudo[4688]: ofirm : TTY=pts/2 ; PWD=/home/ofirm ; USER=root ; COMMAND=/bin/journalctl -e
אוג 14 16:47:11 ofirm-X580VD sudo[4688]: pam_unix(sudo:session): session opened for user root by (uid=0)
אוג 14 16:48:27 ofirm-X580VD sudo[4688]: pam_unix(sudo:session): session closed for user root
אוג 14 16:48:31 ofirm-X580VD sudo[4762]: ofirm : TTY=pts/2 ; PWD=/home/ofirm ; USER=root ; COMMAND=/bin/journalctl -ex
אוג 14 16:48:31 ofirm-X580VD sudo[4762]: pam_unix(sudo:session): session opened for user root by (uid=0)
请注意我关注这些说明安装和卸载:
更新:
运行后dockerd --debug
,运行docker命令就可以了。