Hardware: Raspberry Pi at home YunoHost version: 4.1.4.4 I have access to my server : Through SSH | through the webadmin | Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
Description of my issue
Hello,
I tried to update NextCloud to version 20. It failed after a long long time. My NextCloud updates are always slow. It was supposed to roll back. NextCloud was displayed as installed but I had a âforbiddenâ message. I tried to manually restore NextCloud, but thre restoration fails ;-(
The web admin was complaining about an illegal character. It was in a row related to the ârssâ app (some content from news papers). I could not copy the log because the web admin fails in timeout when I try to access logs. Neither does the command line sudo yunohost log list respond.
I donât care about this rss app. So here are my options :
How do I restore NextCloud without this app ?
or
How do I find the offending character and fix it. There might be several occurrences if the app or backup is buggy. I guess I can access those logs with strait command line ?
Yes it runs forever and returns nothing. Right now, since I did try to access logs about 1 hour ago, the disk is busy but the server does not answer. The ssh command does not fail. It just hangs. So either I wait for a while or I go for a hard reboot but I wish I could avoid this.
I have tried to upgrade again : it migrates to 20.0, then automatically to 20.4 (about 1 hour) and fails with this:
Info: Now upgrading nextcloud...
Info: [....................] > Loading installation settings...
Info: [+...................] > Ensuring downward compatibility...
Info: [#++++++++...........] > Backing up the app before upgrading (may take a while)...
Info: [#########++.........] > Upgrading dependencies...
Info: [###########+........] > Making sure dedicated system user exists...
Info: [############........] > Upgrading PHP-FPM configuration...
Info: [############+.......] > Upgrading NGINX web server configuration...
Info: The service nginx has correctly executed the action reload-or-restart.
Info: [#############+......] > Upgrading Nextcloud...
Info: Upgrade to nextcloud 20.0.0
Info: '/tmp/tmp.XQ12ojv5jD' wasn't deleted because it doesn't exist.
Warning: Starting ...
Warning: 0/0 [>---------------------------] 0% Starting ...
Info: Upgrade to nextcloud 20.0.4
Info: '/tmp/tmp.bvRc6F4wqj' wasn't deleted because it doesn't exist.
Warning: 0/0 [->--------------------------] 0% Starting ...
Warning: 0/0 [>---------------------------] 0%
Warning: In Connection.php line 72:
Warning: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused
Warning: db:add-missing-primary-keys
Warning: [Error] Upgrade failed.
Info: '/tmp/owncloud_post_migration.sh' wasn't deleted because it doesn't exist.
Warning: 230950 /!\ Packagers! You are probably using a lua regex. You should use a PCRE regex instead.
Warning: 301546 ERROR 2013 (HY000) at line 1692: Lost connection to MySQL server during query
Warning: 303479 Could not restore nextcloud
Warning: Traceback (most recent call last):
Warning: File "/usr/lib/moulinette/yunohost/backup.py", line 1388, in _restore_app
Warning: env=env_dict)[0]
Warning: File "/usr/lib/moulinette/yunohost/hook.py", line 362, in hook_exec
Warning: raise YunohostError('hook_exec_failed', path=path)
Warning: YunohostError: Could not run script: /tmp/restore9hjepR/restore
Warning: 304035 Here's an extract of the logs before the crash. It might help debugging the error:
Warning: 319396 E: Unable to locate package nextcloud-ynh-deps
Warning: 353503 The user nextcloud was not found
Warning: 357912 Nothing was restored
Warning: The app was restored to the way it was before the failed upgrade.
Error: Could not upgrade nextcloud: An error occurred inside the app upgrade script
Info: The operation 'Upgrade the 'nextcloud' app' could not be completed. Please share the full log of this operation using the command 'yunohost log display 20210115-084930-app_upgrade-nextcloud --share' to get help
Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - 74944 + echo 'Backing up data directory...'
Info: DEBUG - 74945 + ynh_backup --src_path=/home/yunohost.app/nextcloud/data --is_big
Info: DEBUG - 75154 + dest_path=
Info: DEBUG - 75155 + is_big=1
Info: DEBUG - 75155 + not_mandatory=0
Info: DEBUG - 75156 + BACKUP_CORE_ONLY=1
Info: DEBUG - 75157 + test -n nextcloud
Info: DEBUG - 75157 ++ ynh_app_setting_get --app=nextcloud --key=do_not_backup_data
Info: DEBUG - 75262 ++ [[ do_not_backup_data =~ (unprotected|protected|skipped)_ ]]
Info: DEBUG - 75263 ++ ynh_app_setting get nextcloud do_not_backup_data
Info: DEBUG - 75666 + do_not_backup_data=
Info: DEBUG - 75666 + '[' 1 -eq 1 ']'
Info: DEBUG - 75667 + '[' 0 -eq 1 ']'
Info: DEBUG - 75667 + '[' 1 -eq 1 ']'
Info: DEBUG - 75668 + '[' 1 -eq 1 ']'
Info: DEBUG - 75668 + ynh_print_info '--message=/home/yunohost.app/nextcloud/data will not be saved, because '\''BACKUP_CORE_ONLY'\'' is set.'
Info: DEBUG - 75670 + echo '/home/yunohost.app/nextcloud/data will not be saved, because '\''BACKUP_CORE_ONLY'\'' is set.'
Info: DEBUG - 75671 + return 0
Info: DEBUG - 75671 + ynh_print_info '--message=Backup script completed for nextcloud. (YunoHost will then actually copy those files to the archive).'
Info: DEBUG - 75674 + echo 'Backup script completed for nextcloud. (YunoHost will then actually copy those files to the archive).'
Info: DEBUG - 75674 + ynh_exit_properly
Error: The app 'nextcloud' failed to upgrade, and as a consequence the following apps' upgrades have been cancelled: nextcloud, rainloop, grav
Warning: unable to upgrade apps: The operation 'Upgrade the 'nextcloud' app' could not be completed. Please share the full log of this operation using the command 'yunohost log display 20210115-084930-app_upgrade-nextcloud --share' to get help
Error: Some apps could not be upgraded
If I run yunohost backup restore nextcloud-pre-upgrade2 it restores NextCloud ⊠but itâs unusable. The pages are broken. I donât know if either some css or some javascript is missing but the layout is a mess. Itâs unusable.
So right now Iâm stuck without NextCloud. No way to upgrade, no way to restore
Hello, I have the same problem.
I updated Nextcloud from 19 to 20 and Nextvloud was removed from applications. I tried to restore the backup nextcloud-pre-upgrade1 but there is an error:
Fichier YAML corrompu en lecture depuis /etc/ssowat/conf.json.persistent (raison : while scanning for the next token found character â\tâ that cannot start any token in ââ, line 2, column 25: âthemeâ : âdefaultâ, ^)