moby: docker fails on all commands with "404 page not found" error

I don’t know what happened but my work is completely paralyzed. I can’t do anything with existing containers. I get

Error response from daemon: 404 page not found

error on pretty much all commands.

I googled a lot and some people recommended adding

export NO_PROXY="/var/run/docker.sock

line to /etc/default/docker. It fixed “docker info” command but not the rest such as rm, start or restart.

I have:

  • Linux expert-linux 4.2.0-18-generic #22-Ubuntu SMP Fri Nov 6 18:25:50 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
  • docker version output

Client: Version: 1.9.0 API version: 1.21 Go version: go1.4.2 Git commit: 76d6bc9 Built: Tue Nov 3 17:54:53 UTC 2015 OS/Arch: linux/amd64 Server: Version: 1.9.0 API version: 1.21 Go version: go1.4.2 Git commit: 76d6bc9 Built: Tue Nov 3 17:54:53 UTC 2015 OS/Arch: linux/amd64`

  • docker info output

Containers: 2 Images: 58 Server Version: 1.9.0 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 62 Dirperm1 Supported: true Execution Driver: native-0.2 Logging Driver: json-file Kernel Version: 4.2.0-18-generic Operating System: Ubuntu 15.10 CPUs: 8 Total Memory: 15.61 GiB Name: expert-linux ID: 3RY6:E2ID:APBE:GB3U:N6CM:ZSUY:Q3KN:7E7L:LLN3:Q5CY:6XAS:NGAN Username: expert Registry: https://index.docker.io/v1/ WARNING: No swap limit support`

I tried reinstalling docker which also didn’t fix it.

It seems like it’s an issue with proxy setting and is some obvious bug. If I call unset http_proxy before running docker command it helps. With that I can remove container and recreate it again thus launching it. But doing so on every reboot is horrible.

Please help!!!

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 1
  • Comments: 57 (18 by maintainers)

Commits related to this issue

Most upvoted comments

I had the same issue:

docker version

Client:
 Version:      1.9.1
 API version:  1.21
 Go version:   go1.4.2
 Git commit:   a34a1d5
 Built:        Fri Nov 20 13:34:39 UTC 2015
 OS/Arch:      linux/amd64
Error response from daemon: 404 page not found

uname -a

Linux ********* 3.19.0-37-generic #42-Ubuntu SMP Fri Nov 20 18:22:05 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

systemctl status docker.service

● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since k 2015-12-01 10:31:51 CET; 1min 3s ago
     Docs: https://docs.docker.com
 Main PID: 6765 (code=exited, status=1/FAILURE)

dec 01 10:31:51 ********* systemd[1]: Starting Docker Application Container Engine...
dec 01 10:31:51 ********* docker[6765]: time="2015-12-01T10:31:51.082073428+01:00" level=info msg="API listen on /var/run/docker.sock"
dec 01 10:31:51 ********* docker[6765]: time="2015-12-01T10:31:51.082211982+01:00" level=info msg="API listen on [::]:2375"
dec 01 10:31:51 ********* docker[6765]: time="2015-12-01T10:31:51.084289048+01:00" level=info msg="[graphdriver] using prior storage driver \"aufs\""
dec 01 10:31:51 ********* docker[6765]: time="2015-12-01T10:31:51.135320794+01:00" level=info msg="Firewalld running: false"
dec 01 10:31:51 ********* docker[6765]: time="2015-12-01T10:31:51.172263879+01:00" level=fatal msg="Error starting daemon: Error initializing network controller: could not delete the default bridge network: network bridge has active endpoints"
dec 01 10:31:51 ********* systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
dec 01 10:31:51 ********* systemd[1]: Failed to start Docker Application Container Engine.
dec 01 10:31:51 ********* systemd[1]: Unit docker.service entered failed state.
dec 01 10:31:51 ********* systemd[1]: docker.service failed.

Running

sudo mv /var/lib/docker/network/files/ /path/to/backup/docker-network-files

solved the problem.

(If everything goes well, /path/to/backup/docker-network-files can be deleted)

@asziranyi so TL;DR

Curl 7.4x:

  • do not add a hostname
  • use http:, followed by the literal endpoint path (so /containers/json). Don’t use a double slash, as it’s used as path for the endpoint (//containers/json), so produces a 404

Curl 7.5x expects a valid url:

  • prepend a “dummy” hostname for the endpoint-path
  • use http:// (with double slash)

All my Docker containers stopped working. I am getting the same error message “404 page not found”.

After updating Docker, everything went awry!

In an attempt to fix the problem I verified that I had “docker-engine” version 17.03.0-ce, build 60ccb22.

I uninstalled the old docker and installed the new “docker-ce” version 17.03.1-ce, build c6d412e.

I also updated docker-composer to version 1.13.0, build 1719ceb.

The problem remains!

I am running Docker inside a CentOS 7.3.1611 VirtualBox.

I am under a lot of pressure to make this thing work again! Any help would be greatly appreciated.

Great news: seems I was able to get past this issue with the following commands.

$ sudo systemctl stop docker.socket
$ sudo systemctl disable docker.socket
$ sudo reboot
...
$ sudo systemctl start docker.service
$ sudo systemctl start docker.service

I have no idea why docker.socket was setup in systemd, instead of/in addition to docker.service. But removing it in this way seems to have solved the issue. I’m not getting the 404 message on my initial docker commands anymore.