I notice that in the error it says no such file or directory[/var/lib/docker|2462000b]. Does /var/lib/docker exist on your system? If not then I think you need to reinstall Docker.
– Ben WhaleyFeb 20 '14 at 5:46

3

I have the same problem (can't connect to a daemon that 'ps' shows is still running), except I don't get any 'file not found' messages when starting the daemon. /var/lib/docker does exist.
– Jonathan HartleyMar 24 '14 at 22:00

Same here, if I try this alone I often get Error checking TLS connection: Host is not running... running this eval after the command docker-machine start default did the trick.
– Emilio FerrucciMay 2 '16 at 17:28

macOS

On macOS the docker binary is only a client and you cannot use it to run the docker daemon, because Docker daemon uses Linux-specific kernel features, therefore you can’t run Docker natively in OS X. So you have to install docker-machine in order to create VM and attach to it.

Install docker-machine on macOS

If you don't have docker-machine command yet, install it by using one of the following methods:

After a detailed investigation, this issue seems to happen every time after Mac OS X is rebooted (or the Docker virtual machine is restarted) which prevents the Docker client from connecting to the Docker daemon.

So I belatedly realised that installing docker had maybe registered the daemon with upstart, which had started it for me. Hence, trying to kill the daemon to manually restart it fails (operation not permitted). So I did a

sudo kill -9 <PID>

on the daemon process. Another daemon immediately took its place, and this new one DOES now let my CLI client connect:

Linux/Windows

2018-5-20 note: the Docker CE app on macOS is pretty crappy. everytime I open it it just freeze right the way, can't do anything. I tried to Google and fix the problem, so far still working on it
– NamNamNamMay 20 '18 at 12:23

Docker Machine is a tool that lets you install Docker Engine on
virtual hosts, and manage the hosts with docker-machine commands. You
can use Machine to create Docker hosts on your local Mac or Windows
box, on your company network, in your data center, or on cloud
providers like AWS or Digital Ocean.

Using docker-machine commands, you can start, inspect, stop, and
restart a managed host, upgrade the Docker client and daemon, and
configure a Docker client to talk to your host.

Point the Machine CLI at a running, managed host, and you can run
docker commands directly on that host. For example, run
docker-machine env default to point to a host called default, follow on-screen
instructions to complete env setup, and run docker ps,
docker run hello-world, and so forth.

I also had the same issue. The problem was in sockets allocated to docker-daemon and docker-client.

First, permission was not set for the docker-client on docker.sock You can set it using "sudo usermod -aG docker $USER"

Then check your bash file where the docker-client is running, For me it was on 0.0.0.0:2375, while docker-daemon was running on unix socket.(It was set in the configuration file of dockerd).

Just comment the bash-line and it'll work fine.

But if you want to make it work on TCP port instead of unix socket, change the configuration file of dockerd and set it on 0.0.0.0.2375 and keep the line in bash as it is if present or set it to 0.0.0.0:2375.

Ok so I started having this problem today. Then I saw a lot of responses but none seem to have worked for me. First most of the instructions where directed to linux. And for the mac version they were all talking about running 'docker-machine'. I assume you use docker-machine if you install docker toolbox because then docker will be running in a virtual machine for windows and mac platforms. But its 2017 now and docker for mac is really stable hence no need for using the toolbox.

Not sure how the daemon stopped though. But to restart it all I had to do was go "Applications" and double click on the docker icon. I was asked to update and Relaunched which I accepted. After that everything worked like a charm.

Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).