Nextcloud won't start post-migration -- mariadb uninstalled?

What type of hardware are you using: Virtual machine
What YunoHost version are you running: 12.0.11
What app is this about: Nextcloud

Describe your issue

See title – mariadb was uninstalled during the migration and never reinstalled. Only discovered this when I went to try to upgrade Nextcloud.

What’s the path forward, here? I’m pretty sure just reinstalling mariadb-server won’t help since the databases seem to be gone. Should I uninstall Nextcloud, restore from backup, then run the upgrade again?

Full upgrade log below. This is an extension of the issue I mentioned in Nextcloud broken post-migration -- mysql/mariadb uninstalled? – opening this issue since the problem was with the migration, not the upgrade per se.

Share relevant logs or error messages

https://paste.yunohost.org/raw/idowajiveh

I confirm, on Yunohost 12, the upgrade from Nextcloud 29 to 30 works fine (tested with v29 installed some minutes ago for test).

I can’t test the migration from Yunoshost 11 to 12, but when I did my Nextcloud was on version 29 or less, and I didn’t upgraded to 30 because I have app installed not compatible with version 30.

Tried removing and reinstaling Nextcloud, got this:

https://paste.yunohost.org/raw/hayomizomu

I see this in the logs :

2025-02-05 12:33:31,787: DEBUG - + sudo -u nextcloud env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.vim/bundle/vim-live-latex-preview/bin COREPACK_ENABLE_DOWNLOAD_PROMPT=0 php8.3 --define apc.enable_cli=1 occ --no-interaction --no-ansi maintenance:install --database mysql --database-name nextcloud --database-user nextcloud --database-pass ********** --admin-user admin --admin-pass ********** --data-dir /home/yunohost.app/nextcloud/data
2025-02-05 12:33:32,707: DEBUG - Error while trying to create admin account: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user 'nextcloud'@'localhost' (using password: YES)

yep, saw that too. no idea how to fix. Not sure what the script is trying to do in that moment – trying to provision the needed tables? Or adding a user?

I did verify that there’s no nextcloud user in mysql.user, but I would have expected the script to remove that user when it reverted the system changes after the install failure.

Any suggestions?

So, here it seems problematic

2025-02-02 06:35:13,631: DEBUG -  mariadb-server : Depends: mariadb-client (>= 1:10.11.6-0+deb12u1) but it is not going to be installed
2025-02-02 06:35:13,632: DEBUG -                   Depends: mariadb-server-core (>= 1:10.11.6-0+deb12u1) but it is not going to be installed
2025-02-02 06:35:13,633: DEBUG -  libsemanage1 : Depends: libsemanage-common (= 3.1-1) but 3.4-1 is to be installed
2025-02-02 06:35:13,634: DEBUG -  nip2 : Depends: libgsl27 (>= 2.7.1) but it is not going to be installed
2025-02-02 06:35:13,635: DEBUG - The following actions will resolve these dependencies:
2025-02-02 06:35:13,635: DEBUG - 
2025-02-02 06:35:13,636: DEBUG -       Remove the following packages:
2025-02-02 06:35:13,637: DEBUG - 1)      libsemanage1 [3.1-1+b2 (now)]
2025-02-02 06:35:13,638: DEBUG - 2)      mariadb-server [1:10.5.26-0+deb11u2 (now)]
2025-02-02 06:35:13,639: DEBUG - 
2025-02-02 06:35:13,640: DEBUG -       Install the following packages:
2025-02-02 06:35:13,641: DEBUG - 3)      libgsl27 [2.7.1+dfsg-5+deb12u1 (stable)]
2025-02-02 06:35:13,642: DEBUG - 
2025-02-02 06:35:13,643: DEBUG -       Keep the following packages at their current version:
2025-02-02 06:35:13,644: DEBUG - 4)      mariadb-plugin-provider-bzip2 [Not Installed]
2025-02-02 06:35:13,645: DEBUG - 5)      mariadb-plugin-provider-lz4 [Not Installed]
2025-02-02 06:35:13,646: DEBUG - 6)      mariadb-plugin-provider-lzma [Not Installed]
2025-02-02 06:35:13,647: DEBUG - 7)      mariadb-plugin-provider-lzo [Not Installed]
2025-02-02 06:35:13,648: DEBUG - 8)      mariadb-plugin-provider-snappy [Not Installed]
2025-02-02 06:35:13,649: DEBUG - 
2025-02-02 06:35:13,650: DEBUG -       Upgrade the following packages:
2025-02-02 06:35:13,651: DEBUG - 9)      libgslcblas0 [2.6+dfsg-2+deb11u1 (now) -> 2.7.1+dfsg-5+deb12u1 (stable)]
2025-02-02 06:35:13,652: DEBUG - 
2025-02-02 06:35:13,652: DEBUG -       Leave the following dependencies unresolved:
2025-02-02 06:35:13,653: DEBUG - 10)     yunohost recommends mariadb-server

what happens uf you try install all the packages mariadb-* listed ?

1 Like

So on a hunch I went ahead and tried to run the install again and this time it yelled at me for still having the yunohost.app/nextcloud folder from the old install. So I moved that out of the way, ran the install again, and it worked.

My best guess is there was a lingering nextcloud user in the database that got removed on that first failed install but who knows, it’s working now. Thanks for looking at it everyone.

1 Like

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