Nextcloud upgrade 15 > 18 failed

:uk:/:us:

My YunoHost server

Hardware: Raspberry Pi at home
YunoHost version: 3.7.0
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

The Nexcloud upgrade from 15 to 18 fails. I have tried twice and it ends up with a rollback. The logs shows an upgrade to versio, 16, 17, 18, then 18.02 and then I get an error related to fail2ban.

Logs are below.

When I look at fail2ban, I can see this lastlog_openseek: Couldn't stat /var/log/lastlog: No such file or directory. Not sure it is what causes the failure. Is this supposed to be a file, a directory ? What if I create it myself ?


:fr:

Mon serveur YunoHost

Matériel: Raspberry Pi à la maison
Version de YunoHost: 3.7.0
J’ai accès à mon serveur : En SSH |& Par la webadmin
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non

Description du problème

J’ai tenté 2x la mise à jour de Nextcloud et j’ai eu 2 échecs. Les logs montrent une mise à jour vers les versions 16, 17, 18, puis 18.02. Ensuite le script échoue sur fail2ban.

Si je cherche du côté de fail2ban je trouve ceci lastlog_openseek: Couldn't stat /var/log/lastlog: No such file or directory. Je ne sais pas si c’est la cause du problème. Est-ce que c’est sensé être un fichier ? un répertoire ? Est-ce que je peux le créer moi même ?

2020-03-28 20:55:58,586: WARNING - Job for fail2ban.service failed because the control process exited with error code.
2020-03-28 20:55:58,588: WARNING - See "systemctl status fail2ban.service" and "journalctl -xe" for details.
2020-03-28 20:55:58,791: DEBUG - + test -e /var/log/fail2ban/fail2ban.log
2020-03-28 20:55:58,792: WARNING - -- Logs begin at Thu 2016-11-03 17:16:44 GMT, end at Sat 2020-03-28 20:55:58 GMT. --
2020-03-28 20:55:58,794: DEBUG - + false
2020-03-28 20:55:58,795: WARNING - mars 27 21:53:44 piwi.nohost.me systemd[1]: fail2ban.service: Control process exited, code=exited status=255
2020-03-28 20:55:58,797: DEBUG - + ynh_exit_properly
2020-03-28 20:55:58,798: WARNING - mars 27 21:53:44 piwi.nohost.me systemd[1]: Reload failed for Fail2Ban Service.
2020-03-28 20:55:58,800: DEBUG - + local exit_code=1
2020-03-28 20:55:58,801: WARNING - mars 27 21:55:42 piwi.nohost.me systemd[1]: Reloading Fail2Ban Service.
2020-03-28 20:55:58,803: DEBUG - + '[' 1 -eq 0 ']'
2020-03-28 20:55:58,803: WARNING - mars 27 21:55:50 piwi.nohost.me fail2ban-client[17802]: ERROR  NOK: ('unorderable types: str() < int()',)
2020-03-28 20:55:58,805: DEBUG - + trap '' EXIT
2020-03-28 20:55:58,806: WARNING - mars 27 21:55:51 piwi.nohost.me systemd[1]: fail2ban.service: Control process exited, code=exited status=255
2020-03-28 20:55:58,808: DEBUG - + set +eu
2020-03-28 20:55:58,809: WARNING - mars 27 21:55:51 piwi.nohost.me systemd[1]: Reload failed for Fail2Ban Service.
2020-03-28 20:55:58,811: DEBUG - + sleep 0.5
2020-03-28 20:55:58,812: WARNING - mars 27 22:05:14 piwi.nohost.me systemd[1]: Stopping Fail2Ban Service...
2020-03-28 20:55:58,814: WARNING - mars 27 22:05:22 piwi.nohost.me fail2ban-client[22527]: Shutdown successful
2020-03-28 20:55:58,816: WARNING - mars 27 22:05:22 piwi.nohost.me systemd[1]: Stopped Fail2Ban Service.
2020-03-28 20:55:58,818: WARNING - mars 27 22:05:22 piwi.nohost.me systemd[1]: fail2ban.service: Unit entered failed state.
2020-03-28 20:55:58,820: WARNING - mars 27 22:05:22 piwi.nohost.me systemd[1]: fail2ban.service: Failed with result 'exit-code'.
2020-03-28 20:55:58,822: WARNING - mars 27 22:05:22 piwi.nohost.me systemd[1]: Starting Fail2Ban Service...
2020-03-28 20:55:58,824: WARNING - mars 27 22:05:23 piwi.nohost.me fail2ban-client[22575]: 2020-03-27 22:05:23,932 fail2ban.server         [22576]: INFO    Starting Fail2ban v0.9.6
2020-03-28 20:55:58,826: WARNING - mars 27 22:05:23 piwi.nohost.me fail2ban-client[22575]: 2020-03-27 22:05:23,933 fail2ban.server         [22576]: INFO    Starting in daemon mode
2020-03-28 20:55:58,828: WARNING - mars 27 22:05:24 piwi.nohost.me fail2ban-client[22575]: ERROR  NOK: ('unorderable types: str() < int()',)
2020-03-28 20:55:58,830: WARNING - mars 27 22:05:25 piwi.nohost.me systemd[1]: Started Fail2Ban Service.
2020-03-28 20:55:58,832: WARNING - mars 28 20:55:45 piwi.nohost.me systemd[1]: Reloading Fail2Ban Service.
2020-03-28 20:55:58,834: WARNING - mars 28 20:55:56 piwi.nohost.me fail2ban-client[20218]: ERROR  NOK: ('unorderable types: str() < int()',)
2020-03-28 20:55:58,836: WARNING - mars 28 20:55:58 piwi.nohost.me systemd[1]: fail2ban.service: Control process exited, code=exited status=255
2020-03-28 20:55:58,837: WARNING - mars 28 20:55:58 piwi.nohost.me systemd[1]: Reload failed for Fail2Ban Service.
2020-03-28 20:55:59,341: DEBUG - + type -t ynh_clean_setup
2020-03-28 20:55:59,342: WARNING - e[91me[1m[ERR]e[0m Upgrade failed.
2020-03-28 20:55:59,344: DEBUG - + ynh_clean_setup
1 Like

It’s a file

-rw-rw-r-- 1 root utmp 294628 Mar 29 12:32 /var/log/lastlog

Thanks @ljf. I have created the file and it’s no more complaining about this missing file.

But the upgrade still doesn’t work. It seems that everything is fine, Nextcloud is upgraded, then logrotate, but at the very end fail2ban fails to be reconfigured.

2020-03-29 14:41:56,110: INFO - [################+...] > Upgrading logrotate configuration...
...
2020-03-29 14:41:56,438: INFO - [#################+..] > Reconfiguring fail2ban...
2020-03-29 14:41:59,101: DEBUG - + '[' reload == reload ']'
2020-03-29 14:41:59,102: DEBUG - + action=reload-or-restart
2020-03-29 14:41:59,103: DEBUG - + systemctl reload-or-restart fail2ban
2020-03-29 14:42:12,448: DEBUG - + journalctl --no-pager --lines=20 -u fail2ban
2020-03-29 14:42:12,449: WARNING - Job for fail2ban.service failed because the control process exited with error code.
2020-03-29 14:42:12,451: WARNING - See "systemctl status fail2ban.service" and "journalctl -xe" for details.
2020-03-29 14:42:12,553: DEBUG - + test -e /var/log/fail2ban/fail2ban.log
2020-03-29 14:42:12,554: WARNING - -- Logs begin at Thu 2016-11-03 17:16:44 GMT, end at Sun 2020-03-29 14:42:12 BST. --
2020-03-29 14:42:12,556: DEBUG - + false
2020-03-29 14:42:12,557: WARNING - mars 28 20:55:58 piwi.nohost.me systemd[1]: fail2ban.service: Control process exited, code=exited status=255
2020-03-29 14:42:12,560: DEBUG - + ynh_exit_properly
2020-03-29 14:42:12,561: WARNING - mars 28 20:55:58 piwi.nohost.me systemd[1]: Reload failed for Fail2Ban Service.
2020-03-29 14:42:12,563: DEBUG - + local exit_code=1
2020-03-29 14:42:12,564: WARNING - mars 28 20:57:50 piwi.nohost.me systemd[1]: Reloading Fail2Ban Service.
2020-03-29 14:42:12,567: DEBUG - + '[' 1 -eq 0 ']'
2020-03-29 14:42:12,569: WARNING - mars 28 20:57:59 piwi.nohost.me fail2ban-client[23846]: ERROR  NOK: ('unorderable types: str() < int()',)
2020-03-29 14:42:12,572: DEBUG - + trap '' EXIT
2020-03-29 14:42:12,573: WARNING - mars 28 20:58:00 piwi.nohost.me systemd[1]: fail2ban.service: Control process exited, code=exited status=255
2020-03-29 14:42:12,576: DEBUG - + set +eu
2020-03-29 14:42:12,577: WARNING - mars 28 20:58:00 piwi.nohost.me systemd[1]: Reload failed for Fail2Ban Service.
2020-03-29 14:42:12,580: DEBUG - + sleep 0.5
2020-03-29 14:42:12,581: WARNING - mars 28 21:07:28 piwi.nohost.me systemd[1]: Stopping Fail2Ban Service...
2020-03-29 14:42:12,584: WARNING - mars 28 21:07:36 piwi.nohost.me fail2ban-client[28562]: Shutdown successful
2020-03-29 14:42:12,587: WARNING - mars 28 21:07:36 piwi.nohost.me systemd[1]: Stopped Fail2Ban Service.
2020-03-29 14:42:12,590: WARNING - mars 28 21:07:36 piwi.nohost.me systemd[1]: fail2ban.service: Unit entered failed state.
2020-03-29 14:42:12,593: WARNING - mars 28 21:07:36 piwi.nohost.me systemd[1]: fail2ban.service: Failed with result 'exit-code'.
2020-03-29 14:42:12,595: WARNING - mars 28 21:07:36 piwi.nohost.me systemd[1]: Starting Fail2Ban Service...
2020-03-29 14:42:12,598: WARNING - mars 28 21:07:37 piwi.nohost.me fail2ban-client[28610]: 2020-03-28 21:07:37,873 fail2ban.server         [28611]: INFO    Starting Fail2ban v0.9.6
2020-03-29 14:42:12,601: WARNING - mars 28 21:07:37 piwi.nohost.me fail2ban-client[28610]: 2020-03-28 21:07:37,874 fail2ban.server         [28611]: INFO    Starting in daemon mode
2020-03-29 14:42:12,604: WARNING - mars 28 21:07:38 piwi.nohost.me fail2ban-client[28610]: ERROR  NOK: ('unorderable types: str() < int()',)
2020-03-29 14:42:12,607: WARNING - mars 28 21:07:40 piwi.nohost.me systemd[1]: Started Fail2Ban Service.
2020-03-29 14:42:12,610: WARNING - mars 29 14:41:59 piwi.nohost.me systemd[1]: Reloading Fail2Ban Service.
2020-03-29 14:42:12,612: WARNING - mars 29 14:42:10 piwi.nohost.me fail2ban-client[17567]: ERROR  NOK: ('unorderable types: str() < int()',)
2020-03-29 14:42:12,615: WARNING - mars 29 14:42:12 piwi.nohost.me systemd[1]: fail2ban.service: Control process exited, code=exited status=255
2020-03-29 14:42:12,619: WARNING - mars 29 14:42:12 piwi.nohost.me systemd[1]: Reload failed for Fail2Ban Service.
2020-03-29 14:42:13,026: DEBUG - + type -t ynh_clean_setup
2020-03-29 14:42:13,028: DEBUG - + ynh_clean_setup
2020-03-29 14:42:13,029: DEBUG - + ynh_exec_warn_less ynh_secure_remove --file=/tmp/owncloud_post_migration.sh
2020-03-29 14:42:13,030: DEBUG - + eval ynh_secure_remove --file=/tmp/owncloud_post_migration.sh
2020-03-29 14:42:13,030: DEBUG - ++ ynh_secure_remove --file=/tmp/owncloud_post_migration.sh
2020-03-29 14:42:13,032: DEBUG - ++ local legacy_args=f
2020-03-29 14:42:13,033: DEBUG - ++ args_array=([f]=file=)
2020-03-29 14:42:13,035: DEBUG - ++ declare -Ar args_array
2020-03-29 14:42:13,036: DEBUG - ++ local file
2020-03-29 14:42:13,037: DEBUG - ++ ynh_handle_getopts_args --file=/tmp/owncloud_post_migration.sh
2020-03-29 14:42:13,038: DEBUG - ++ set +x
2020-03-29 14:42:13,140: DEBUG - ++ local 'forbidden_path=     /var/www     /home/yunohost.app'
2020-03-29 14:42:13,141: WARNING - e[91me[1m[ERR]e[0m Upgrade failed.

I have started again on a fresh new install. Then restored the Nextcloud backup. The upgrade is fine.

The only last problem is this one : I can’t connect to app store. Is it due to the upgrade ? Maybe I shoud open a separate ticket.

[appstoreFetcher] Warning: Could not connect to appstore: cURL error 28: Operation timed out after 10000 milliseconds with 4162112 out of 4616188 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.