Device docker0 does not exist

Configuration file at containers/app.yml updated successfully!

Device "docker0" does not exist.
Cannot connect to the docker daemon - verify it is running and you have access

After installing SMTP appers this. What I can do?

1 Like

Are you using Ubuntu? If not, you might switch. It’s the easiest to make work with docker.

A’m using VPS with Ubuntu-16.04-x86_64

How did you install docker?

By this instruction https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md

With command

wget -qO- https://get.docker.com/ | sh

Hmm. That’s strange. I did that a couple hours ago on digital ocean without any trouble. If you’re on digital ocean, I’m stumped. If not, then there’s something about the housing service. You can search here or on their site for docker hints.

Perhaps a reboot would help? (But no idea why.)

Did you run that command as root? If not is the user that ran it part of the docker group?

1 Like

In console I see root@185.145.253.103. I hpe It is root user

Didn’t helped. :frowning:

can I did some tests to found problem? :frowning:

This is what you need to do next. Is docker, in fact, running?

Looks like it’s not running. When I run anything from docker --help it returns:

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

As you said in another topic this was a droplet that had both Apache and Nginx installed, so can you please revert to a new droplet state and try again the official docs for installation?

4 Likes

And make sure it’s a standard Ubuntu image and not one with other stuff included.

2 Likes

FYI we have seen this behavior on Digital Ocean instances where the kernel is way out of date. Per @mpalmer

Aha, /var/log/upstart/docker.log sez, β€œYour Linux kernel version 3.8.0-29-generic is not supported for running docker. Please upgrade your kernel to 3.10.0 or newer.”

We found that after updating the kernel (this requires using the Digitial Ocean web UI, under Kernel tab) you have to also issue this command

apt-get -y install linux-image-extra-$(uname -r)

it is possible that

apt-get update
apt-get dist-upgrade

would also work, if issued after the kernel update and reboot.

2 Likes

@codinghorror I tried this for the same issue and no luck. apt-get dist-upgrade fails.

(public)coco@discourse-testing:/var/discourse$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  linux-image-3.13.0-24-generic linux-image-extra-3.13.0-24-generic
Use 'sudo apt autoremove' to remove them.
The following packages have been kept back:
  postgresql postgresql-contrib
The following packages will be upgraded:
  linux-firmware update-notifier-common
2 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Need to get 45.6 MB of archives.
After this operation, 10.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://sfo1.mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 update-notifier-common all 3.168.7 [164 kB]
Get:2 http://sfo1.mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 linux-firmware all 1.157.15 [45.5 MB]
Fetched 45.6 MB in 1s (38.4 MB/s)
(Reading database ... 90884 files and directories currently installed.)
Preparing to unpack .../update-notifier-common_3.168.7_all.deb ...
Unpacking update-notifier-common (3.168.7) over (3.168.5) ...
Preparing to unpack .../linux-firmware_1.157.15_all.deb ...
Unpacking linux-firmware (1.157.15) over (1.157.14) ...
Setting up update-notifier-common (3.168.7) ...
Setting up linux-firmware (1.157.15) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-112-generic
WARNING: missing /lib/modules/4.4.0-112-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.0-112-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_JKrvXZ/lib/modules/4.4.0-112-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_JKrvXZ/lib/modules/4.4.0-112-generic/modules.builtin: No such file or directory
update-initramfs: Generating /boot/initrd.img-4.4.0-28-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-24-generic
WARNING: missing /lib/modules/3.13.0-24-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/3.13.0-24-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_pkNDpy/lib/modules/3.13.0-24-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_pkNDpy/lib/modules/3.13.0-24-generic/modules.builtin: No such file or directory
$ service docker start
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'docker.socket'.
Authenticating as: root
Password:
==== AUTHENTICATION COMPLETE ===
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'docker.service'.
Authenticating as: root
Password:
==== AUTHENTICATION COMPLETE ===
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
$ systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: inactive (dead) (Result: exit-code) since Thu 2018-01-25 12:23:57 EST; 38s ago
     Docs: https://docs.docker.com
  Process: 2457 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 2457 (code=exited, status=1/FAILURE)
$ sudo journalctl -xe
Jan 25 12:23:57 discourse-testing systemd[1]: Stopping Docker Socket for the API.
-- Subject: Unit docker.socket has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has begun shutting down.
Jan 25 12:23:57 discourse-testing systemd[1]: Starting Docker Socket for the API.
-- Subject: Unit docker.socket has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has begun starting up.
Jan 25 12:23:57 discourse-testing systemd[1]: Listening on Docker Socket for the API.
-- Subject: Unit docker.socket has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has finished starting up.
--
-- The start-up result is done.
Jan 25 12:23:57 discourse-testing systemd[1]: docker.service: Start request repeated too quickly.
Jan 25 12:23:57 discourse-testing systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has failed.
--
-- The result is failed.
Jan 25 12:23:57 discourse-testing systemd[1]: docker.socket: Unit entered failed state.
Jan 25 12:25:01 discourse-testing CRON[2506]: pam_unix(cron:session): session opened for user root by (uid=0)
Jan 25 12:25:01 discourse-testing CRON[2507]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jan 25 12:25:01 discourse-testing CRON[2506]: pam_unix(cron:session): session closed for user root
Jan 25 12:25:33 discourse-testing sudo[2533]:     coco : TTY=pts/0 ; PWD=/var/discourse ; USER=root ; COMMAND=/bin/journalctl -x
Jan 25 12:25:33 discourse-testing sudo[2533]: pam_unix(sudo:session): session opened for user root by coco(uid=0)
$ sudo /usr/bin/dockerd -H fd:
WARN[2018-01-25T12:28:44.128769214-05:00] [!] DON'T BIND ON ANY IP ADDRESS WITHOUT setting --tlsverify IF YOU DON'T KNOW WHAT YOU'RE DOING [!]
listen tcp: lookup fd on 67.207.67.2:53: no such host

I just upgraded from Ubunto 14.04 to 16.04 on a Digital Ocean instance.

I’d recommend building a new dropet (you want to resize to one of the new ones anyway), starting with 16.04 and backup-restoring your data to the new site.

2 Likes

I’m trying to avoid doing so. We have a lot of data in Discourse and the downtime and change of IP are also factors. If I have to go this route then perhaps I can stay with 14.04.5.

All the more reason to move to a bigger droplet for the same price you’re paying now.

  • Get a digital ocean floating IP pointing to your current site
  • update DNS to point to floating IP
  • create new droplet and install Discourse
  • wait for DNS to propagate
  • back up old site, put in read-only mode
  • restore to new site
  • re-point floating IP to new site
  • change DNS to new IP (or not)

You’d have only a few minutes of read-only time and no downtime.

5 Likes

You make a compelling case. Good idea. Thanks.

1 Like