Unable to use Docker, even though the demon is active - docker

OS: Ubuntu LTS 22.4 | LTS 20.04
I had the same problem on ubuntu LTS 22.4 soo I downgraded to 20.04. I tried following all StackOverflow threads none of the solutions seems to work for me. I am not behind any proxy.
docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": proxyconnect tcp: dial tcp: lookup http: Temporary failure in name resolution.
Docker servic seems to be working just okay:
Similar error on trying to login:
If any additional detail is required let me know in the comments, ill edit!
Status logs:
Aug 15 11:15:19 asus systemd[1]: Started Docker Application Container Engine.
Aug 15 11:15:19 asus dockerd[9448]: time="2022-08-15T11:15:19.531101032+05:30" level=info msg="API listen on /run/docker.sock"
Aug 15 11:15:57 asus dockerd[9448]: time="2022-08-15T11:15:57.920565157+05:30" level=warning msg="Error getting v2 registry: Get \"https://registry-1.docker.io/v2/\": proxyconnect tcp: dial tcp: lookup http: no such host"
Aug 15 11:15:57 asus dockerd[9448]: time="2022-08-15T11:15:57.920602673+05:30" level=info msg="Attempting next endpoint for pull after error: Get \"https://registry-1.docker.io/v2/\": proxyconnect tcp: dial tcp: lookup http: no such host"
Aug 15 11:15:57 asus dockerd[9448]: time="2022-08-15T11:15:57.922360289+05:30" level=error msg="Handler for POST /v1.41/images/create returned error: Get \"https://registry-1.docker.io/v2/\": proxyconnect tcp: dial tcp: lookup http: no such host"
Aug 15 11:18:45 asus dockerd[9448]: time="2022-08-15T11:18:45.641224726+05:30" level=warning msg="Error getting v2 registry: Get \"https://registry-1.docker.io/v2/\": proxyconnect tcp: dial tcp: lookup http: no such host"
Aug 15 11:18:45 asus dockerd[9448]: time="2022-08-15T11:18:45.641275059+05:30" level=info msg="Attempting next endpoint for pull after error: Get \"https://registry-1.docker.io/v2/\": proxyconnect tcp: dial tcp: lookup http: no such host"
Aug 15 11:18:45 asus dockerd[9448]: time="2022-08-15T11:18:45.643035998+05:30" level=error msg="Handler for POST /v1.41/images/create returned error: Get \"https://registry-1.docker.io/v2/\": proxyconnect tcp: dial tcp: lookup http: no such host"
Aug 15 11:24:07 asus dockerd[9448]: time="2022-08-15T11:24:07.919119361+05:30" level=info msg="Error logging in to endpoint, trying next endpoint" error="Get \"https://registry-1.docker.io/v2/\": proxyconnect tcp: dial tcp: lookup http: no such host"
Aug 15 11:24:07 asus dockerd[9448]: time="2022-08-15T11:24:07.919328823+05:30" level=error msg="Handler for POST /v1.41/auth returned error: Get \"https://registry-1.docker.io/v2/\": proxyconnect tcp: dial tcp: lookup http: no such host"
lines 1-23
journalctl logs:
sudo journalctl -fu docker.service
[sudo] password for rhythm:
-- Logs begin at Mon 2022-08-15 02:04:27 IST. --
Aug 15 13:18:20 asus dockerd[12520]: time="2022-08-15T13:18:20.454180157+05:30" level=info msg="Loading containers: done."
Aug 15 13:18:20 asus dockerd[12520]: time="2022-08-15T13:18:20.463895293+05:30" level=info msg="Docker daemon" commit=a89b842 graphdriver(s)=overlay2 version=20.10.17
Aug 15 13:18:20 asus dockerd[12520]: time="2022-08-15T13:18:20.463955619+05:30" level=info msg="Daemon has completed initialization"
Aug 15 13:18:20 asus systemd[1]: Started Docker Application Container Engine.
Aug 15 13:18:20 asus dockerd[12520]: time="2022-08-15T13:18:20.481004111+05:30" level=info msg="API listen on /run/docker.sock"
Aug 15 13:19:19 asus dockerd[12520]: time="2022-08-15T13:19:19.377705065+05:30" level=warning msg="Error getting v2 registry: Get \"https://registry-1.docker.io/v2/\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
Aug 15 13:19:19 asus dockerd[12520]: time="2022-08-15T13:19:19.377835945+05:30" level=info msg="Attempting next endpoint for pull after error: Get \"https://registry-1.docker.io/v2/\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
Aug 15 13:19:19 asus dockerd[12520]: time="2022-08-15T13:19:19.385691924+05:30" level=error msg="Handler for POST /v1.41/images/create returned error: Get \"https://registry-1.docker.io/v2/\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
Aug 15 13:30:26 asus dockerd[12520]: time="2022-08-15T13:30:26.166694545+05:30" level=info msg="Error logging in to endpoint, trying next endpoint" error="Get \"https://registry-1.docker.io/v2/\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
Aug 15 13:30:26 asus dockerd[12520]: time="2022-08-15T13:30:26.166963331+05:30" level=error msg="Handler for POST /v1.41/auth returned error: Get \"https://registry-1.docker.io/v2/\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"

Related

Docker image pull - received unexpected HTTP status: 502 Bad Gateway

I'm trying to pull a docker image from our insecure private docker registry. But it fails with below given error.
Environment:-
Ubuntu 20.04.4 LTS
Docker version 20.10.16, build aa7e414
$ cat /etc/docker/daemon.json
{
"insecure-registries": ["private-registry:8080"]
}
Problem:-
$ docker pull private-registry:8080/docker/image/linux:1.1
Error response from daemon: received unexpected HTTP status: 502 Bad Gateway
$ sudo systemctl status docker.service
May 31 07:49:58 server-1 dockerd[3596]: time="2022-05-31T07:49:58.200818890+05:30" level=warning msg="Error getting v2 registry: Get \"https://private-registry>
May 31 07:49:58 server-1 dockerd[3596]: time="2022-05-31T07:49:58.200866976+05:30" level=info msg="Attempting next endpoint for pull after error: Get \">
May 31 07:49:58 server-1 dockerd[3596]: time="2022-05-31T07:49:58.208355568+05:30" level=info msg="Attempting next endpoint for pull after error: receiv>
May 31 07:49:58 server-1 dockerd[3596]: time="2022-05-31T07:49:58.211891361+05:30" level=error msg="Handler for POST /v1.41/images/create returned error>
Any help will be appreciated to solve this problem. thanks!
Problem solved after rebooting our docker private registry server.

Docker fails with "failed to start containerd: timeout waiting for containerd to start"

I have docker installed on Ubuntu 18.04.2 with snap.
When I try to start docker it fails with the following error log.
2020-07-16T23:49:14Z docker.dockerd[932]: failed to start containerd: timeout waiting for containerd to start
2020-07-16T23:49:14Z systemd[1]: snap.docker.dockerd.service: Main process exited, code=exited, status=1/FAILURE
2020-07-16T23:49:14Z systemd[1]: snap.docker.dockerd.service: Failed with result 'exit-code'.
2020-07-16T23:49:14Z systemd[1]: snap.docker.dockerd.service: Service hold-off time over, scheduling restart.
2020-07-16T23:49:14Z systemd[1]: snap.docker.dockerd.service: Scheduled restart job, restart counter is at 68.
2020-07-16T23:49:14Z systemd[1]: Stopped Service for snap application docker.dockerd.
2020-07-16T23:49:14Z systemd[1]: Started Service for snap application docker.dockerd.
It goes over and over into a restart loop. What should I do to get docker working again?
In this case, docker was waiting for containerd to start. The containerd pid is located at
/var/snap/docker/471/run/docker/containerd/containerd.pid.
This pid didn't exist. But the file was not deleted when the server was unceremoniously shutdown. Deleting this file allows the containerd process to start again, and problem is solved. I believe similar problems exist out there where docker.pid file also points to a non-existent pid.
Ive also faced error while dialing: dial unix:///var/run/docker/containerd/containerd.sock: timeout on fresh docker install on Arch linux today.
Ive installed docker and tried to start it:
sudo systemctl enable docker
sudo systemctl start docker
It dont start: sudo systemctl status docker says:
× docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2022-02-20 20:29:53 +03; 8s ago
TriggeredBy: × docker.socket
Docs: https://docs.docker.com
Process: 8368 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
Main PID: 8368 (code=exited, status=1/FAILURE)
CPU: 414ms
Feb 20 20:29:53 V-LINUX-087 systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Feb 20 20:29:53 V-LINUX-087 systemd[1]: Stopped Docker Application Container Engine.
Feb 20 20:29:53 V-LINUX-087 systemd[1]: docker.service: Start request repeated too quickly.
Feb 20 20:29:53 V-LINUX-087 systemd[1]: docker.service: Failed with result 'exit-code'.
Feb 20 20:29:53 V-LINUX-087 systemd[1]: Failed to start Docker Application Container Engine.
I managed to get more info after executing sudo dockerd:
$ sudo dockerd
INFO[2022-02-20T20:32:05.923357711+03:00] Starting up
INFO[2022-02-20T20:32:05.924015767+03:00] libcontainerd: started new containerd process pid=8618
INFO[2022-02-20T20:32:05.924036777+03:00] parsed scheme: "unix" module=grpc
INFO[2022-02-20T20:32:05.924043494+03:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2022-02-20T20:32:05.924058420+03:00] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2022-02-20T20:32:05.924068315+03:00] ClientConn switching balancer to "pick_first" module=grpc
containerd: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by containerd)
ERRO[2022-02-20T20:32:05.924198775+03:00] containerd did not exit successfully error="exit status 1" module=libcontainerd
WARN[2022-02-20T20:32:06.925000686+03:00] grpc: addrConn.createTransport failed to connect to {unix:///var/run/docker/containerd/containerd.sock <nil> 0 <nil>}. Err :connection error: desc = "transport: error while dialing: dial unix:///var/run/docker/containerd/containerd.sock: timeout". Reconnecting... module=grpc
WARN[2022-02-20T20:32:09.397384787+03:00] grpc: addrConn.createTransport failed to connect to {unix:///var/run/docker/containerd/containerd.sock <nil> 0 <nil>}. Err :connection error: desc = "transport: error while dialing: dial unix:///var/run/docker/containerd/containerd.sock: timeout". Reconnecting... module=grpc
WARN[2022-02-20T20:32:13.645272915+03:00] grpc: addrConn.createTransport failed to connect to {unix:///var/run/docker/containerd/containerd.sock <nil> 0 <nil>}. Err :connection error: desc = "transport: error while dialing: dial unix:///var/run/docker/containerd/containerd.sock: timeout". Reconnecting... module=grpc
WARN[2022-02-20T20:32:19.417671818+03:00] grpc: addrConn.createTransport failed to connect to {unix:///var/run/docker/containerd/containerd.sock <nil> 0 <nil>}. Err :connection error: desc = "transport: error while dialing: dial unix:///var/run/docker/containerd/containerd.sock: timeout". Reconnecting... module=grpc
failed to start containerd: timeout waiting for containerd to start
So it seems like containerd could not start in my case.
I tried sudo containerd and voila:
$ sudo containerd
containerd: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by containerd)
On my OS (Arch linux) the solution was to update the package:
sudo pacman -S lib32-glibc
If may be just sudo pacman -S glibc for someone on arch linux as weel

Docker container start issue

I am trying to start docker containers, Seems like it has failed. After Analyzing DockerD logs.
ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Mar 13 21:37:58 ubuntu-nuc2 dockerd[692]: time="2020-03-13T21:37:58.277230495Z" level=error msg="stream copy error: reading from a closed fifo"
Mar 13 21:37:58 ubuntu-nuc2 dockerd[692]: time="2020-03-13T21:37:58.277625568Z" level=error msg="stream copy error: reading from a closed fifo"
Mar 13 21:37:58 ubuntu-nuc2 dockerd[692]: time="2020-03-13T21:37:58.364681832Z" level=error msg="54dd3a9bfcbcbcdddcc82350e8045985d8c8495ac465e7e335c3a91b75bdf30b cleanup: failed to delete container from containerd: no such container"
Mar 13 21:37:58 ubuntu-nuc2 dockerd[692]: time="2020-03-13T21:37:58.364824367Z" level=error msg="Handler for POST /v1.25/containers/54dd3a9bfcbcbcdddcc82350e8045985d8c8495ac465e7e335c3a91b75bdf30b/start returned error: OCI runtime create failed: container_linux.go:349: starting container process caused \"process_linux.go:449: container init caused \\\"rootfs_linux.go:109: jailing process inside rootfs caused \\\\\\\"pivot_root invalid argument\\\\\\\"\\\"\": unknown"
Mar 13 21:37:59 ubuntu-nuc2 dockerd[692]: time="2020-03-13T21:37:59.159258456Z" level=error msg="8292a9a1eb9fccfe8848c57f3aaaf2c52c557c5b55b606112cdf66148fbba6d7 cleanup: failed to delete container from containerd: no such container"
Mar 13 21:37:59 ubuntu-nuc2 dockerd[692]: time="2020-03-13T21:37:59.159376298Z" level=error msg="Handler for POST /v1.25/containers/8292a9a1eb9fccfe8848c57f3aaaf2c52c557c5b55b606112cdf66148fbba6d7/start returned error: cgroups: cgroup mountpoint does not exist: unknown"
Mar 13 22:14:22 ubuntu-nuc2 dockerd[692]: time="2020-03-13T22:14:22.094213684Z" level=error msg="Error setting up exec command in container rwo_gluster-server_1: Container 54dd3a9bfcbcbcdddcc82350e8045985d8c8495ac465e7e335c3a91b75bdf30b is not running"
-- Reboot --
Mar 13 22:24:23 ubuntu-nuc2 systemd[1]: Starting Docker Application Container Engine...
I went through several threads for help and got this.
export DOCKER_RAMDISK=true
But not able to figure out what is happening, Why Containers failed due to pivot_root error?
Docker-compose.yml:
gluster-server:
image: edge/glusterfs-rest:7
entrypoint: dumb-init glusterd --no-daemon --pid-file=/var/run/glusterd.pid
restart: unless-stopped
privileged: true
ipc: host
network_mode: host
# pid: host
userns_mode: host
volumes:
- gluster_database_vol:/var/lib/glusterd
- docker_pid_vol:/var/run
- /mnt:/mnt:shared
- /dev:/dev
- /opt:/opt
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /var/log/glusterfs:/var/log/glusterfs:shared
- /etc/ssl:/etc/ssl
depends_on:
- app-docker
- gluster-rest
- gluster-security-enabler

Docker (daemon) on Windows 10 crashing when started: "hnsCall failed in Win32: The service has not been started", while hns service is happily running

I can't get docker to work on my Windows 10 machine all of a sudden, the docker daemon won't start. I can't seem to figure out what's going on, the debug output tells me that the hns service has not been started, but it is running.
This seems to only happen when I'm "switched" to running Windows containers, when I re-installed docker and it was running Linux containers, it seemed to work fine.
Ignore that (spoiler? SO doesn't want strikethrough text I guess), I just switched back to Linux containers and now get the same error.
This is the output of running dockerd from command line (with debug = true)
C:\Program Files\Docker\Docker\resources
λ dockerd
time="2019-10-31T11:03:23.425145500Z" level=info msg="Starting up"
time="2019-10-31T11:03:23.428147300Z" level=debug msg="Listener created for HTTP on npipe (//./pipe/docker_engine)"
time="2019-10-31T11:03:23.432148800Z" level=info msg="Windows default isolation mode: hyperv"
time="2019-10-31T11:03:23.432148800Z" level=debug msg="Stackdump - waiting signal at Global\\stackdump-19544"
time="2019-10-31T11:03:23.433145200Z" level=debug msg="Using default logging driver json-file"
time="2019-10-31T11:03:23.433145200Z" level=debug msg="[graphdriver] trying provided driver: windowsfilter"
time="2019-10-31T11:03:23.433145200Z" level=debug msg="WindowsGraphDriver InitFilter at C:\\ProgramData\\Docker\\windowsfilter"
time="2019-10-31T11:03:23.434161600Z" level=debug msg="Initialized graph driver windowsfilter"
time="2019-10-31T11:03:23.441159100Z" level=debug msg="Max Concurrent Downloads: 3"
time="2019-10-31T11:03:23.441159100Z" level=debug msg="Max Concurrent Uploads: 5"
time="2019-10-31T11:03:23.441159100Z" level=info msg="Loading containers: start."
time="2019-10-31T11:03:23.442144600Z" level=debug msg="Option Experimental: false"
time="2019-10-31T11:03:23.442144600Z" level=debug msg="Option DefaultDriver: nat"
time="2019-10-31T11:03:23.442144600Z" level=debug msg="Option DefaultNetwork: nat"
time="2019-10-31T11:03:23.442144600Z" level=debug msg="Network Control Plane MTU: 1500"
time="2019-10-31T11:03:23.442144600Z" level=info msg="Restoring existing overlay networks from HNS into docker"
time="2019-10-31T11:03:23.442144600Z" level=debug msg="[GET]=>[/networks/] Request : "
time="2019-10-31T11:03:23.447147300Z" level=debug msg="Network Response : [{\"ActivityId\":\"9A83FF02-21EB-49F0-879B-559444E6EC70\",\"AdditionalParams\":{},\"CurrentEndpointCount\":0,\"Extensions\":[{\"Id\":\"E7C3B2F0-F3C5-48DF-AF2B-10FED6D72E7A\",\"IsEnabled\":false,\"Name\":\"Microsoft Windows Filtering Platform\"},{\"Id\":\"E9B59CFA-2BE1-4B21-828F-B6FBDBDDC017\",\"IsEnabled\":false,\"Name\":\"Microsoft Azure VFP Switch Extension\"},{\"Id\":\"EA24CD6C-D17A-4348-9190-09F0D5BE83DD\",\"IsEnabled\":false,\"Name\":\"Microsoft NDIS Capture\"}],\"Flags\":0,\"Health\":{\"LastErrorCode\":0,\"LastUpdateTime\":132169931612174261},\"ID\":\"D63871DB-DF27-4EE6-80FB-6986CA4FDD2A\",\"IPv6\":false,\"LayeredOn\":\"7B01AE19-872A-416D-BA15-AF5CECD5F9E6\",\"MacPools\":[{\"EndMacAddress\":\"00-15-5D-74-AF-FF\",\"StartMacAddress\":\"00-15-5D-74-A0-00\"}],\"MaxConcurrentEndpoints\":0,\"Name\":\"My New Virtual Switch\",\"Policies\":[],\"State\":1,\"TotalEndpoints\":0,\"Type\":\"Transparent\",\"Version\":42949672963,\"Resources\":{\"AdditionalParams\":{},\"AllocationOrder\":0,\"CompartmentOperationTime\":0,\"Flags\":0,\"Health\":{\"LastErrorCode\":0,\"LastUpdateTime\":132169931612174261},\"ID\":\"9A83FF02-21EB-49F0-879B-559444E6EC70\",\"PortOperationTime\":0,\"State\":1,\"SwitchOperationTime\":0,\"VfpOperationTime\":0,\"parentId\":\"18DF5BED-03C6-4825-88D8-90F4DCB5473E\"}}]"
time="2019-10-31T11:03:23.449146500Z" level=debug msg="Network transparent (1c2f3a6) restored"
time="2019-10-31T11:03:23.462148900Z" level=debug msg="[GET]=>[/networks/] Request : "
time="2019-10-31T11:03:23.466149300Z" level=debug msg="Network Response : [{\"ActivityId\":\"9A83FF02-21EB-49F0-879B-559444E6EC70\",\"AdditionalParams\":{},\"CurrentEndpointCount\":0,\"Extensions\":[{\"Id\":\"E7C3B2F0-F3C5-48DF-AF2B-10FED6D72E7A\",\"IsEnabled\":false,\"Name\":\"Microsoft Windows Filtering Platform\"},{\"Id\":\"E9B59CFA-2BE1-4B21-828F-B6FBDBDDC017\",\"IsEnabled\":false,\"Name\":\"Microsoft Azure VFP Switch Extension\"},{\"Id\":\"EA24CD6C-D17A-4348-9190-09F0D5BE83DD\",\"IsEnabled\":false,\"Name\":\"Microsoft NDIS Capture\"}],\"Flags\":0,\"Health\":{\"LastErrorCode\":0,\"LastUpdateTime\":132169931612174261},\"ID\":\"D63871DB-DF27-4EE6-80FB-6986CA4FDD2A\",\"IPv6\":false,\"LayeredOn\":\"7B01AE19-872A-416D-BA15-AF5CECD5F9E6\",\"MacPools\":[{\"EndMacAddress\":\"00-15-5D-74-AF-FF\",\"StartMacAddress\":\"00-15-5D-74-A0-00\"}],\"MaxConcurrentEndpoints\":0,\"Name\":\"My New Virtual Switch\",\"Policies\":[],\"State\":1,\"TotalEndpoints\":0,\"Type\":\"Transparent\",\"Version\":42949672963,\"Resources\":{\"AdditionalParams\":{},\"AllocationOrder\":0,\"CompartmentOperationTime\":0,\"Flags\":0,\"Health\":{\"LastErrorCode\":0,\"LastUpdateTime\":132169931612174261},\"ID\":\"9A83FF02-21EB-49F0-879B-559444E6EC70\",\"PortOperationTime\":0,\"State\":1,\"SwitchOperationTime\":0,\"VfpOperationTime\":0,\"parentId\":\"18DF5BED-03C6-4825-88D8-90F4DCB5473E\"}}]"
time="2019-10-31T11:03:23.468145600Z" level=debug msg="Launching DNS server for network \"none\""
time="2019-10-31T11:03:23.477145800Z" level=debug msg="releasing IPv4 pools from network My New Virtual Switch (1c2f3a6ce8a7445896145d15e265b9eda4095d6f35c71ad872f3e733059940c6)"
time="2019-10-31T11:03:23.477145800Z" level=debug msg="ReleasePool(0.0.0.0/0)"
time="2019-10-31T11:03:23.480145100Z" level=debug msg="cleanupServiceDiscovery for network:1c2f3a6ce8a7445896145d15e265b9eda4095d6f35c71ad872f3e733059940c6"
time="2019-10-31T11:03:23.486145500Z" level=debug msg="Allocating IPv4 pools for network My New Virtual Switch (1c2f3a6ce8a7445896145d15e265b9eda4095d6f35c71ad872f3e733059940c6)"
time="2019-10-31T11:03:23.486145500Z" level=debug msg="RequestPool(LocalDefault, , , map[], false)"
time="2019-10-31T11:03:23.486145500Z" level=debug msg="RequestAddress(0.0.0.0/0, <nil>, map[RequestAddressType:com.docker.network.gateway])"
time="2019-10-31T11:03:23.487161600Z" level=debug msg="[GET]=>[/endpoints/] Request : "
time="2019-10-31T11:03:23.493144800Z" level=debug msg="Launching DNS server for network \"My New Virtual Switch\""
time="2019-10-31T11:03:23.493144800Z" level=debug msg="[GET]=>[/networks/D63871DB-DF27-4EE6-80FB-6986CA4FDD2A] Request : "
time="2019-10-31T11:03:23.497146600Z" level=debug msg="Network Response : {\"ActivityId\":\"9A83FF02-21EB-49F0-879B-559444E6EC70\",\"AdditionalParams\":{},\"CurrentEndpointCount\":0,\"Extensions\":[{\"Id\":\"E7C3B2F0-F3C5-48DF-AF2B-10FED6D72E7A\",\"IsEnabled\":false,\"Name\":\"Microsoft Windows Filtering Platform\"},{\"Id\":\"E9B59CFA-2BE1-4B21-828F-B6FBDBDDC017\",\"IsEnabled\":false,\"Name\":\"Microsoft Azure VFP Switch Extension\"},{\"Id\":\"EA24CD6C-D17A-4348-9190-09F0D5BE83DD\",\"IsEnabled\":false,\"Name\":\"Microsoft NDIS Capture\"}],\"Flags\":0,\"Health\":{\"LastErrorCode\":0,\"LastUpdateTime\":132169931612174261},\"ID\":\"D63871DB-DF27-4EE6-80FB-6986CA4FDD2A\",\"IPv6\":false,\"LayeredOn\":\"7B01AE19-872A-416D-BA15-AF5CECD5F9E6\",\"MacPools\":[{\"EndMacAddress\":\"00-15-5D-74-AF-FF\",\"StartMacAddress\":\"00-15-5D-74-A0-00\"}],\"MaxConcurrentEndpoints\":0,\"Name\":\"My New Virtual Switch\",\"Policies\":[],\"State\":1,\"TotalEndpoints\":0,\"Type\":\"Transparent\",\"Version\":42949672963,\"Resources\":{\"AdditionalParams\":{},\"AllocationOrder\":0,\"CompartmentOperationTime\":0,\"Flags\":0,\"Health\":{\"LastErrorCode\":0,\"LastUpdateTime\":132169931612174261},\"ID\":\"9A83FF02-21EB-49F0-879B-559444E6EC70\",\"PortOperationTime\":0,\"State\":1,\"SwitchOperationTime\":0,\"VfpOperationTime\":0,\"parentId\":\"18DF5BED-03C6-4825-88D8-90F4DCB5473E\"}}"
time="2019-10-31T11:03:23.507147200Z" level=debug msg="Allocating IPv4 pools for network nat (4456741d2c4fe47a5034db26ad9b1161c24ac18105ca4a71cf23cbe4fc6e3e88)"
time="2019-10-31T11:03:23.507147200Z" level=debug msg="RequestPool(LocalDefault, , , map[], false)"
time="2019-10-31T11:03:23.507147200Z" level=debug msg="RequestAddress(0.0.0.0/0, <nil>, map[RequestAddressType:com.docker.network.gateway])"
time="2019-10-31T11:03:23.507147200Z" level=debug msg="HNSNetwork Request ={\"Name\":\"nat\",\"Type\":\"nat\",\"Subnets\":[{\"AddressPrefix\":\"0.0.0.0/0\"}]} Address Space=[{0.0.0.0/0 []}]"
time="2019-10-31T11:03:23.507147200Z" level=debug msg="[POST]=>[/networks/] Request : {\"Name\":\"nat\",\"Type\":\"nat\",\"Subnets\":[{\"AddressPrefix\":\"0.0.0.0/0\"}]}"
time="2019-10-31T11:03:24.277127400Z" level=debug msg="releasing IPv4 pools from network nat (4456741d2c4fe47a5034db26ad9b1161c24ac18105ca4a71cf23cbe4fc6e3e88)"
time="2019-10-31T11:03:24.277127400Z" level=debug msg="ReleasePool(0.0.0.0/0)"
time="2019-10-31T11:03:24.277127400Z" level=debug msg="daemon configured with a 15 seconds minimum shutdown timeout" time="2019-10-31T11:03:24.278127100Z" level=debug msg="start clean shutdown of all containers with a 15 seconds timeout..."
failed to start daemon: Error initializing network controller: Error creating default network: hnsCall failed in Win32: The service has not been started. (0x426)
But this hns service is running already:
C:\Program Files\Docker\Docker\resources
λ net start hns
The requested service has already been started.
And in Task Manager > Services, I can see hns with Status: Running.
Any idea what's going on?
I've tried
uninstalling and re-installing docker
removing Hyper-V and re-adding Hyper-V to Windows,
added a new virtual switch in Hyper-V,
I saw something about removing a HNS data file, but there is no such file for me to remove (C:\ProgramData\Microsoft\Windows\HNS\ is empty),
starting and stopping hns service with net stop hns and net start hns.
I can't think of anything else to try besides just reformatting and starting up a new life with a family in Mexico.
I've uploaded like a thousand crash reports through the Docker for Windows interface, because when the service fails to start, they suggest that. I suspect some guy is very busy ignoring all of those. Obviously I expect nothing will come out of that, since there is no way for me to follow up on them.
Update 2020
I still get errors when switching to Windows containers, lol
Docker.Core.DockerException:
Error response from daemon: open \\.\pipe\docker_engine_windows: The system cannot find the file specified.
at Docker.Engines.DockerDaemonChecker.<CheckAsync>d__5.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\DockerDaemonChecker.cs:line 40
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.Engines.WindowsContainersEngine.<DoStartAsync>d__12.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WindowsContainersEngine.cs:line 52
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.TaskExtensions.<WrapAsyncInCancellationException>d__0.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line 29
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 67
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 92
And resetting to Factory Defaults did nothing to fix this: I "reset", switched to Windows containers, and got same error.
Update 2020 vol. deux
I found a way to follow up on the crash reports! I created an issue, I've never been so excited in my life.
https://github.com/docker/for-win/issues/8226

Kubernetes installation conflicts with docker-ce-17.03.0

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

Resources