Nextcloud AIO Hung Up on Starting 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)