Nextcloud problem under Nethserver

It shows the database and user were imported to mariadb 10.5
I suggest to run:

signal-event nethserver-nextcloud-update

…to see if it is able to update the config.php file with the correct database connection (if not we do it manually), after that you might see the nextcloud landing page but with an error (we can continue from there).

Ok, thanks…

nothing seems to happen, when I run the command… although…

-rw-r----- 1 apache apache  1053 Nov 16 15:01 config.php

I have several versions of this file… all owned by the root user… now the apache user and group is there… but the time stamp is from the afternoon… don’t know. I changed permissions to 644, just as the sample file… but still the “Internal Server Error”.

Permissions above marked on red are ok.
Let’s do the changes manually, so config.php has these entries in place of the same old ones:

  'dbhost' => 'localhost:/run/rh-mariadb105-mariadb/nextcloud-mysql.sock',
  'mysql.utf8mb4' => true,

If I’m not mistaken that’s all we need to change.
After those changes you can run:

occ upgrade

Hmmm, ok, the first lines show the following entries… looks like a permission or password problem… ?

The output of occ upgrade is:

An unhandled exception has been thrown:
Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [1045] Access denied for user 'nextcloud'@'localhost' (using password: YES) in /usr/share/nextcloud/lib/private/DB/Connection.php:87
Stack trace:
#0 /usr/share/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\DB\Connection->connect()
#1 /usr/share/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\DBAL\Connection->getWrappedConnection()
#40 {main}[root@aichtalinfo config]#

Try restarting the related services

I obviously took the secret of the file mysql … now I tried with the file nextcloud… and can connect to mysql.

The result of occ upgrade now is:

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Turned on maintenance mode
Exception: Updates between multiple major versions and downgrades are unsupported.
Update failed
Maintenance mode is kept active
Resetting log level

We are almost there. Go with the experimental option described in the wiki and you are good to go, I hope.

And accessing shows the screen again, asking to update to Nextcloud 22.2.0.

could that be a problem of the version, that I currently have in the config.php?

 'version' => '',

Yes, it is related but first it must go through some previous upgrade steps, before changing the version.

yum downgrade showed at the end:

Transaction check error:
  package nethserver-nextcloud-1.19.0-1.ns7.noarch (which is newer than nethserver-nextcloud-1.17.1-1.ns7.noarch) is already installed

Ok, sorry, I have to stop for today…

the command: occ migrations:status core


Nextcloud is not installed - only a limited number of commands are available
There are no commands defined in the "migrations" namespace.  

And the config.php is reset to 61 Bytes:

$CONFIG = array (
  'instanceid' => 'ocae8k635c23',

And I did not save it before because I did not expect this… :frowning:

Thank you very very very much for your help so far!

Wish you a good night… and hopefully we can solve that… sigh

you need to enable debug mode first (by editing the config.php file).

Same same. Good night.

I have no config.php file any more :grimacing:

I missed that part. You can check for other copies or as last resort we can try to recreate it… Let’s sleep on it and continue in the morning with fresh eyes.

Sounds good to me, thanks a lot for all your help and patience!

Good morning,

I finally managed to get Nextcloud working again.

I recreated the config.php and set the version string, that you mentioned in a previous post, to 21.0.3.

After that, the occ upgrade worked… the last lines of the output were:

Starting code integrity check...
Finished code integrity check
Update successful
Turned off maintenance mode
Resetting log level

The version now is set to and I can login again using web interface… now I’ll try the clients.

Again, I’d like to thank you really really a lot! That was great and really helpful!

Best regards,



If your clients also work, would you please mark the topic as solved.

1 Like