Nextcloud AIO Hung Up on "Starting" for all containers after updating

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): AIO 8.3.0
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04.3 LTS
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.52
PHP version (eg, 7.4): 8.1.2

The issue you are facing:

Often when I stop and update the mastercontainer to update the other containers, all of my containers will get hung up on “Starting” and my Nextcloud is inaccessible. Logs state that the Master is waiting for the Apache server, Apache is waiting for Nextcloud, Nextcloud is waiting for Database, but database says it’s ready to go.

Is this the first time you’ve seen this error? (Y/N): No

Steps to replicate it:

I unfortunately don’t have a really good workflow to follow other than seeing it during updates, and I often wait a few months between updates.

The output of your Nextcloud log in Admin > Logging:

Unable

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

Unsure where that is for AIO

The output of your Apache/nginx/system log in /var/log/____:

[Tue Jun 11 00:00:00.633837 2024] [mpm_prefork:notice] [pid 1776] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations
[Tue Jun 11 00:00:00.633849 2024] [core:notice] [pid 1776] AH00094: Command line: '/usr/sbin/apache2'
[Tue Jun 11 18:47:09.874940 2024] [mpm_prefork:notice] [pid 1776] AH00170: caught SIGWINCH, shutting down gracefully
[Tue Jun 11 18:47:09.966374 2024] [mpm_prefork:notice] [pid 2253167] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations
[Tue Jun 11 18:47:09.966394 2024] [core:notice] [pid 2253167] AH00094: Command line: '/usr/sbin/apache2'
[Tue Jun 11 18:51:33.475057 2024] [mpm_prefork:notice] [pid 2253167] AH00170: caught SIGWINCH, shutting down gracefully
[Tue Jun 11 18:55:35.368768 2024] [mpm_prefork:notice] [pid 2262286] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations
[Tue Jun 11 18:55:35.368958 2024] [core:notice] [pid 2262286] AH00094: Command line: '/usr/sbin/apache2'
[Tue Jun 11 19:12:27.361059 2024] [mpm_prefork:notice] [pid 2262286] AH00170: caught SIGWINCH, shutting down gracefully
[Tue Jun 11 19:13:47.657901 2024] [mpm_prefork:notice] [pid 2280191] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations
[Tue Jun 11 19:13:47.657934 2024] [core:notice] [pid 2280191] AH00094: Command line: '/usr/sbin/apache2'

docker logs nextcloud-aio-mastercontainer:

Initial startup of Nextcloud All-in-One complete!
You should be able to open the Nextcloud AIO Interface now on port 8080 of this server!
E.g. https://internal.ip.of.this.server:8080
⚠️ Important: do always use an ip-address if you access this port and not a domain as HSTS might block access to it later!

If your server has port 80 and 8443 open and you point a domain to your server, you can get a valid certificate automatically by opening the Nextcloud AIO Interface via:
https://your-domain-that-points-to-this-server.tld:8443
++ head -1 /mnt/docker-aio-config/data/daily_backup_time
+ BACKUP_TIME=08:00
+ export BACKUP_TIME
+ export DAILY_BACKUP=1
+ DAILY_BACKUP=1
++ sed -n 2p /mnt/docker-aio-config/data/daily_backup_time
+ '[' '' '!=' automaticUpdatesAreNotEnabled ']'
+ export AUTOMATIC_UPDATES=1
+ AUTOMATIC_UPDATES=1
++ sed -n 3p /mnt/docker-aio-config/data/daily_backup_time
+ '[' '' '!=' successNotificationsAreNotEnabled ']'
+ export SEND_SUCCESS_NOTIFICATIONS=1
+ SEND_SUCCESS_NOTIFICATIONS=1
+ set +x
Daily backup script has started
grep: write error: Broken pipe
{"level":"info","ts":1718155141.3614259,"msg":"using provided configuration","config_file":"/Caddyfile","config_adapter":""}
[12-Jun-2024 01:19:01] NOTICE: fpm is running, pid 153
[12-Jun-2024 01:19:01] NOTICE: ready to handle connections
[Wed Jun 12 01:19:01.389843 2024] [mpm_event:notice] [pid 146:tid 139929868368648] AH00489: Apache/2.4.59 (Unix) OpenSSL/3.1.5 configured -- resuming normal operations
[Wed Jun 12 01:19:01.389862 2024] [core:notice] [pid 146:tid 139929868368648] AH00094: Command line: 'httpd -D FOREGROUND'
Waiting for apache to become available
Waiting for apache to become available
Waiting for apache to become available
Waiting for apache to become available
Waiting for apache to become available

docker logs nextcloud-aio-database

Setting postgres values...
chmod: /var/run/postgresql: Operation not permitted

PostgreSQL Database directory appears to contain a database; Skipping initialization

2024-06-09 18:29:57.087 PDT [14] LOG:  starting PostgreSQL 15.7 on x86_64-pc-linux-musl, compiled by gcc (Alpine 13.2.1_git20240309) 13.2.1 20240309, 64-bit
2024-06-09 18:29:57.088 PDT [14] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-06-09 18:29:57.088 PDT [14] LOG:  listening on IPv6 address "::", port 5432
2024-06-09 18:29:57.089 PDT [14] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-06-09 18:29:57.099 PDT [24] LOG:  database system was shut down at 2024-06-09 17:46:47 PDT
2024-06-09 18:29:57.108 PDT [14] LOG:  database system is ready to accept connections

1 Like

Bumping this. My NC instance is currently inoperable because of this issue.

Can you clarify precisely how you’re updating?

The standard process (for AIO) is documented here: GitHub - nextcloud/all-in-one: 📦 The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.

I go to the AIO dashboard and press the button that says update mastercontainer. I haven’t done anything through the CLI beyond getting it set up.

Now it’s hung up on running a backup. Which logs should I include to give a better idea of what’s going on?

Can you post your Compose file?

I’ve been using a longform command that I have saved (posted below). I’ll convert this to a compose yaml and try it again.

docker run
–name “/nextcloud-aio-mastercontainer”
–sig-proxy=false
–restart always
–publish 80:80
–publish 8040:8080
–publish 8443:8443
–volume “nextcloud_aio_mastercontainer:/mnt/docker-aio-config”
–volume “/var/run/docker.sock:/var/run/docker.sock:ro”
–env “NEXTCLOUD_DATADIR=/media/ljb/PhotoVideo/ncdata/”
–env “SKIP_DOMAIN_VALIDATION=true”
“nextcloud/all-in-one:latest”

services:
  nextcloud-aio-mastercontainer:
    image: nextcloud/all-in-one:latest
    init: true
    restart: always
    container_name: nextcloud-aio-mastercontainer # This line is not allowed to be changed as otherwise AIO will not work correctly
    volumes:
      - nextcloud_aio_mastercontainer:/mnt/docker-aio-config # This line is not allowed to be changed as otherwise the built-in backup solution will not work
      - /var/run/docker.sock:/var/run/docker.sock:ro # May be changed on macOS, Windows or docker rootless. See the applicable documentation. If adjusting, don't forget to also set 'WATCHTOWER_DOCKER_SOCKET_PATH'!
    ports:
      - 80:80 # Can be removed when running behind a web server or reverse proxy (like Apache, Nginx, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
      - 8040:8080
      - 8443:8443 # Can be removed when running behind a web server or reverse proxy (like Apache, Nginx, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
    environment: # Is needed when using any of the options below
      NEXTCLOUD_DATADIR: /media/ljb/PhotoVideo/ncdata/ # Allows to set the host directory for Nextcloud's datadir. ⚠️⚠️⚠️ Warning: do not set or adjust this value after the initial Nextcloud installation is done! See https://github.com/nextcloud/all-in-one#how-to-change-the-defa
ult-location-of-nextclouds-datadir
      SKIP_DOMAIN_VALIDATION: true

volumes: # If you want to store the data on a different drive, see https://github.com/nextcloud/all-in-one#how-to-store-the-filesinstallation-on-a-separate-drive
  nextcloud_aio_mastercontainer:
    external: true
    name: nextcloud_aio_mastercontainer 

Alright, I copied the compose.yaml from the repo and filled in the information I had from my CLI driver as needed. Added the SKIP DOMAIN VALIDATION because that’s what my CLI was and external: true in volumes to let it use the same volume. (actual file has kept a bunch of other values commented out, but I deleted them here for clarity)

Since doing this, I’m now on NC-AIO v9.0.1 but I am back at
Waiting for the Nextcloud container to start inside the Mastercontainer logs
Waiting for database to start... inside Nextcloud logs
and inside Database logs:

Setting postgres values...
chmod: /var/run/postgresql: Operation not permitted

PostgreSQL Database directory appears to contain a database; Skipping initialization

2024-06-17 21:18:05.979 PDT [77] LOG:  starting PostgreSQL 16.3 on x86_64-pc-linux-musl, compiled by gcc (Alpine 13.2.1_git20240309) 13.2.1 20240309, 64-bit
2024-06-17 21:18:05.979 PDT [77] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-06-17 21:18:05.979 PDT [77] LOG:  listening on IPv6 address "::", port 5432
2024-06-17 21:18:05.983 PDT [77] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-06-17 21:18:05.988 PDT [87] LOG:  database system was shut down at 2024-06-17 21:18:05 PDT
2024-06-17 21:18:06.000 PDT [77] LOG:  database system is ready to accept connections

Is anything standing out?

Check (and/or post) the Docker logs for these two containers:

  • nextcloud-aio-nextcloud (probably the most interesting in this case)
  • nextcloud-aio-apache (probably the next most interesting)

nextcloud-aio-nextcloud

Waiting for database to start...
Waiting for database to start...
Waiting for database to start...
Waiting for database to start...
Waiting for database to start...

nextcloud-aio-apache

Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...
Waiting for Nextcloud to start...

Both of them ad infinitum and nothing else in the logs, unless I need to be adding anything else to the docker logs [container] command?

It looks like somehow the containers cannot reach each other which sounds like a general docker networking issue…

Running inspect on the two nextcloud-labeled networks in docker provides this

~$ docker network inspect nextcloud-aio
[
    {
        "Name": "nextcloud-aio",
        "Id": "08340c064efff16abb3100cecb747096091df8da24581662696c07223052b185",
        "Created": "2023-09-13T17:22:49.504465995Z",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.20.0.0/16",
                    "Gateway": "172.20.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "0256b752da24f5416043523c19948a817f066379e405ccabf55a9989adc142e7": {
                "Name": "nextcloud-aio-mastercontainer",
                "EndpointID": "3ebca30cab04c4ce48f12378c6972813598cb0df5673f6fddfa4d45365fccfa8",
                "MacAddress": "02:42:ac:14:00:03",
                "IPv4Address": "172.20.0.3/16",
                "IPv6Address": ""
            },
            "17da0576d7eb83772790899ea51926aa832d7c07ae0a8b5a746081c36cdfb3c5": {
                "Name": "nextcloud-aio-imaginary",
                "EndpointID": "c5fd387e589baa9792c3439e3b8cf7c83d0a7f6d8dca56b6ba6a155fb5325f61",
                "MacAddress": "02:42:ac:14:00:08",
                "IPv4Address": "172.20.0.8/16",
                "IPv6Address": ""
            },
            "4dfb9bb4d6836d58136ab634b7e1e3d86514a46eac180f157199978535d4e228": {
                "Name": "nextcloud-aio-nextcloud",
                "EndpointID": "36776bb76317eb347571aa54fc4ae7d0500d61d029e61a73bcd9f053375d1e2a",
                "MacAddress": "02:42:ac:14:00:09",
                "IPv4Address": "172.20.0.9/16",
                "IPv6Address": ""
            },
            "5e55f76046f947e40ccff768d5b945b909d3a91926d8038c2a44fe83dcef6b61": {
                "Name": "nextcloud-aio-fulltextsearch",
                "EndpointID": "d7a9dc4342438268d07a9c35eeef3552e0f2c15f5ae5c8ddb09c683c52a216d1",
                "MacAddress": "02:42:ac:14:00:07",
                "IPv4Address": "172.20.0.7/16",
                "IPv6Address": ""
            },
            "8b1ca12a051e946cfb838f3e3fa7f47cec81df5ec70c48a5500bbd271deb4ec6": {
                "Name": "nextcloud-aio-notify-push",
                "EndpointID": "b356ef90f665a1e74e8899f4a9ed1de66b3560568d69486330af0454f2a5c478",
                "MacAddress": "02:42:ac:14:00:0a",
                "IPv4Address": "172.20.0.10/16",
                "IPv6Address": ""
            },
            "bf1dc022c80c5218fb4a0c77c5f322dd368c60a46c84497b403d7769f9e1b991": {
                "Name": "nextcloud-aio-database",
                "EndpointID": "b1eb865c19fed339a43822a321dd36bf8bef00a2858045f3774ab7bc724505bc",
                "MacAddress": "02:42:ac:14:00:05",
                "IPv4Address": "172.20.0.5/16",
                "IPv6Address": ""
            },
            "c1b025967ad27be1f9c109340954647968b12248c5829446996456084c885c81": {
                "Name": "nextcloud-aio-talk",
                "EndpointID": "8d68d191af65141fd677b6fffb2bb350c931bbc06f68ad3120eae7e68678a704",
                "MacAddress": "02:42:ac:14:00:04",
                "IPv4Address": "172.20.0.4/16",
                "IPv6Address": ""
            },
            "d03bb97bbae754c51ab81760fe4148830465808f4928a68d6ab33b241756e492": {
                "Name": "nextcloud-aio-apache",
                "EndpointID": "6585df8ca3cadc82f2c7c338500b2e8cb2a858594fcd23d099a5f6a00b0105e4",
                "MacAddress": "02:42:ac:14:00:0b",
                "IPv4Address": "172.20.0.11/16",
                "IPv6Address": ""
            },
            "dbd363a98f3bfecc194bc829168879a58a7dfd990a73d34d446de4639661fbfe": {
                "Name": "nextcloud-aio-collabora",
                "EndpointID": "7692c5e10d785059dfbdbec480fdd2f4cf5a3575f78dde8deb16e48f8803b3a5",
                "MacAddress": "02:42:ac:14:00:02",
                "IPv4Address": "172.20.0.2/16",
                "IPv6Address": ""
            },
            "de827d14f146bc8211df8a3ddc5b5ec3b57cec9123ab942084f49aea9086dda9": {
                "Name": "nextcloud-aio-redis",
                "EndpointID": "5b5e5d67c1f63b251de52614ef59aaefa6cacc8fc2d1645ba1c6d2d6852f2e44",
                "MacAddress": "02:42:ac:14:00:06",
                "IPv4Address": "172.20.0.6/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
]
~$ docker network inspect nextcloud_default
[
    {
        "Name": "nextcloud_default",
        "Id": "7d01ffb10cbf463e48ec89fa4ec7bf6d51f1285f383bac1685fde14024539c74",
        "Created": "2024-06-17T21:13:21.245578697-07:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.21.0.0/16",
                    "Gateway": "172.21.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "0256b752da24f5416043523c19948a817f066379e405ccabf55a9989adc142e7": {
                "Name": "nextcloud-aio-mastercontainer",
                "EndpointID": "ce596c21d6a2a82174d85165dbf4502f9d39547cdfa8d99f8fda0f9b29571504",
                "MacAddress": "02:42:ac:15:00:02",
                "IPv4Address": "172.21.0.2/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {
            "com.docker.compose.network": "default",
            "com.docker.compose.project": "nextcloud",
            "com.docker.compose.version": "2.20.2"
        }
    }
]

Your networks look alright to me.

What Docker Engine version?
Are you keeping your Docker Engine up-to-date? There are routinely various quirky bugs:

https://docs.docker.com/engine/release-notes/26.1/

That was it! Ran apt update/upgrade, docker restarted and we’re back online.

Thank you!

1 Like

Welp, I’m back.

Next time I hard to restart the PC, NextCloud failed to start up. Same issue. Logs present the same as I posted above. Ran my apt update/upgrade and have restarted all my containers about a half dozen times in between. I’m really at a loss here…

I feel like at this point I need to recreate something with the whole setup, but both my wife and I have data in the system and I’d really rather not lose that setup. I’m not sure what I can reasonably recreate without wrecking the whole thing.

Any thoughts on this approach?