AIO - nextcloud & apache containers don't start after update

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 v2.1.2
Operating system and version (eg, Ubuntu 20.04): replace me
Apache or nginx version (eg, Apache 2.4.25): replace me
PHP version (eg, 7.4): replace me

The issue you are facing: Can’t start apache & nextcloud containers after update

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

Steps to replicate it:

  1. Had v23 and updated master container first + all other containers after that
  2. Apache log says waiting for Nextcloud to start
  3. Nextcloud says update failed

The output of your Nextcloud log in Admin > Logging:

Configuring Redis as session handler...
Setting php max children...
The last Nextcloud update failed.
Please restore from backup and try again!
If you do not have a backup in place, you can simply delete the update.failed file in the datadir which will allow the container to start again.

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

It's in docker, not sure how to access it.

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

PASTE HERE

PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE

How can I restore the backup? I can’t afford to lose any files.

Please do as adviced!

Afterwards feel free to post the update logs here if the next update attempt should still fail.

Thanks. Could you please point me to the right manual (docker version)?

You can restore a backup directly from the AIO interface if you have created a backup from there before.

I did backup in the admin interface, but I didn’t see the option to recover from there.

Now, for some reason, I’m stuck on the login page. Entering the password just refreshes the screen. I tried restarting all containers, no change.

See Lost the AIO setup password, what can I do? · Discussion #803 · nextcloud/all-in-one · GitHub

1 Like

Thanks. I managed to log back in, restore from backup, but the situation stays the same - Apache and Nextcloud containers don’t start.

Is it safe to delete update.failed file (won’t I lose any of the files saved)? If it’s save, how can I access it?

Configuring Redis as session handler...
Setting php max children...
The last Nextcloud update failed.
Please restore from backup and try again!
If you do not have a backup in place, you can simply delete the update.failed file in the datadir which will allow the container to start again.
              now

Possibly you restored a backup that contained the state after the failed update? In that case you need to restore the backup from before that…

I don’t have another backup :-/

It think my backup has good containers (apache, database,…) but the master container is what’s causing the issue. How can I downgrade it?

So you created the only backup after the update went already wrong?

I think I upgraded the master container, then it showed an upgrade for all the containers, so I made a backup and upgraded all. It’s bad, I know :-/

All fine! This is indeed the intended flow! I am only asking because it looks like you’ve created the backup after the upgrade of the containers failed… (the mastercontainer should not influence this outcome so no problem that it was upgraded first).

Since the updated process seems to still cause some headaches sometimes, we will try to improve it with Think about making update process more stable · Issue #1400 · nextcloud/all-in-one · GitHub.

So you could indeed try to delete that file but the instance will likely be broken afterwards since the update failed, hence my recommendation to restore a working backup. But if you don’t have a working backup since you’ve only created it after the update failed, I fear there is not much that I can do to help you…

I tried that, all containers are running now but Nextcloud is not able to connect to the DB.

Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at "nextcloud-aio-database" (172.18.0.2), port 5432 failed: FATAL: password authentication failed for user "oc_admin" in /var/www/html/lib/private/DB/Connection.php:139

Can I somehow re-run the update of the master container? What would you do if this was yours and you can’t lose the data there?

All right, I see what your problem might be.

Is it possible that you have not updated your instance even once for a few months and now the first time after this period?

1 Like

So, I most likely have found a way to fix this for you. It is indeed something in our codebase but it only happened because you most likely did not update even once since a few months. It will get fixed with re-add the password change by szaimen · Pull Request #1404 · nextcloud/all-in-one · GitHub. as soon as the update is out and after you upgrade again, you should be able to restore the backup and make it work again.

1 Like

That’s correct. It was not updated for ~11 months. I’m sorry to say that, but after this I’m not too motivated to update again :smiley:

Thanks for the fix just because of me though.

I upgraded, recovered but I get the same error. I tried the whole process twice.

Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at "nextcloud-aio-database" (172.18.0.2), port 5432 failed: FATAL:  password authentication failed for user "oc_admin" in /var/www/html/lib/private/DB/Connection.php:87

Is there anything else I can try?

I just pushed a fix to the beta channel.

You could switch to that, restore the backup from before the failed update and it should work again. Testing and feedback is welcome! See GitHub - nextcloud/all-in-one: Nextcloud AIO stands for Nextcloud All In One and provides easy deployment and maintenance with most features included in this one Nextcloud instance.