I am on ubuntu 14.04 and I also upgrade docker to recent version.
Whenever I do a sudo /etc/init.d/docker start I get a successful pid as follows,
docker start/running, process 16267
When I view the PID details, I see nothing -
ps -p 16267
PID TTY TIME CMD
And when I try to do a sudo docker version I see the below -
Client API version: 1.16
Go version (client): go1.2.1
OS/Arch (client): linux/amd64
2015/01/10 10:30:49 Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
The output of sudo docker -d is as follows,
[2015-01-12T21:05:59.889680188+08:00] [info] docker daemon: ; execdriver: native; graphdriver:
[2015-01-12T21:05:59.889800519+08:00] [83736c52] +job serveapi(unix:///var/run/docker.sock)
[2015-01-12T21:05:59.895688816+08:00] [info] Listening for HTTP on unix (/var/run/docker.sock)
[2015-01-12T21:05:59.904409095+08:00] [83736c52] +job init_networkdriver()
[2015-01-12T21:05:59.932947471+08:00] [83736c52] -job init_networkdriver() = OK (0)
[2015-01-12T21:05:59.933137366+08:00] [fatal] log.go:64 Could not locate dockerinit: This usually means docker was built incorrectly. See http://docs.docker.com/contributing/devenvironment for official build instructions.
I am not sure what is going wrong. Has anyone overcome similar issues? I am not even sure when I should check for more logs on this. Any directions on this will be helpful.
Thanks
You probably have a corrupted install.
Uninstall docker
Make sure you don't have a dockerinit (updatedb / locate dockerinit) -> delete it
Reinstall docker
This should do the trick.
If not, try uninstalling docker again and try with binaries from https://docs.docker.com/installation/binaries/.
Related
I have Microsoft Windows 10 Pro version 10.0.19041 N/A Build 19041 and I follow steps here https://learn.microsoft.com/en-us/windows/wsl/install-win10 to install Ubuntu 20.04 LTS on it using WLS2 , I'm doing so to install docker by following steps here https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
but when I try to run sudo docker run hello-world it gives me this error docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'. I know that a similar question asked here Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running? ,and I try to run systemctl daemon-reload and systemctl start docker but al the solutions does not worked for me it gives me another errors like System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down and Also try to fix it but I can't, So I need your help.
Note : I have already install Docker in windows and It works fine.
I have been solving this problem by following these steps
Purge the Grub package Linux command according this issue https://github.com/microsoft/WSL/issues/4903
Stop Docker Desktop from Windows
Run sudo dockerd which is the daemon service for Docker containers
https://i.stack.imgur.com/qgbwE.png
Open new Ubuntu shell session
Run docker run hello-world
and it's work fine with me https://i.stack.imgur.com/6TJ3u.png
I installed Dock via chocolatey install docker-toolbox. After installation, docker info is not working.
C:\Users\Chloe>docker info
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.37/info: open
//./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration
on Windows, the docker client must be run elevated to connect. This error may also indicate that the
docker daemon is not running.
C:\Users\Chloe>docker --version
Docker version 18.03.0-ce, build 0520e24302
https://docs.docker.com/get-started/#test-docker-version
I did run it from an Administrator shell.
Windows 8.1.
Had to run Start > Programs > Docker > Docker Quickstart Terminal which ran a lot of commands. Then in my original Console2 shell, I ran refreshenv. Then docker info would work. (I already had VirtualBox installed (choco install virtualbox).)
I've just install Docker on Mac OS 10.10.5 and ran Kitematic after that and got a hug error right away. This is the beginning of it, I can paste the rest if it will help
Command failed: /usr/local/bin/docker-machine -D start default,Docker
Machine Version: 0.7.0, build a650a40,Found binary path at
/usr/local/bin/docker-machine,Launching plugin server for driver
virtualbox,Plugin server listening at address 127.0.0.1:62284,()
Calling .GetVersion,Using API Version 1,() Calling .SetConfigRaw,()
Calling .GetMachineName,command=start machine=default,(default)
Calling .GetState,(default) DBG | COMMAND: /usr/local/bin/VBoxManage
showvminfo default --machinereadable,(default) DBG | STDOUT:,(default)
DBG
$ docker version
Client:
Version: 1.11.1
API version: 1.23
Go version: go1.5.4
Git commit: 5604cbe
Built: Tue Apr 26 23:44:17 2016
OS/Arch: darwin/amd64
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
$ docker info
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default - virtualbox Stopped Unknown
I've read the Get started with Docker Machine and a local VM one more time and found I need to run eval "$(docker-machine env default)" to setup the env-var for docker on Mac OS X.
I've followed the guide on http://docs.docker.io/en/latest/installation/mac/ which appears to work ok.
I can run docker version and docker ps etc but when I go to run a docker build . it starts uploading and returns with the message: "write tcp 127.0.0.1:4243: broken pipe" leaving me unable to build.
I logged into the VM boot2docker ssh, found the debug log at /var/lib/boot2docker/docker.log and noticed the first helpful messages:
2014/03/22 22:28:57 POST /v1.10/build?rm=1&t=foo
[debug] api.go:942 Warning: client and server don't have the same version (client: 0.9.0, server: 0.8.0)
[error] api.go:959 Error: Multipart upload for build is no longer supported. Please upgrade your docker client.
[error] api.go:91 HTTP Error: statusCode=500 Multipart upload for build is no longer supported. Please upgrade your docker client.
So my Mac client (host) Docker was v.9 and the daemon was .8. Not wanting to fiddle with the boot2docker image, I downgraded the client version of Docker to .8 by running:
rm /usr/local/bin/docker
cd ~/bin/
curl -o docker https://get.docker.io/builds/Darwin/x86_64/docker-0.8.0
sudo cp ~/bin/docker /usr/local/bin/
Then my image built ok.
I am trying to install devstack and docker (http://devstack.org/guides/single-machine.html) onto a VM containing Ubuntu 13.10 Server. devstack contains a docker installer script in tools/docker/install_docker.sh which it is recommended to run first before running the stack.sh installer script for devstack. I have patched the docker install script according to the bug report https://bugs.launchpad.net/devstack/+bug/1237581 however docker still reports a problem:
socat[NNNN] E connect(3, AF=1 "/var/run/docker.sock", 22): Connection refused
Does anyone know a fix for this problem?
Thanks,
David
If you get error messages regarding /var/run/docker.sock then either the docker daemon/service is not started or your user (devstack user) has no permissions.
Start docker:
service docker restart
Add your user (devstack user) to the docker group. Try to enumerate containers:
docker ps
If that still does not fix the problem then you might want to change the permission of /var/run/docker.sock directly:
sudo chown vagrant:vagrant /var/run/docker.sock
Check your kernel ( uname -a ) and make sure it is 3.8 or latest. Also, make sure you are on a 64bit Ubuntu ( X86_64 distribution ). The point is that the Docker daemon might not be starting (fails) because it is not supported on a 32 bit distribution.