Troubleshoot the Docker daemon
This page describes how to troubleshoot and debug the daemon if you run into issues.
You can turn on debugging on the daemon to learn about the runtime activity of
the daemon and to aid in troubleshooting. If the daemon is unresponsive, you can
force a full stack trace of all
threads to be added to the daemon log by sending the
SIGUSR signal to the
If you use a
daemon.json file and also pass options to the
manually or using start-up scripts, and these options conflict, Docker fails to
start with an error such as:
unable to configure the Docker daemon with file /etc/docker/daemon.json: the following directives are specified both as a flag and in the configuration file: hosts: (from flag: [unix:///var/run/docker.sock], from file: [tcp://127.0.0.1:2376])
If you see an error similar to this one and you are starting the daemon manually
with flags, you may need to adjust your flags or the
daemon.json to remove the
Note: If you see this specific error, continue to the next section for a workaround.
If you are starting Docker using your operating system's init scripts, you may need to override the defaults in these scripts in ways that are specific to the operating system.
One notable example of a configuration conflict that is difficult to
troubleshoot is when you want to specify a different daemon address from the
default. Docker listens on a socket by default. On Debian and Ubuntu systems
systemd, this means that a host flag
-H is always used when starting
dockerd. If you specify a
hosts entry in the
daemon.json, this causes a
configuration conflict (as in the above message) and Docker fails to start.
To work around this problem, create a new file
/etc/systemd/system/docker.service.d/docker.conf with the following contents,
to remove the
-H argument that is used when starting the daemon by default.
[Service] ExecStart= ExecStart=/usr/bin/dockerd
There are other times when you might need to configure
systemd with Docker,
configuring a HTTP or HTTPS proxy.
Note: If you override this option and then do not specify a
hostsentry in the
-Hflag when starting Docker manually, Docker fails to start.
sudo systemctl daemon-reload before attempting to start Docker. If Docker
starts successfully, it is now listening on the IP address specified in the
hosts key of the
daemon.json instead of a socket.
daemon.jsonis not supported on Docker Desktop for Windows or Docker Desktop for Mac.
If your containers attempt to use more memory than the system has available, you may experience an Out of Memory (OOM) exception, and a container, or the Docker daemon, might be stopped by the kernel OOM killer. To prevent this from happening, ensure that your application runs on hosts with adequate memory and see Understand the risks of running out of memory.
The operating-system independent way to check whether Docker is running is to
ask Docker, using the
docker info command.
You can also use operating system utilities, such as
sudo systemctl is-active docker or
sudo status docker or
sudo service docker status, or checking the service status using Windows
Finally, you can check in the process list for the
dockerd process, using