Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daily updates to Nextcloud 28.0.9 reported on NCP 1.55.1 #1979

Open
Knubbel opened this issue Sep 18, 2024 · 17 comments
Open

Daily updates to Nextcloud 28.0.9 reported on NCP 1.55.1 #1979

Knubbel opened this issue Sep 18, 2024 · 17 comments
Assignees

Comments

@Knubbel
Copy link

Knubbel commented Sep 18, 2024

System information

NextcloudPi version  v1.55.1
NextcloudPi image    NextCloudPi_RaspberryPi_v1.51.0.img
OS                   Debian GNU/Linux 11. 6.1.21-v8+ (aarch64)
automount            yes
USB devices          sda
datadir              /media/USB1/ncdata/data
data in SD           no
data filesystem      ext2/ext3
data disk usage      84G/939G
rootfs usage         6,4G/30G
swapfile             /var/swap
dbdir                /media/USBdrive/ncdatabase
Nextcloud check      ok
Nextcloud version    28.0.9.1
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
HPB service          up
Postfix service      up
Internet check       ok
Public IPv4          ***REMOVED SENSITIVE VALUE***
Public IPv6          ***REMOVED SENSITIVE VALUE***
Port 80              [N/A]
Port 443             [N/A]
IP                   ***REMOVED SENSITIVE VALUE***
Gateway              ***REMOVED SENSITIVE VALUE***
Interface            eth0
Certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         yes
Uptime               39days

After NCP has autoupdated to v1.55.1 my NCP instance reports "Nextcloud was updated to 28.0.9" every single morning.
I do not know if actually a daily update somehow happens or if just the messaging is nuts.

Other than that the instance seems to be running normally.

NextCloudPi logs show the following entry:

[ nc-update-nc-apps-auto ]
checking for updates...
[ncp-update-nc]
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 876k 100 876k 0 0 2960k 0 --:--:-- --:--:-- --:--:-- 2960k
Could not find a valid upgrade path from '28.0.9' to ''. Nothing to update.

Later the message turned into:

[ncp-update-nc]
**Failed to reset failed state of unit ncp-encrypt.service: Unit ncp-encrypt.service not loaded.**
Running as unit: ncp-update-nc.service
**Nextcloud version 28.0.9 is already installed. Nothing to do.
Nextcloud update finished successfully.**

All this started on August 29th 2024.

At exactly this same time my auto backups stopped working.

Maintenance mode already enabled
backup database...
**mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `oc_text_steps` at row: 3**
Abort...
@new-on-github
Copy link

Same problem here.

@theCalcaholic theCalcaholic self-assigned this Sep 19, 2024
@theCalcaholic
Copy link
Collaborator

Thank you, I suspect that this is only an issue with the notifications (because your logs would be much larger if the update was actually performed daily).
I need to have a look at your issue with the auto backups though - likely a separate issue (with the latest NC version maybe), but might be more serious.

@new-on-github Do you experience the same issue with the auto backups by any chance?

@new-on-github
Copy link

I recognized last week that a was on a old Nextcloud version, despite ncp-autoupdate-nc was turned on. While trying to manually update the Nextcloud version, the backup process also failed because the connection to the mysql database failed. The workaround was to change something in the config of the mysql-database. If I remember it correct, it was something like this:

[mysqld]
max_allowed_packet = 160M
net_read_timeout = 300
net_write_timeout = 600
innodb_buffer_pool_size = 2G

[mysqldump]
max_allowed_packet = 160M

Afterwards the backup worked and therefore the update to. But now I manually updated to 29.0.7 and cannot know, if the auto update is working, because this is the most recent Nextcloud version.

@theCalcaholic Thanks for your work!

@Knubbel
Copy link
Author

Knubbel commented Sep 19, 2024

the backup process also failed because the connection to the mysql database failed. The workaround was to change something in the config of the mysql-database. If I remember it correct, it was something like this:

[mysqld]
max_allowed_packet = 160M
net_read_timeout = 300
net_write_timeout = 600
innodb_buffer_pool_size = 2G

[mysqldump]
max_allowed_packet = 160M

Afterwards the backup worked and therefore the update to.

Can you tell me which config file this was and under which path? Maybe I could try this as well.
I wonder, what causes this MySQL connection problem.

@new-on-github
Copy link

the backup process also failed because the connection to the mysql database failed. The workaround was to change something in the config of the mysql-database. If I remember it correct, it was something like this:

[mysqld]
max_allowed_packet = 160M
net_read_timeout = 300
net_write_timeout = 600
innodb_buffer_pool_size = 2G

[mysqldump]
max_allowed_packet = 160M

Afterwards the backup worked and therefore the update to.

Can you tell me which config file this was and under which path? Maybe I could try this as well. I wonder, what causes this MySQL connection problem.

I added this to the mysql config file in

/etc/mysql/my.cnf

@FadeFx
Copy link

FadeFx commented Sep 20, 2024

I have the same issue and I can not update it any further as when I try to I get an error message

ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’

Looks like something with mariadb access

@Knubbel
Copy link
Author

Knubbel commented Sep 20, 2024

the backup process also failed because the connection to the mysql database failed. The workaround was to change something in the config of the mysql-database. If I remember it correct, it was something like this:

[mysqld]
max_allowed_packet = 160M
net_read_timeout = 300
net_write_timeout = 600
innodb_buffer_pool_size = 2G

[mysqldump]
max_allowed_packet = 160M

Afterwards the backup worked and therefore the update to.

Can you tell me which config file this was and under which path? Maybe I could try this as well. I wonder, what causes this MySQL connection problem.

I added this to the mysql config file in

/etc/mysql/my.cnf

Thanks so much! I tried this (and didnt even need to reboot). With the config change the manual backup worked again:

[ nc-backup ] (Fri Sep 20 07:49:59 CEST 2024)
Installing template 'ncp-metrics.cfg.sh'...
check free space...
Maintenance mode enabled
backup database...
backup files...
backup /media/USBdrive/ncp-backups/nextcloud-bkp_20240920_1726811409.tar.gz generated
Maintenance mode disabled

Since I am a low IT skill user I do not know what the config really did, but it solved this part of the issue.

@Knubbel
Copy link
Author

Knubbel commented Sep 20, 2024

Just one more information: my Raspi still uses PHP 8.1.29 (not on PHP 8.3)
MariaDB is mysqld Ver 10.5.26-MariaDB-0+deb11u2

What I did not read from the releasenotes is that
NCP doesn't support Nextcloud versions greater than 28 with Debian 11 (Bullseye). Please run ncp-dist-upgrade.

@FadeFx
Copy link

FadeFx commented Sep 20, 2024

I have the same issue and I can not update it any further as when I try to I get an error message

ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’

Looks like something with mariadb access

@theCalcaholic do u have any idea about this? Nectcloud is running normally and i can do backups in ncp. I am however a bit worried, that my backups may be dysfunctional due to this db access problem, althou they look correct.

@theCalcaholic
Copy link
Collaborator

theCalcaholic commented Sep 21, 2024

I have the same issue and I can not update it any further as when I try to I get an error message

ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’

Looks like something with mariadb access

That actually sounds like a separate issue. The original issue is related to timeouts when performing the database dump but doesn't have general issues with accessing the db.

Do I understand correctly that this only affects automatic backups during updates, but manual backups from ncp-config still work?

@FadeFx
Copy link

FadeFx commented Sep 21, 2024

you are right, only the update process is affected. However, i am not yet sure it is related to the backup. any way to skip the backup in the update process for testing?

@FadeFx
Copy link

FadeFx commented Sep 21, 2024

[ nc-backup ] (Sat Sep 21 06:17:10 BST 2024)
Installing template 'ncp-metrics.cfg.sh'...
check free space...
clean up old backup /media/USBdrive/ncp-backups/nextcloud-bkp_20240901_1725156006.tar.gz
Maintenance mode enabled
backup database...
backup files...
backup /media/USBdrive/ncp-backups/nextcloud-bkp_20240921_1726895844.tar.gz generated
Maintenance mode disabled

@FadeFx
Copy link

FadeFx commented Sep 21, 2024

That is the full output of the update attempt

[ nc-update-nextcloud ] (Sun Sep 15 08:57:28 BST 2024)
Failed to reset failed state of unit ncp-encrypt.service: Unit ncp-encrypt.service not loaded.
Running as unit: ncp-update-nc.service
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

Current Nextcloud version 28.0.9
Requested Nextcloud version latest
Selected Nextcloud version 28.0.10
INFO: You have requested an update to ‘latest’, but a direct update to ‘latest’ cannot be performed, so the latest available version that can be updated to (28.0.10) has been selected automatically.
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: NO)
Nextcloud update finished successfully.

@FadeFx
Copy link

FadeFx commented Sep 21, 2024

Probably the (using password: NO) part is key here?
Loging in to the database server with root works without issues

fadefx@nextcloudpi:~ $ mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
fadefx@nextcloudpi:~ $ sudo mysql -u root
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2769
Server version: 10.11.6-MariaDB-0+deb12u1 Debian 12

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

@schoetju
Copy link
Contributor

As an FYI: I faced mysql issues during nc-restore (as described in forum
Solution in my case: Start nc-limits to create/update mysql configuration.

@FadeFx
Copy link

FadeFx commented Sep 22, 2024

As an FYI: I faced mysql issues during nc-restore (as described in forum Solution in my case: Start nc-limits to create/update mysql configuration.

Thinking about doing so in a few days when I find time...

@dwprod38
Copy link

dwprod38 commented Sep 23, 2024

Same bug with daily updated version 28.0.10 message... How to solve it ?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants