Nextcloud wants to be upgraded to 26.0.2

Hello,
today, when I click the nextcloud Login Page for example from cockpit => applications
I get a page saying: “Nextcloud gets updated to version 26.0.2” (translated from german)
“Please make sure, database, configuration folder and data folder are backed up”

As an alternative, it offers the possibility to run “./occ upgrade” in the installation folder.

There is no way to login to nextcloud withoud running this update.
When I klick “Start Update” => an Error happend, details: “An Error Happend” :frowning:

Now I really don’t know what to do.
In nethserver support I read “do not run updates via occ!”
If I ran ./occ upgrade, which is the installation folder?
which occ tells me /usr/local/sbin/occ

Regards
Uwe

just tried signal-event nethserver-nextcloud-update found in an older thread, this did not change anything.

NethServer Version: 7.9.2009
Nextcloud: 26.0.2
cockpit => Applications says: Nextcloud Provides Nextcloud for NethServer Version1.22.0

`Last entries from /var/lib/nethserver/nextcloud/nextcloud.log
“app”:“no app in context”,“method”:“GET”,“url”:“/nextcloud/core/ajax/update.php?requesttoken=…”,“message”:“Database error when running migration 25000Date20220905140840 for app core\nAn exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 near "(": syntax error”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0”,“version”:“25.0.6.1”,“exception”:{“Exception”:“Exception”,“Message”:“Database error when running migration 25000Date20220905140840 for app core\nAn exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 near "(": syntax error”,“Code”:0,“Trace”:[{“file”:“/usr/share/nextcloud/lib/private/Updater.php”,“line”:322,“function”:“migrate”,“class”:“OC\DB\MigrationService”,“type”:“->”},{“file”:“/usr/share/nextcloud/lib/private/Updater.php”,“line”:261,“function”:“doCoreUpgrade”,“class”:“OC\Updater”,“type”:“->”},{“file”:“/usr/share/nextcloud/lib/private/Updater.php”,“line”:140,“function”:“doUpgrade”,“class”:“OC\Updater”,“type”:“->”},{“file”:“/usr/share/nextcloud/core/ajax/update.php”,“line”:185,“function”:“upgrade”,“class”:“OC\Updater”,“type”:“->”}],“File”:“/usr/share/nextcloud/lib/private/DB/MigrationService.php”,“Line”:421,“Previous”:{“Exception”:“Doctrine\DBAL\Exception\SyntaxErrorException”,“Message”:“An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 near "(": syntax error”,“Code”:1,“Trace”:[{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Connection.php”,“line”:1814,“function”:“convert”,“class”:“Doctrine\DBAL\Driver\API\SQLite\ExceptionConverter”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Connection.php”,“line”:1749,“function”:“handleDriverException”,“class”:“Doctrine\DBAL\Connection”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Connection.php”,“line”:1055,“function”:“convertExceptionDuringQuery”,“class”:“Doctrine\DBAL\Connection”,“type”:“->”},{“file”:“/usr/share/nextcloud/lib/private/DB/Connection.php”,“line”:262,“function”:“executeQuery”,“class”:“Doctrine\DBAL\Connection”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Connection.php”,“line”:849,“function”:“executeQuery”,“class”:“OC\DB\Connection”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Schema/SqliteSchemaManager.php”,“line”:207,“function”:“fetchAllAssociative”,“class”:“Doctrine\DBAL\Connection”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php”,“line”:228,“function”:“_getPortableTableIndexesList”,“class”:“Doctrine\DBAL\Schema\SqliteSchemaManager”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php”,“line”:328,“function”:“listTableIndexes”,“class”:“Doctrine\DBAL\Schema\AbstractSchemaManager”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Schema/SqliteSchemaManager.php”,“line”:572,“function”:“listTableDetails”,“class”:“Doctrine\DBAL\Schema\AbstractSchemaManager”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php”,“line”:306,“function”:“listTableDetails”,“class”:“Doctrine\DBAL\Schema\SqliteSchemaManager”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php”,“line”:1229,“function”:“listTables”,“class”:“Doctrine\DBAL\Schema\AbstractSchemaManager”,“type”:“->”},{“file”:“/usr/share/nextcloud/lib/private/DB/Migrator.php”,“line”:98,“function”:“createSchema”,“class”:“Doctrine\DBAL\Schema\AbstractSchemaManager”,“type”:“->”,“args”:[“*** sensitive parameters replaced “]},{“file”:”/usr/share/nextcloud/lib/private/DB/Connection.php",“line”:570,“function”:“createSchema”,“class”:“OC\DB\Migrator”,“type”:“->”,“args”:[" sensitive parameters replaced “]},{“file”:”/usr/share/nextcloud/lib/private/DB/SchemaWrapper.php",“line”:43,“function”:“createSchema”,“class”:“OC\DB\Connection”,“type”:“->”,“args”:[" sensitive parameters replaced “]},{“file”:”/usr/share/nextcloud/lib/private/DB/MigrationService.php",“line”:523,“function”:“__construct”,“class”:“OC\DB\SchemaWrapper”,“type”:“->”},{“file”:“/usr/share/nextcloud/core/Migrations/Version25000Date20220905140840.php”,“line”:44,“function”:“OC\DB\{closure}”,“class”:“OC\DB\MigrationService”,“type”:“->”,“args”:[" sensitive parameters replaced “]},{“file”:”/usr/share/nextcloud/lib/private/DB/MigrationService.php",“line”:524,“function”:“changeSchema”,“class”:“OC\Core\Migrations\Version25000Date20220905140840”,“type”:“->”},{“file”:“/usr/share/nextcloud/lib/private/DB/MigrationService.php”,“line”:417,“function”:“executeStep”,“class”:“OC\DB\MigrationService”,“type”:“->”},{“file”:“/usr/share/nextcloud/lib/private/Updater.php”,“line”:322,“function”:“migrate”,“class”:“OC\DB\MigrationService”,“type”:“->”},{“file”:“/usr/share/nextcloud/lib/private/Updater.php”,“line”:261,“function”:“doCoreUpgrade”,“class”:“OC\Updater”,“type”:“->”},{“file”:“/usr/share/nextcloud/lib/private/Updater.php”,“line”:140,“function”:“doUpgrade”,“class”:“OC\Updater”,“type”:“->”},{“file”:“/usr/share/nextcloud/core/ajax/update.php”,“line”:185,“function”:“upgrade”,“class”:“OC\Updater”,“type”:“->”}],“File”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/SQLite/ExceptionConverter.php”,“Line”:71,“Previous”:{“Exception”:“Doctrine\DBAL\Driver\PDO\Exception”,“Message”:“SQLSTATE[HY000]: General error: 1 near "(": syntax error”,“Code”:1,“Trace”:[{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php”,“line”:65,“function”:“new”,“class”:“Doctrine\DBAL\Driver\PDO\Exception”,“type”:“::”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Connection.php”,“line”:1042,“function”:“prepare”,“class”:“Doctrine\DBAL\Driver\PDO\Connection”,“type”:“->”},{“file”:“/usr/share/nextcloud/lib/private/DB/Connection.php”,“line”:262,“function”:“executeQuery”,“class”:“Doctrine\DBAL\Connection”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Connection.php”,“line”:849,“function”:“executeQuery”,“class”:“OC\DB\Connection”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Schema/SqliteSchemaManager.php”,“line”:207,“function”:“fetchAllAssociative”,“class”:“Doctrine\DBAL\Connection”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php”,“line”:228,“function”:“_getPortableTableIndexesList”,“class”:“Doctrine\DBAL\Schema\SqliteSchemaManager”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php”,“line”:328,“function”:“listTableIndexes”,“class”:“Doctrine\DBAL\Schema\AbstractSchemaManager”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Schema/SqliteSchemaManager.php”,“line”:572,“function”:“listTableDetails”,“class”:“Doctrine\DBAL\Schema\AbstractSchemaManager”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php”,“line”:306,“function”:“listTableDetails”,“class”:“Doctrine\DBAL\Schema\SqliteSchemaManager”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php”,“line”:1229,“function”:“listTables”,“class”:“Doctrine\DBAL\Schema\AbstractSchemaManager”,“type”:“->”},{“file”:“/usr/share/nextcloud/lib/private/DB/Migrator.php”,“line”:98,“function”:“createSchema”,“class”:“Doctrine\DBAL\Schema\AbstractSchemaManager”,“type”:“->”,“args”:[" sensitive parameters replaced “]},{“file”:”/usr/share/nextcloud/lib/private/DB/Connection.php",“line”:570,“function”:“createSchema”,“class”:“OC\DB\Migrator”,“type”:“->”,“args”:[" sensitive parameters replaced “]},{“file”:”/usr/share/nextcloud/lib/private/DB/SchemaWrapper.php",“line”:43,“function”:“createSchema”,“class”:“OC\DB\Connection”,“type”:“->”,“args”:[" sensitive parameters replaced “]},{“file”:”/usr/share/nextcloud/lib/private/DB/MigrationService.php",“line”:523,“function”:“__construct”,“class”:“OC\DB\SchemaWrapper”,“type”:“->”},{“file”:“/usr/share/nextcloud/core/Migrations/Version25000Date20220905140840.php”,“line”:44,“function”:“OC\DB\{closure}”,“class”:“OC\DB\MigrationService”,“type”:“->”,“args”:[" sensitive parameters replaced “]},{“file”:”/usr/share/nextcloud/lib/private/DB/MigrationService.php",“line”:524,“function”:“changeSchema”,“class”:“OC\Core\Migrations\Version25000Date20220905140840”,“type”:“->”},{“file”:“/usr/share/nextcloud/lib/private/DB/MigrationService.php”,“line”:417,“function”:“executeStep”,“class”:“OC\DB\MigrationService”,“type”:“->”},{“file”:“/usr/share/nextcloud/lib/private/Updater.php”,“line”:322,“function”:“migrate”,“class”:“OC\DB\MigrationService”,“type”:“->”},{“file”:“/usr/share/nextcloud/lib/private/Updater.php”,“line”:261,“function”:“doCoreUpgrade”,“class”:“OC\Updater”,“type”:“->”},{“file”:“/usr/share/nextcloud/lib/private/Updater.php”,“line”:140,“function”:“doUpgrade”,“class”:“OC\Updater”,“type”:“->”},{“file”:“/usr/share/nextcloud/core/ajax/update.php”,“line”:185,“function”:“upgrade”,“class”:“OC\Updater”,“type”:“->”}],“File”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php”,“Line”:30,“Previous”:{“Exception”:“PDOException”,“Message”:“SQLSTATE[HY000]: General error: 1 near "(": syntax error”,“Code”:“HY000”,“Trace”:[{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php”,“line”:60,“function”:“prepare”,“class”:“PDO”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Connection.php”,“line”:1042,“function”:“prepare”,“class”:“Doctrine\DBAL\Driver\PDO\Connection”,“type”:“->”},{“file”:“/usr/share/nextcloud/lib/private/DB/Connection.php”,“line”:262,“function”:“executeQuery”,“class”:“Doctrine\DBAL\Connection”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Connection.php”,“line”:849,“function”:“executeQuery”,“class”:“OC\DB\Connection”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Schema/SqliteSchemaManager.php”,“line”:207,“function”:“fetchAllAssociative”,“class”:“Doctrine\DBAL\Connection”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php”,“line”:228,“function”:“_getPortableTableIndexesList”,“class”:“Doctrine\DBAL\Schema\SqliteSchemaManager”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php”,“line”:328,“function”:“listTableIndexes”,“class”:“Doctrine\DBAL\Schema\AbstractSchemaManager”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Schema/SqliteSchemaManager.php”,“line”:572,“function”:“listTableDetails”,“class”:“Doctrine\DBAL\Schema\AbstractSchemaManager”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php”,“line”:306,“function”:“listTableDetails”,“class”:“Doctrine\DBAL\Schema\SqliteSchemaManager”,“type”:“->”},{“file”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Schema/AbstractSchemaManager.php”,“line”:1229,“function”:“listTables”,“class”:“Doctrine\DBAL\Schema\AbstractSchemaManager”,“type”:“->”},{“file”:“/usr/share/nextcloud/lib/private/DB/Migrator.php”,“line”:98,“function”:“createSchema”,“class”:“Doctrine\DBAL\Schema\AbstractSchemaManager”,“type”:“->”,“args”:[" sensitive parameters replaced “]},{“file”:”/usr/share/nextcloud/lib/private/DB/Connection.php",“line”:570,“function”:“createSchema”,“class”:“OC\DB\Migrator”,“type”:“->”,“args”:[" sensitive parameters replaced “]},{“file”:”/usr/share/nextcloud/lib/private/DB/SchemaWrapper.php",“line”:43,“function”:“createSchema”,“class”:“OC\DB\Connection”,“type”:“->”,“args”:[" sensitive parameters replaced “]},{“file”:”/usr/share/nextcloud/lib/private/DB/MigrationService.php",“line”:523,“function”:“__construct”,“class”:“OC\DB\SchemaWrapper”,“type”:“->”},{“file”:“/usr/share/nextcloud/core/Migrations/Version25000Date20220905140840.php”,“line”:44,“function”:“OC\DB\{closure}”,“class”:“OC\DB\MigrationService”,“type”:“->”,“args”:[" sensitive parameters replaced ***”]},{“file”:“/usr/share/nextcloud/lib/private/DB/MigrationService.php”,“line”:524,“function”:“changeSchema”,“class”:“OC\Core\Migrations\Version25000Date20220905140840”,“type”:“->”},{“file”:“/usr/share/nextcloud/lib/private/DB/MigrationService.php”,“line”:417,“function”:“executeStep”,“class”:“OC\DB\MigrationService”,“type”:“->”},{“file”:“/usr/share/nextcloud/lib/private/Updater.php”,“line”:322,“function”:“migrate”,“class”:“OC\DB\MigrationService”,“type”:“->”},{“file”:“/usr/share/nextcloud/lib/private/Updater.php”,“line”:261,“function”:“doCoreUpgrade”,“class”:“OC\Updater”,“type”:“->”},{“file”:“/usr/share/nextcloud/lib/private/Updater.php”,“line”:140,“function”:“doUpgrade”,“class”:“OC\Updater”,“type”:“->”},{“file”:“/usr/share/nextcloud/core/ajax/update.php”,“line”:185,“function”:“upgrade”,“class”:“OC\Updater”,“type”:“->”}],“File”:“/usr/share/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php”,“Line”:60}}},“message”:“Database error when running migration 25000Date20220905140840 for app core\nAn exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 near "(": syntax error”,“exception”:{},“CustomMessage”:“Database error when running migration 25000Date20220905140840 for app core\nAn exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 near "(": syntax error”}}
“app”:“updater”,“method”:“GET”,“url”:“/nextcloud/core/ajax/update.php?requesttoken=…”,“message”:“\OC\Updater::failure: Exception: Database error when running migration 25000Date20220905140840 for app core\nAn exception occurred while executing a query: SQLSTATE[HY000]: General error: 1 near "(": syntax error”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0”,“version”:“25.0.6.1”,“data”:{“app”:“updater”}}
“app”:“updater”,“method”:“GET”,“url”:“/nextcloud/core/ajax/update.php?requesttoken=…”,“message”:“\OC\Updater::updateEnd: Update failed”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0”,“version”:“25.0.6.1”,“data”:{“app”:“updater”}}
“app”:“updater”,“method”:“GET”,“url”:“/nextcloud/core/ajax/update.php?requesttoken=…”,“message”:“\OC\Updater::maintenanceActive: Maintenance mode is kept active”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0”,“version”:“25.0.6.1”,“data”:{“app”:“updater”}}
“app”:“updater”,“method”:“GET”,“url”:“/nextcloud/core/ajax/update.php?requesttoken=…”,“message”:“\OC\Updater::resetLogLevel: Reset log level to Warning(2)”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0”,“version”:“25.0.6.1”,“data”:{“app”:“updater”}}

`

It seems the updater is trying to update an sqlite database instead of a mariadb/mysql database that is used by nextcloud on nethserver.

grep \'db /usr/share/nextcloud/config/config.php |grep -v dbpass

How was the update started (from software center / yum update or from within nextcloud)?

Also, what is the latest rpm installed?

rpm -q nethserver-nextcloud
1 Like

Hello Marc,
thank you for your answer
the nextcloud update was not started by me, it just appears when I try to open the nextcloud login page

I usually update nethserver at the command line by running:
yum --disablerepo=epel,centos-sclo\* update (found here)

# grep \'db /usr/share/nextcloud/config/config.php |grep -v dbpass
  'dbtype' => 'sqlite3',
# rpm -q nethserver-nextcloud
nethserver-nextcloud-1.22.0-1.ns7.noarch

I should mention, that I messed up the nextcloud Installation in June 2021 so maybe something is not as it should be. But after that time nextcloud seemed to be running without problems.
see https://community.nethserver.org/t/solved-problems-with-nextcloud-after-june-2021-update/18529

Uwe

That one is from the latest update that brings nextcloud 26.0.2. So the update was done by yum update / rpm package.

Check the config.php file as it could be wrong or incomplete (missing db*** settings: dbhost, dbport, dbname, dbuser…), so you might need to rely on a backup of that file.

1 Like

The nextserver config file from backup June 09 is almost identical to the current one, except the line 'theme' => '', in the current one. There is 'dbtype' => 'sqlite3' too.
The update from nethserver-nextcloud-1.21.4-1.ns7.noarch to 1.22.0-1.ns7.noarch happened on June 16.

As there is just one user using nextcloud, I think it would be best to completely remove nextcloud including database and config files and do a fresh install using nethserver standard (with mariadb).
Would this be possible?
What would I have to delete after uninstalling nextcloud? (besides saving /usr/share/nextcloud/data of course?
If this is not so simple, I will have to buy a support ticket, we’ve got a Crostino Subscription.

Here is some documentation, but I don’t know how up-to-date it is…

https://docs.nethserver.org/projects/nethserver-devel/en/latest/nethserver-nextcloud.html#full-reinstall

thank you, will have a look at this

might the mentioned sqlite3-DB be /usr/share/nextcloud/data/owncloud.db ?
It has 2MB and timestamp is from the last nethserver-nextcloud Update.
Anyway, there is userdata inside and I will remove this file with the whole data directory

unfortunately the clean reinstallation did not work as expected
Message after installing via “Applications”: command failed: system-packages/update
copied into terminal and ran => end state was success
when I open https://servername/nextcloud, there is no preconfiguration, I have to choose mysql, sqlite is default

This is an enterprise installation, I will call support now.
Uwe

Good, but I wonder why you did not do execute that right in the first place?

I did, but I ended up with lots of error messages.
Support said: The module and its components were partially compromised by the remove attempts so I had to rebuild the istance the scratch.

Fair enough. I hope it all works out!