我在使用我的 Docker 容器时遇到了问题,具体来说,这个laradock/laravel-horizon
容器,我不确定这是否相关。
我遇到的问题是我无法以任何有意义的方式解决容器问题,我可以停止/启动其他容器,但具体不是这个。
docker-composer down
成功关闭除 Horizon 之外的所有容器。
$ docker-compose down
Stopping laradock_caddy_1 ... done
Stopping laradock_redis_1 ... done
Stopping laradock_mysql_1 ... done
Stopping laradock_php-fpm_1 ... done
Stopping laradock_workspace_1 ... done
; and it just hangs here indefinitely
我尝试执行的与该特定容器相关的任何操作都只是无限期地挂起。
docker ps
显示容器已被终止。尝试启动它时,我
$ docker-compose up -d laravel-horizon
ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information.
$ docker-compose --verbose up -d laravel-horizon
输出如下。8bafeae5c107eef03c1887656dd9a1d188e6a6198d92da9a64ee1f1da05e9a60
是地平线容器。
...
compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=True, filters={u'label': [u'com.docker.compose.project=laradock', u'com.docker.compose.service=laravel-horizon', u'com.docker.compose.oneoff=False']})
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.25/containers/json?all=1&limit=-1&filters=%7B%22label%22%3A+%5B%22com.docker.compose.project%3Dlaradock%22%2C+%22com.docker.compose.service%3Dlaravel-horizon%22%2C+%22com.docker.compose.oneoff%3DFalse%22%5D%7D&trunc_cmd=0&size=0 HTTP/1.1" 200 1469
compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 1 items)
compose.cli.verbose_proxy.proxy_callable: docker inspect_container <- (u'8bafeae5c107eef03c1887656dd9a1d188e6a6198d92da9a64ee1f1da05e9a60')
此时我真的不知道该怎么做,解决办法是重启docker。但这个容器的问题似乎向上蔓延,因为尝试重启docker服务也不起作用了。
$ service docker restart
无限期地挂起
$ service docker stop
也无限期挂起。
$ service docker start
Failed to start docker.socket: Transaction is destructive.
See system logs and 'systemctl status docker.socket' for details.
$ systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/docker.service.d
└─10-machine.conf
Active: deactivating (stop-sigterm) since Sun 2020-01-05 21:43:59 CET; 23min ago
Docs: https://docs.docker.com
Main PID: 21179 (dockerd)
Tasks: 20
CGroup: /system.slice/docker.service
└─21179 /usr/bin/dockerd -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock --storage-driver overlay2 --tlsverify --tlscacert /etc/docker/ca.pem --tlscert /etc/docker/server.pem --tlskey /etc/docker/server-key.pem --label pro
jan 05 21:44:15 h2842287.stratoserver.net dockerd[21179]: time="2020-01-05T21:44:15.648373895+01:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc0005db690, CONNECTING" module=grpc
jan 05 21:44:15 h2842287.stratoserver.net dockerd[21179]: time="2020-01-05T21:44:15.649700557+01:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc0005db690, READY" module=grpc
jan 05 21:44:15 h2842287.stratoserver.net dockerd[21179]: time="2020-01-05T21:44:15.652821154+01:00" level=info msg="parsed scheme: \"unix\"" module=grpc
jan 05 21:44:15 h2842287.stratoserver.net dockerd[21179]: time="2020-01-05T21:44:15.652842939+01:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
jan 05 21:44:15 h2842287.stratoserver.net dockerd[21179]: time="2020-01-05T21:44:15.652865485+01:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 <nil>}] }" module=grpc
jan 05 21:44:15 h2842287.stratoserver.net dockerd[21179]: time="2020-01-05T21:44:15.652881868+01:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
jan 05 21:44:15 h2842287.stratoserver.net dockerd[21179]: time="2020-01-05T21:44:15.652942518+01:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc0005dbb70, CONNECTING" module=grpc
jan 05 21:44:15 h2842287.stratoserver.net dockerd[21179]: time="2020-01-05T21:44:15.653145900+01:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc0005dbb70, READY" module=grpc
jan 05 21:44:27 h2842287.stratoserver.net dockerd[21179]: time="2020-01-05T21:44:27.462931856+01:00" level=info msg="Loading containers: start."
jan 05 21:45:38 h2842287.stratoserver.net dockerd[21179]: time="2020-01-05T21:45:38.332807260+01:00" level=info msg="Processing signal 'terminated'"
我很茫然,我可以通过重新启动服务器来“修复”该问题,但问题仍然再次出现。
看起来 Docker 本身遇到了问题,我不知道从哪里开始寻找解决方案。