Docker install doesn't start at system boot

Okay this is a weird forum interface - I go here and it tells me this is the bug tracker and go to /support - I go there and it says if I want to discuss in the community come back here. I’m confused so I’m going to post anyway, sorry if this is in the wrong place.

I’ve installed ownCloud server using docker-compose from the official docker-compose.yml. It’s set to restart automatically at boot.

For whatever reason when I reboot the server the owncloud/server:10.0.10 container fails:

48ae8b018790 owncloud/server:10.0.10 “/usr/bin/entrypoint…” 13 hours ago Exited (137) 3 minutes ago 0.0.0.0:85->8080/tcp app_owncloud_1

The containers for mariadb and redis continue humming along. I then have to go into the directory where the yml file is and do “docker-compose down” followed by “docker-compose up -d” and then everything is fine.

Any ideas what I’m doing wrong here? It should be pretty cut and dry and my google-fu is failing me, I can’t find anyone else reporting this problem.

NOTE: I just realized 10.2.0 is out (I had a hard time finding what the latest version was when I first installed) so I just changed to it. We’ll see if that helps.

NOTE2: Under 10.2.0 it still does the same thing:

:~$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
04bc71c47149 owncloud/server:10.2.0 “/usr/bin/entrypoint…” 9 minutes ago Exited (137) 4 minutes ago 0.0.0.0:85->8080/tcp app_owncloud_1
ca265b1bb90d webhippie/mariadb:latest “/usr/bin/entrypoint…” 9 minutes ago Up 3 minutes (healthy) 3306/tcp app_db_1
6b076915ae4a webhippie/redis:latest “/usr/bin/entrypoint…” 9 minutes ago Up 3 minutes (healthy) 6379/tcp app_redis_1

Hey,

maybe docker itself provides some additional logging to see why the container won’t start anymore?

Hi,
you should be able to see those additional logs using the following command:

docker logs app_owncloud_1

You can also use additional flags like -f for follow or --tail=100 to reduce the output to the latest 100 lines.

1 Like

No luck. Looks fine in the logs:

tony@ark:~$ docker ps -a
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS                        PORTS                                                                                                                            NAMES
3b83ee97ee04        owncloud/server:10.2.0      "/usr/bin/entrypoint…"   7 minutes ago       Exited (137) 4 minutes ago    0.0.0.0:85->8080/tcp                                                                                                             app_owncloud_1
b94d119bfc1e        webhippie/mariadb:latest    "/usr/bin/entrypoint…"   7 minutes ago       Up About a minute (healthy)   3306/tcp                                                                                                                         app_db_1
e783ed8936c5        webhippie/redis:latest      "/usr/bin/entrypoint…"   7 minutes ago       Up About a minute (healthy)   6379/tcp                                                                                                                         app_redis_1
5053bdc2b9a2        ovpn:latest                 "/bin/sh -c /root/st…"   10 days ago         Up About a minute             0.0.0.0:9091->9091/tcp, 52685/tcp                                                                                                openvpn
965ccb2852a0        calibre:latest              "/usr/bin/calibre-se…"   9 months ago        Up About a minute             0.0.0.0:8081->8080/tcp                                                                                                           calibre
ae5e2eabda3e        jacobalberty/unifi:stable   "/usr/local/bin/dock…"   12 months ago       Up About a minute (healthy)   0.0.0.0:8080->8080/tcp, 6789/tcp, 8843/tcp, 0.0.0.0:3478->3478/udp, 0.0.0.0:10001->10001/udp, 8880/tcp, 0.0.0.0:8443->8443/tcp   unifi
tony@ark:~$ docker logs app_owncloud_1
Creating volume folders...
Creating hook folders...
Waiting for MySQL...
wait-for-it: waiting 180 seconds for db:3306
wait-for-it: db:3306 is available after 0 seconds
Waiting for Redis...
wait-for-it: waiting 60 seconds for redis:6379
wait-for-it: redis:6379 is available after 0 seconds
Removing custom folder...
Linking custom folder...
Removing config folder...
Linking config folder...
Writing config file...
Fixing base perms...
Fixing data perms...
Fixing hook perms...
Upgrading server database...
ownCloud is already latest version
ownCloud is already latest version
Writing objectstore config...
Writing php config...
Updating htaccess config...
.htaccess has been updated
Writing apache config...
Enabling cron background...
Set mode for background jobs to 'cron'
Touching cron configs...
Starting cron daemon...
Starting apache daemon...
[Tue Jun 11 03:59:24.383028 2019] [mpm_prefork:notice] [pid 203] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Tue Jun 11 03:59:24.383078 2019] [core:notice] [pid 203] AH00094: Command line: '/usr/sbin/apache2 -f /etc/apache2/apache2.conf -D FOREGROUND'
172.18.0.1 - tony [11/Jun/2019:03:59:33 +0000] "PROPFIND /remote.php/dav/files/tony/ HTTP/1.0" 207 907 "-" "Mozilla/5.0 (Linux) mirall/2.5.4 (build 515)"
127.0.0.1 - - [11/Jun/2019:03:59:47 +0000] "GET /status.php HTTP/1.1" 200 1062 "-" "curl/7.58.0"
172.18.0.1 - tony [11/Jun/2019:03:59:50 +0000] "PROPFIND /remote.php/dav/files/tony/ HTTP/1.0" 207 908 "-" "Mozilla/5.0 (Linux) mirall/2.5.4 (build 515)"
172.18.0.1 - tony [11/Jun/2019:04:00:03 +0000] "PROPFIND /remote.php/dav/files/tony/ HTTP/1.0" 207 907 "-" "Mozilla/5.0 (Linux) mirall/2.5.4 (build 515)"
127.0.0.1 - - [11/Jun/2019:04:00:18 +0000] "GET /status.php HTTP/1.1" 200 1064 "-" "curl/7.58.0"
172.18.0.1 - tony [11/Jun/2019:04:00:22 +0000] "PROPFIND /remote.php/dav/files/tony/ HTTP/1.0" 207 908 "-" "Mozilla/5.0 (Linux) mirall/2.5.4 (build 515)"
172.18.0.1 - tony [11/Jun/2019:04:00:33 +0000] "PROPFIND /remote.php/dav/files/tony/ HTTP/1.0" 207 907 "-" "Mozilla/5.0 (Linux) mirall/2.5.4 (build 515)"
127.0.0.1 - - [11/Jun/2019:04:00:48 +0000] "GET /status.php HTTP/1.1" 200 1060 "-" "curl/7.58.0"
172.18.0.1 - tony [11/Jun/2019:04:00:54 +0000] "PROPFIND /remote.php/dav/files/tony/ HTTP/1.0" 207 908 "-" "Mozilla/5.0 (Linux) mirall/2.5.4 (build 515)"
172.18.0.1 - tony [11/Jun/2019:04:01:03 +0000] "PROPFIND /remote.php/dav/files/tony/ HTTP/1.0" 207 907 "-" "Mozilla/5.0 (Linux) mirall/2.5.4 (build 515)"
tony@ark:~$

Ok, so the logs look like the owncloud container even started serving requests, but then just went away?

This tells me it was probably killed from outside. How much memory do you have? Is there an OOM killer running? Check your docker0 (the system where your containers are running on) system logs, it should show if something was killed.
I quick search for your error ‘docker container exited 137’ confirms my theory.

1 Like

The system has 16 GB of RAM and with everything running only 5 GB is in use.

This only occurs at system startup and only affects the Apache container of ownCloud. The others keep running. Once i shut down and restart the containers with docker-compose they stay up fine until next reboot.

I’m not sure how to check the docker0 system logs…? Do you mean the logs in /var/log/kern.log?

Depends on your system, on a systemd linux system you should be able to analyze your logs with the journalctl command. Just search for ‘oom’ or ‘out of memory’.
Perhaps there are memory limits configured for the single containers, not sure how this exactly works, but that’s where I would look first.

1 Like