Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Docker installation problems

878 views
Skip to first unread message

Gary L. Roach

unread,
Jul 7, 2021, 7:30:03 PM7/7/21
to
Operating System: Debian GNU/Linux 10
KDE Plasma Version: 5.14.5
Qt Version: 5.11.3
KDE Frameworks Version: 5.54.0
Kernel Version: 4.19.0-17-amd64
OS Type: 64-bit
Processors: 4 × AMD FX(tm)-4350 Quad-Core Processor
Memory: 15.6 GiB of RAM

Hi All,

I'm still having installation problems with Docker. I followed the
Digital Ocean instructions for Debian 10 to the letter. Everything went
fine until I tried to run the test case. I got the following:

> root@debian:/home/gary# docker run hello-world
> docker: Cannot connect to the Docker daemon at
> unix:///var/run/docker.sock. Is the docker daemon running?.
> See 'docker run --help'.
> root@debian:/var/lib/docker# systemctl status docker
> ● docker.service - Docker Application Container Engine
>    Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor
> preset: enabled)
>    Active: failed (Result: exit-code) since Mon 2021-07-05 12:43:13
> PDT; 2 days ago
>      Docs: https://docs.docker.com
>  Main PID: 1026 (code=exited, status=1/FAILURE)
>
> Jul 05 12:43:13 debian systemd[1]: docker.service: Service
> RestartSec=2s expired, scheduling restart.
> Jul 05 12:43:13 debian systemd[1]: docker.service: Scheduled restart
> job, restart counter is at 3.
> Jul 05 12:43:13 debian systemd[1]: Stopped Docker Application
> Container Engine.
> Jul 05 12:43:13 debian systemd[1]: docker.service: Start request
> repeated too quickly.
> Jul 05 12:43:13 debian systemd[1]: docker.service: Failed with result
> 'exit-code'.
> Jul 05 12:43:13 debian systemd[1]: Failed to start Docker Application
> Container Engine.

I suspect that something might be wrong with the /etc/apt/daemon.json
file but am not sure what.

> root@debian:/etc/docker# less daemon.json
{
>   "debug": true,
>   "tls": true,
>   "tlscert": "/var/docker/server.pem",
>   "tlskey": "/var/docker/serverkey.pem",
>   "hosts": ["tcp://192.168.254.12:2376"]
> }
My installation doesn't seem to be very stable. I'm using the free
community edition if that helps. Any help will be sincerely appreciated.

Gary R.

IL Ka

unread,
Jul 7, 2021, 7:50:03 PM7/7/21
to
I suspect that something might be wrong with the /etc/apt/daemon.json
file but am not sure what.

Gary L. Roach

unread,
Jul 8, 2021, 12:50:05 PM7/8/21
to

Running dockerd produced the following:

root@debian:/etc/docker# dockerd
INFO[2021-07-08T09:44:02.344680610-07:00] Starting up                                  
failed to create API server: Could not load X509 key pair (cert: "/var/docker/server.pem", key: "/var/docker/serverkey.pem"): open /var/docker/server.pem: no such file or directory
On my system the /var/docker directory doesn't exist. Further, server.pem doesn't exist anywhere on my system. Now what?

Gary R.

john doe

unread,
Jul 8, 2021, 2:00:04 PM7/8/21
to
Looks like you need to generate that file (1).


1)
https://stackoverflow.com/questions/57830003/var-docker-server-pem-no-such-file-or-directory

--
John Doe

Alex Mestiashvili

unread,
Jul 8, 2021, 2:00:05 PM7/8/21
to
From my little experience, the default docker-ce installation comes
without daemon.json file. Try to remove it and see if docker comes up.

It also doesn't look like Debian related issue tbh, since it is a third
party package.

Alex

IL Ka

unread,
Jul 8, 2021, 2:00:05 PM7/8/21
to
failed to create API server: Could not load X509 key pair (cert: "/var/docker/server.pem", key: "/var/docker/serverkey.pem"): open /var/docker/server.pem: no such file or directory
On my system the /var/docker directory doesn't exist. Further, server.pem doesn't exist anywhere on my system. Now what?

But in your ``daemon.json`` you explicitly asked for TLS and even provided a path to these files.
(to enable TLS one needs a certificate (with public key) and private key for it)

Let's see if docker works without this file.

# mv /etc/docker/daemon.json /etc/docker/daemon.json.back
# dockerd

if it works, start it with ``systemd`` and see if it works



Gary L. Roach

unread,
Jul 8, 2021, 7:30:05 PM7/8/21
to
I reinstalled using the docker.com instructions and it works. I also
installed Portainer. It also works. I appreciate all of the help. Now
all I have to do is learn to use it.

Thanks again.

Gary R
0 new messages