tscheepy
(Robert )
September 10, 2022, 6:08pm
1
Nethserver 7.9.2009
Nextcloud 20.0.8
When I try to activate app calendar 3.0.6 through nextcloud web-interface I get the following MySQL-error:
An exception occurred while executing 'SELECT DISTINCT k.
CONSTRAINT_NAME, k.
COLUMN_NAME, k.
REFERENCED_TABLE_NAME, k.
REFERENCED_COLUMN_NAME /*!50116 , c.update_rule, c.delete_rule */ FROM information_schema.key_column_usage k /*!50116 INNER JOIN information_schema.referential_constraints c ON c.constraint_name = k.constraint_name AND c.table_name = 'oc_documents_op' */ WHERE k.table_name = 'oc_documents_op' AND k.table_schema = 'nextcloud' /*!50116 AND c.constraint_schema = 'nextcloud' */ AND k.
REFERENCED_COLUMN_NAME is not NULL': SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
I would be very grateful for some advice for next steps of troubleshooting. Thanks a lot!
mrmarkuz
(Markus Neuberger)
September 10, 2022, 7:11pm
2
I found a related issue, did you open it?
Maybe someone could help me understanding a MySQL-error-message. When I try to install the calendar-app from within the nextcloud-admin-interface, I get this error: An exception occured while executing 'SELECT DISTINCT k.`CONSTRAINT_NAME`,...
tscheepy:
Nextcloud 20.0.8
The current NethServer Nextcloud version is 23.0.8, if itās not a typo please update your NethServer.
Does the NethServer have enough RAM?
tscheepy
(Robert )
September 10, 2022, 7:26pm
3
Thank you for the extremely fast feedback!
Yes, I opened exactly that issue.
I remember the problem occured first when I tried to upgrade Nextcloud using Migration scripts.
NethServer uses about 1.3 GB out of 4.
mrmarkuz
(Markus Neuberger)
September 10, 2022, 7:50pm
4
NethServer Nextcloud 20.0.8 uses the old mariadb 5 database engine, the more recent mariadb 10 was introduced with Neth Nextcloud 21.
I think you donāt need the scripts, because itās just an update from 20 to 21. It should be possible to update in Software Center.
OK, so RAM shouldnāt be an issue.
tscheepy
(Robert )
September 10, 2022, 8:24pm
5
It should be possible to update in Software Center.
Software Center says that I can update to nethserver-nextcloud 1.19.7 from 1.16.6-1.ns7 current. Are you sure thatās an update from Nextcloud 20 to 21 - from one major release to the following?
mrmarkuz
(Markus Neuberger)
September 10, 2022, 8:29pm
6
You are right. Thatās an update from 20 to 23. You need to update on command line:
Update to 20.0.9:
yum update nethserver-nextcloud-1.16.7-1.ns7
Update to 21.0.3:
yum update nethserver-nextcloud-1.17.1-1.ns7
Update to 22.1.1:
yum update nethserver-nextcloud-1.18.0-1.ns7
Now you can update from Software Center.
1 Like
mrmarkuz
(Markus Neuberger)
September 10, 2022, 8:46pm
9
To downgrade to the next major version (NC 21.0.3):
yum downgrade nethserver-nextcloud-1.17.1-1.ns7
1 Like
tscheepy
(Robert )
September 10, 2022, 8:56pm
10
Thanks, I will try these commands gradually.
1 Like
tscheepy
(Robert )
September 10, 2022, 9:35pm
11
All theses commands worked without errors. Thank you.
But now web-interface says, that nextcloud will be updated to 23.0.8 and when I start the update, it shows
Exception: Updates between multiple major versions and downgrades are unsupported.
tscheepy
(Robert )
September 10, 2022, 9:37pm
12
Is there a configfile, where I have to change a nextcloud versionnumber manually, too?
tscheepy
(Robert )
September 10, 2022, 9:39pm
13
nextcloud config.php says āversionā => ā20.0.8.1ā,
mrmarkuz
(Markus Neuberger)
September 10, 2022, 9:40pm
14
No, thatās another method.
What version do you have installed now?
rpm -qa nethserver-nextcloud
I think you just need to update step by step as described here:
mrmarkuz:
Update to 20.0.9:
yum update nethserver-nextcloud-1.16.7-1.ns7
Update to 21.0.3:
yum update nethserver-nextcloud-1.17.1-1.ns7
Update to 22.1.1:
yum update nethserver-nextcloud-1.18.0-1.ns7
tscheepy
(Robert )
September 10, 2022, 9:46pm
16
What about replacing 'versionā => ā20.0.8.1ā with āversionā => ā23.0.8ā in config.php?
mrmarkuz
(Markus Neuberger)
September 10, 2022, 9:51pm
17
I donāt know why the version isnāt raised after the step-by-step updates. Did you miss a step?
If you have a backup you could also try the b) method in the wiki but thereās a db migration from 20 to 21 that may cause issues.
Maybe start again with version 20:
yum downgrade nethserver-nextcloud-1.16.7-1.ns7
tscheepy
(Robert )
September 10, 2022, 9:57pm
18
No, I did every step and anything worked without an error.
mrmarkuz
(Markus Neuberger)
September 10, 2022, 10:02pm
19
Does the new db exist?
[root@server2 ~]# /opt/rh/rh-mariadb105/root/bin/mysqlshow --socket=/var/run/rh-mariadb105-mariadb/nextcloud-mysql.sock
+--------------------+
| Databases |
+--------------------+
| information_schema |
| mysql |
| nextcloud |
| performance_schema |
+--------------------+
Letās check the old db too:
mysqlshow
tscheepy
(Robert )
September 10, 2022, 10:06pm
20
Yes, it looks like yours and mysqlshow shows
+--------------------+
| Databases |
+--------------------+
| information_schema |
| mysql |
| nextcloud |
| oscdb |
| performance_schema |
| roundcubemail |
+--------------------+
mrmarkuz
(Markus Neuberger)
September 10, 2022, 10:13pm
21
Usually when the DB is migrated the old DB should be deleted. Maybe something went wrong during db migration.
Iām going to try to reproduce itā¦
tscheepy
(Robert )
September 10, 2022, 10:17pm
22
For Reproduction: I did not the downgrade so far, Iām still at
nethserver-nextcloud-1.19.7-1.ns7.noarch