Failed to restart docker.service after rebuild

(Christoph) #1

In order to upgrade to latest, I had to do one of those manual rebuilds (as instructed when I visited /admin/upgrade) and it didn’t go as smoothly as it used to.

Upon first try, ./launcher rebuild app failed saying Error response from daemon: grpc: the connection is unavailable At the same time, my forum was still running, I believe. I then did a systemctl restart docker which apparently didn’t work either because my forum was no longer accessible. So I just tried ./launcher rebuild app again and this time the rebuild worked but never finished properly. Here is where it got stuck:

Removing old container
+ /usr/bin/docker rm app

+ /usr/bin/docker run -d --restart=always -e LANG=en_US.UTF-8 -e HOME=/root -e RAILS_ENV=production -e UNICORN_WORKERS=3 -e UNICORN_SIDEKIQS=1 -e RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 -e RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 -e RUBY_GC_HEAP_INIT_SLOTS=400000 -e RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e DISCOURSE_HOSTNAME=**************** -e DISCOURSE_DEVELOPER_EMAILS=************************ -e DISCOURSE_SMTP_ADDRESS=********************* -e DISCOURSE_SMTP_PORT=587 -e DISCOURSE_SMTP_USER_NAME=SMTP_Injection -e DISCOURSE_SMTP_PASSWORD=********************************* -h Ubuntu-1604-xenial-64-minimal-app -e DOCKER_HOST_IP=************ --name app -t -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log --mac-address 02:74:aa:6e:81:c9 local_ discourse/app /sbin/boot     fcc194504a631e56de03a7a4bf99be2c422ef3565332b27037779aa6f51c8421
christoph@Ubuntu-1604-xenial-64-minimal:/var/discourse$ systemctl restart docker Failed to restart docker.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status docker.service' for details.

Actually, I am a bit confused about the systemctl restart docker command because it looks like I issued it but I definitely didn’t. Not after the rebuild.

In any case, I then tried systemctl status docker.service as instructed and got this:

christoph@Ubuntu-1604-xenial-64-minimal:/var/discourse$ systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: e
   Active: active (running) since Fri 2017-08-04 09:26:03 CEST; 56min ago
 Main PID: 30761 (dockerd)
    Tasks: 48
   Memory: 47.4M
      CPU: 58.220s
   CGroup: /system.slice/docker.service
           ├─ 5355 docker-containerd-shim fcc194504a631e56de03a7a4bf99be2c422ef3
           ├─30761 /usr/bin/dockerd -H fd://
           ├─30768 docker-containerd -l unix:///var/run/docker/libcontainerd/doc
           ├─31087 /usr/bin/docker-proxy -proto tcp -host-ip -host-port
           └─31112 docker-containerd-shim ee4cf418531ac247ade122924881e47da1a752
lines 1-14/14 (END)

Which looks like everything is working well. My forum also seems to be running just fine. Does that mean I’m fine? What was all the hiccup about?

In case it matters: before I was asked to to the manual rebuild, I had to update the docker manager (all update buttons grey, except for the docker manager). That update seemed to have gone fine.

(Joshua Rosenfeld) #2

Have you tried sudo ./launcher rebuild app?

(Christoph) #3

Yes, of course, it’s always with sudo. Should have mentioned it.

And I might add that it turned out that not everything was fine at all. I could no longer create neither posts nor emails:

Dunno if the two were related, though.