Manual upgrade keeps failing

I have a server tunning nextcloud 27. .
I was planning on updating the running instance to the most recent one (using the manual upgrade guide).

I’ve followed all the steps here:
all-in-one/manual-upgrade.md at main · nextcloud/all-in-one · GitHub

But when the container restarts, i’m always getting the error:
Connection to nextcloud-aio-redis (172.18.0.5) 6379 port [tcp/redis] succeeded!
Initializing nextcloud 29.0.8.1 …
Initializing finished
New Nextcloud instance.
Installing with pgsql database
Starting Nextcloud installation…
The Login is already being used
Installation of Nextcloud failed!

Since the error when i upgrade from the AIO is that it is incompatible with PHP 8.3, i’m trying to run it on PHP8.2.

the “The Login is already being used” doesn’t make much sense for me since… i know it exists, i’m not trying to reinstall the whole instance.

any help would be much appreciated :slight_smile:

Hi, please restore the last working backup and try to follow the manual-update steps again

Hi, thank you for your reply,
Unfortunately i don’t have the daily backup feature enabled since i use a third party application to backup my server (veeam).
I have succesfully restored the vm to a working state after i tried to update it, i’ve also done a snapshot to be able to try more than once.

Unfortunately the problem is always the same.
i try to update from AIO, gives me the php version error, i follow the steps in the manual update guide and i get the error “the login is already being used”.

I’ve also tried to update the nextcloud container before updating from the AIO but then i have the PHP version error.

i think i’ve tried it 5 times now, it’s really strange.

Can you post the corresponding container logs here?

okay so:

  1. upgraded from AIO v10.5.0
    → getting the PHP error:
-------------------------------
 2025-02-11 09:11:07.850029+01
(1 row)

+ '[' -f /dev-dri-group-was-added ']'
++ find /dev -maxdepth 1 -mindepth 1 -name dri
+ '[' -n '' ']'
+ set +x
Connection to nextcloud-aio-redis (172.18.0.5) 6379 port [tcp/redis] succeeded!
This version of Nextcloud is not compatible with PHP>=8.3.<br/>You are currently running 8.3.16.It seems like your installed Nextcloud is not compatible with the by the container provided PHP version.
This most likely happened because you tried to restore an old Nextcloud version from backup that is not compatible with the PHP version that comes with the container.
Please try to restore a more recent backup which contains a Nextcloud version that is compatible with the PHP version that comes with the container.
If you do not have a more recent backup, feel free to have a look at this documentation: https:/github.com/nextcloud/all-in-one/blob/main/manual-upgrade.md
  1. following the manual upgrade guide.
    → last /tmp/nextcloud-aio-nextcloud lines:
...
--detach=true \
        nextcloud/aio-nextcloud:php8.2-latest \
        /usr/bin/supervisord -c /supervisord.conf

→ getting “The Login is already being used” error:

Connection to nextcloud-aio-database (172.18.0.4) 5432 port [tcp/postgresql] succeeded!
+ '[' -f /dev-dri-group-was-added ']'
++ find /dev -maxdepth 1 -mindepth 1 -name dri
+ '[' -n '' ']'
+ set +x
Enabling Imagick...
WARNING: opening from cache https:/dl-cdn.alpinelinux.org/alpine/v3.20/main: No such file or directory
WARNING: opening from cache https:/dl-cdn.alpinelinux.org/alpine/v3.20/community: No such file or directory
Connection to nextcloud-aio-redis (172.18.0.5) 6379 port [tcp/redis] succeeded!
Initializing nextcloud 29.0.8.1 ...
Initializing finished
New Nextcloud instance.
Installing with pgsql database
Starting Nextcloud installation...
The Login is already being used
Installation of Nextcloud failed!
root@nextcloud:~# sudo docker logs -f nextcloud-aio-nextcloud
Connection to nextcloud-aio-database (172.18.0.4) 5432 port [tcp/postgresql] succeeded!
+ '[' -f /dev-dri-group-was-added ']'
++ find /dev -maxdepth 1 -mindepth 1 -name dri
+ '[' -n '' ']'
+ set +x
Enabling Imagick...
WARNING: opening from cache https:/dl-cdn.alpinelinux.org/alpine/v3.20/main: No such file or directory
WARNING: opening from cache https:/dl-cdn.alpinelinux.org/alpine/v3.20/community: No such file or directory
Connection to nextcloud-aio-redis (172.18.0.5) 6379 port [tcp/redis] succeeded!
Initializing nextcloud 29.0.8.1 ...
Initializing finished
New Nextcloud instance.
Installing with pgsql database
Starting Nextcloud installation...
The Login is already being used
Installation of Nextcloud failed!
Connection to nextcloud-aio-database (172.18.0.4) 5432 port [tcp/postgresql] succeeded!
              now
-------------------------------
 2025-02-11 09:15:16.974168+01
(1 row)

+ '[' -f /dev-dri-group-was-added ']'
++ find /dev -maxdepth 1 -mindepth 1 -name dri
+ '[' -n '' ']'
+ set +x
Connection to nextcloud-aio-redis (172.18.0.5) 6379 port [tcp/redis] succeeded!
The initial Nextcloud installation failed.
Please reset AIO properly and try again. For further clues what went wrong, check the logs above.
See https:/github.com/nextcloud/all-in-one#how-to-properly-reset-the-instance
Connection to nextcloud-aio-database (172.18.0.4) 5432 port [tcp/postgresql] succeeded!
              now
-------------------------------
 2025-02-11 09:15:20.151721+01
(1 row)

+ '[' -f /dev-dri-group-was-added ']'
++ find /dev -maxdepth 1 -mindepth 1 -name dri
+ '[' -n '' ']'
+ set +x
Connection to nextcloud-aio-redis (172.18.0.5) 6379 port [tcp/redis] succeeded!
The initial Nextcloud installation failed.
Please reset AIO properly and try again. For further clues what went wrong, check the logs above.
See https:/github.com/nextcloud/all-in-one#how-to-properly-reset-the-instance
Connection to nextcloud-aio-database (172.18.0.4) 5432 port [tcp/postgresql] succeeded!
              now
-------------------------------
 2025-02-11 09:15:23.533069+01
(1 row)

+ '[' -f /dev-dri-group-was-added ']'
++ find /dev -maxdepth 1 -mindepth 1 -name dri
+ '[' -n '' ']'
+ set +x
Connection to nextcloud-aio-redis (172.18.0.5) 6379 port [tcp/redis] succeeded!
The initial Nextcloud installation failed.
Please reset AIO properly and try again. For further clues what went wrong, check the logs above.
See https:/github.com/nextcloud/all-in-one#how-to-properly-reset-the-instance

And here is where i revert to the snapshot.

Hm, this is weird. Did you make sure to restore all necessary data? (Like the datadir and all docker volumes?) The container should not attempt to do a new installation if data is already there…

As far as i can tell, yes.
Everything is working fine after i restore the snapshot/backup so i suppose everything is where it’s meant to be.

Is there a way i can make sure of that?

One thing i had to do when i was installing this instance was going through this procedure to fix a dns issue (i don’t know if that’s related):

How to fix sudden dns resolution issues after the AIO update to v4.4.1 or higher. · nextcloud/all-in-one · Discussion #2065 · GitHub

Can you show the whole file but omit secrets & passwords?

that’s it:

#!/bin/bash
docker run --name=nextcloud-aio-nextcloud \
        --hostname=4457db724df2 \
        --user=root \
        --volume /mnt/ncdata \
        --volume /var/www/html \
        --env=POSTGRES_HOST=nextcloud-aio-database \
        --env=POSTGRES_PASSWORD=XXXXXXXXX \
        --env=POSTGRES_DB=nextcloud_database \
        --env=POSTGRES_USER=nextcloud \
        --env=REDIS_HOST=nextcloud-aio-redis \
        --env=REDIS_HOST_PASSWORD=XXXXXXXXX \
        --env=AIO_TOKEN=XXXXXXXXX \
        --env=NC_DOMAIN=XXXX.XXXX.it \
        --env=ADMIN_USER=admin \
        --env=ADMIN_PASSWORD=XXXXXXXXX \
        --env=NEXTCLOUD_DATA_DIR=/mnt/ncdata \
        --env=OVERWRITEHOST=XXXX.XXXX.it \
        --env=OVERWRITEPROTOCOL=https \
        --env=TURN_SECRET=XXXXXXXXX \
        --env=SIGNALING_SECRET=XXXXXXXXX \
        --env=ONLYOFFICE_SECRET=XXXXXXXXX \
        --env=AIO_URL=192.168.XXX.XXX:8080 \
        --env=NEXTCLOUD_MOUNT= \
        --env=CLAMAV_ENABLED=yes \
        --env=CLAMAV_HOST=nextcloud-aio-clamav \
        --env=ONLYOFFICE_ENABLED= \
        --env=COLLABORA_ENABLED=yes \
        --env=COLLABORA_HOST=nextcloud-aio-collabora \
        --env=TALK_ENABLED= \
        --env=ONLYOFFICE_HOST=nextcloud-aio-onlyoffice \
        --env=UPDATE_NEXTCLOUD_APPS= \
        --env=TZ=Europe/Rome \
        --env=TALK_PORT=3478 \
        --env=IMAGINARY_ENABLED= \
        --env=IMAGINARY_HOST=nextcloud-aio-imaginary \
        --env=FULLTEXTSEARCH_ENABLED= \
        --env=FULLTEXTSEARCH_HOST=nextcloud-aio-fulltextsearch \
        --env=TRUSTED_CACERTS_DIR= \
        --env='STARTUP_APPS=deck twofactor_totp tasks calendar contacts notes' \
        --env=ADDITIONAL_APKS=imagemagick \
        --env=ADDITIONAL_PHP_EXTENSIONS=imagick \
        --env=INSTALL_LATEST_MAJOR= \
        --env=TALK_RECORDING_ENABLED= \
        --env=RECORDING_SECRET=XXXXXXXXX \
        --env=TALK_RECORDING_HOST=nextcloud-aio-talk-recording \
        --env=FULLTEXTSEARCH_PASSWORD=XXXXXXXXX \
        --env=DOCKER_SOCKET_PROXY_ENABLED= \
        --env=REMOVE_DISABLED_APPS=yes \
        --env=APACHE_PORT=443 \
        --env=APACHE_IP_BINDING= \
        --env=ADDITIONAL_TRUSTED_PROXY= \
        --env=THIS_IS_AIO=true \
        --env='NEXTCLOUD_EXEC_COMMANDS=echo '"'"'Activating Collabora config...'"'"'
php /var/www/html/occ richdocuments:activate-config
' \
        --cap-drop=NET_RAW \
        --network=nextcloud-aio \
        --workdir=/var/www/html \
        --expose=9000 \
        --restart=unless-stopped \
        --runtime=runc \
        --detach=true \
        nextcloud/aio-nextcloud:php8.2-latest \
        /usr/bin/supervisord -c /supervisord.conf

I see. So the actual mounts are missing here. Weird.

It should be --volume nextcloud_aio_nextcloud_data:/mnt/ncdata and --volume nextcloud_aio_nextcloud:/var/www/html

2 Likes

Edit: sorry, made a typo. Should be correct now

THAT WAS IT!

you’re great, i would never have been able to solve it by myself.

I only got one more question, i can see that i’m now on version Nextcloud Hub 8 (29.0.11), but i can see that the latest version is 30.0.5.

AIO interface says i’m up to date though, is there another step i should make to upgrade to the latest version?

1 Like

Can you restart the containers? This should trigger another update.

worked like a charm, should’ve tried before asking, sorry.

Thank you very much for your help.

2 Likes

This was now adjusted to be mentioned in the docs: manual-upgrade: add note that method 1 seems to be currently broken by szaimen · Pull Request #6026 · nextcloud/all-in-one · GitHub

I am not sure but this might be the bad commit: feat: directory mounting supports bind and volume modes · lavie/runlike@f4ad7d7 · GitHub

@jtr WDYT?

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.