Yunohost api dead

Well then … sounds like the whole yunohost-disappeared happened because you tried to install apache2 …

Didn’t you get a huge epic warning about the fact that apache2 was conflicting with nginx and would remove yunohost, and you should very much probably not do this …?

Hum, I tried to do this, cause I read something which mentionned this workaround and I did it to try to fix my problem.

What do you recommand now ? To uninstall apache 2 ? What about the nextcloud upgrade ? Should I try to run it again ?

apache2 is probably already uninstalled because you can’t have both yunohost and apache2 installed at the same time … If you read what apt showed you when you ran command, this should have been explained to you …

I guess yes, but the fix for your issue is in the “testing” branch and nextcloud will now require Yunohost 4.1.x while you’re still in 3.8.x …

I succefully upgraded to 4.1.6. But my Nextcloud is down for the same reason (PHP zip is not installed)

    Le module PHP zip n’est pas installé.
    Veuillez demander à votre administrateur d’installer le module.
    Les modules PHP ont été installés mais sont toujours indiqués comme manquants ?
    Veuillez demander à votre administrateur serveur de redémarrer le serveur web.

And yet if I install php7.0-zip manually, it is declared as already installed.

Hmmmokay i don’t know exactly but maybe let’s try to apt install php7.3-zip

This works.
May I try the Nextcloud upgrade now :slight_smile: ?

Yes, but i believe you should use version testing :wink:

yunohost app upgrade nextcloud -u https://github.com/YunoHost-Apps/nextcloud_ynh/tree/testing 

Il failed, but it was a nice shot. Any idea ?

Info: Now upgrading nextcloud...
Info: [....................] > Loading installation settings...rade-nextcloud --s
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 16.0.0
Info: '/tmp/tmp.cxiv77j3IA' wasn't deleted because it doesn't exist.
Warning:  Starting ...
Warning:     0/0 [>---------------------------]   0% Starting ...
Info: Upgrade to nextcloud 17.0.0
Info: '/tmp/tmp.0MAxPjDHP5' wasn't deleted because it doesn't exist.
Warning:     0/0 [>---------------------------]   0% Starting ...
Info: Upgrade to nextcloud 18.0.0
Info: '/tmp/tmp.mDAaInHDLM' wasn't deleted because it doesn't exist.
Warning:     0/0 [>---------------------------]   0% Starting ...
Warning:     0/0 [>---------------------------]   0% Starting ...
Info: Upgrade to nextcloud 19.0.0
Info: '/tmp/tmp.GigUJMrDw0' wasn't deleted because it doesn't exist.
Warning:     0/0 [>---------------------------]   0% Starting ...
Warning:     0/0 [>---------------------------]   0% Starting ...
Info: Upgrade to nextcloud 20.0.0
Info: '/tmp/tmp.dCpBJrd3j5' wasn't deleted because it doesn't exist.
Warning:     0/0 [->--------------------------]   0% Starting ...
Warning:     0/0 [>---------------------------]   0% Starting ...
Info: Upgrade to nextcloud 20.0.5
Info: '/tmp/tmp.55lfpL4G71' wasn't deleted because it doesn't exist.
Warning:     0/0 [->--------------------------]   0% Starting ...
Info: [##############++....] > Reconfiguring Nextcloud...
Warning:     0/0 [>---------------------------]   0%File /var/www/nextcloud/config/config.php has been manually modified since the installation or last upgrade. So it has been duplicated in /home/yunohost.conf/backup//var/www/nextcloud/config/config.php.backup.20210122.154714
Warning: --- /home/yunohost.conf/backup//var/www/nextcloud/config/config.php.backup.20210122.154714     2021-01-22 15:46:57.106599329 +0000
Warning: +++ /var/www/nextcloud/config/config.php       2021-01-22 15:47:17.706753762 +0000
Warning: @@ -36,4 +36,5 @@
Warning:    'logout_url' => 'https://leclaire.re/yunohost/sso/?action=logout',
Warning:    'maintenance' => false,
Warning:    'loglevel' => 2,
Warning: +  'hashing_default_password' => true,
Warning:  );
Warning: Note that if you've installed some third-parties Nextcloud applications,     they are probably disabled and you'll have to manually enable them again.
Info: [################....] > Upgrading logrotate configuration...
Info: [################++..] > Reconfiguring Fail2Ban...
Warning: File /etc/fail2ban/jail.d/nextcloud.conf has been manually modified since the installation or last upgrade. So it has been duplicated in /home/yunohost.conf/backup//etc/fail2ban/jail.d/nextcloud.conf.backup.20210122.154721
Warning: File /etc/fail2ban/filter.d/nextcloud.conf has been manually modified since the installation or last upgrade. So it has been duplicated in /home/yunohost.conf/backup//etc/fail2ban/filter.d/nextcloud.conf.backup.20210122.154721
Warning: --- /home/yunohost.conf/backup//etc/fail2ban/filter.d/nextcloud.conf.backup.20210122.154721    2021-01-21 11:57:45.000000000 +0000
Warning: +++ /etc/fail2ban/jail.d/nextcloud.conf        2021-01-22 15:47:21.436781725 +0000
Warning: @@ -0,0 +1,6 @@
Warning: +[nextcloud]
Warning: +enabled = true
Warning: +port = http,https
Warning: +filter = nextcloud
Warning: +logpath = /home/yunohost.app/nextcloud/data/nextcloud.log
Warning: +maxretry = 5
Warning: Job for fail2ban.service failed.
Warning: See "systemctl status fail2ban.service" and "journalctl -xe" for details.
Warning: [Error] Jan 22 15:01:56 systemd[1]: /lib/systemd/system/fail2ban.service:12: PIDFile= references path below legacy directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → /run/fail2ban/fail2ban.pid; please update the unit file accordingly.
Warning: Jan 22 15:02:03 systemd[1]: /lib/systemd/system/fail2ban.service:12: PIDFile= references path below legacy directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → /run/fail2ban/fail2ban.pid; please update the unit file accordingly.
Warning: Jan 22 15:02:14 systemd[1]: /lib/systemd/system/fail2ban.service:12: PIDFile= references path below legacy directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → /run/fail2ban/fail2ban.pid; please update the unit file accordingly.
Warning: Jan 22 15:02:15 systemd[1]: /lib/systemd/system/fail2ban.service:12: PIDFile= references path below legacy directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → /run/fail2ban/fail2ban.pid; please update the unit file accordingly.
Warning: Jan 22 15:02:22 systemd[1]: Stopping Fail2Ban Service...
Warning: Jan 22 15:03:52 systemd[1]: fail2ban.service: Stopping timed out. Terminating.
Warning: Jan 22 15:03:52 fail2ban-client[12152]:  Caught signal 15. Exiting
Warning: Jan 22 15:03:52 systemd[1]: fail2ban.service: Control process exited, code=exited, status=255/EXCEPTION
Warning: Jan 22 15:05:22 systemd[1]: fail2ban.service: State 'stop-sigterm' timed out. Killing.
Warning: Jan 22 15:05:22 systemd[1]: fail2ban.service: Killing process 3415 (fail2ban-server) with signal SIGKILL.
Warning: Jan 22 15:05:22 systemd[1]: fail2ban.service: Main process exited, code=killed, status=9/KILL
Warning: Jan 22 15:05:22 systemd[1]: fail2ban.service: Failed with result 'timeout'.
Warning: Jan 22 15:05:22 systemd[1]: Stopped Fail2Ban Service.
Warning: Jan 22 15:05:22 systemd[1]: Starting Fail2Ban Service...
Warning: Jan 22 15:05:22 systemd[1]: Started Fail2Ban Service.
Warning: Jan 22 15:05:24 fail2ban-server[12309]: Server ready
Warning: Jan 22 15:40:16 systemd[1]: /lib/systemd/system/fail2ban.service:12: PIDFile= references path below legacy directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → /run/fail2ban/fail2ban.pid; please update the unit file accordingly.
Warning: Jan 22 15:47:22 systemd[1]: Reloading Fail2Ban Service.
Warning: Jan 22 15:48:52 systemd[1]: fail2ban.service: Reload operation timed out. Killing reload process.
Warning: Jan 22 15:48:52 systemd[1]: Reload failed for Fail2Ban Service.
Warning: /usr/share/yunohost/helpers.d/logging: line 20: message: unbound variable
Warning: [Error] Upgrade failed.

Hmpf okay … random question but could it be that you changed the SSH port and did not propagate this into the fail2ban conf ?

I don’t think so. If I did it, it was not intentional !

I got this aferwards:

Warning: Job for fail2ban.service failed.
Warning: See "systemctl status fail2ban.service" and "journalctl -xe" for details.
Warning: [Error] Jan 22 15:05:22 systemd[1]: Stopped Fail2Ban Service.
Warning: Jan 22 15:05:22 systemd[1]: Starting Fail2Ban Service...
Warning: Jan 22 15:05:22 systemd[1]: Started Fail2Ban Service.
Warning: Jan 22 15:05:24 fail2ban-server[12309]: Server ready
Warning: Jan 22 15:40:16 systemd[1]: /lib/systemd/system/fail2ban.service:12: PIDFile= references path below legacy directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → /run/fail2ban/fail2ban.pid; please update the unit file accordingly.
Warning: Jan 22 15:47:22 systemd[1]: Reloading Fail2Ban Service.
Warning: Jan 22 15:48:52 systemd[1]: fail2ban.service: Reload operation timed out. Killing reload process.
Warning: Jan 22 15:48:52 systemd[1]: Reload failed for Fail2Ban Service.
Warning: Jan 22 15:48:59 systemd[1]: /lib/systemd/system/fail2ban.service:12: PIDFile= references path below legacy directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → /run/fail2ban/fail2ban.pid; please update the unit file accordingly.
Warning: Jan 22 15:48:59 systemd[1]: /lib/systemd/system/fail2ban.service:12: PIDFile= references path below legacy directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → /run/fail2ban/fail2ban.pid; please update the unit file accordingly.
Warning: Jan 22 15:49:00 systemd[1]: /lib/systemd/system/fail2ban.service:12: PIDFile= references path below legacy directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → /run/fail2ban/fail2ban.pid; please update the unit file accordingly.
Warning: Jan 22 15:49:27 systemd[1]: /lib/systemd/system/fail2ban.service:12: PIDFile= references path below legacy directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → /run/fail2ban/fail2ban.pid; please update the unit file accordingly.
Warning: Jan 22 15:49:42 systemd[1]: /lib/systemd/system/fail2ban.service:12: PIDFile= references path below legacy directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → /run/fail2ban/fail2ban.pid; please update the unit file accordingly.
Warning: Jan 22 15:49:42 systemd[1]: /lib/systemd/system/fail2ban.service:12: PIDFile= references path below legacy directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → /run/fail2ban/fail2ban.pid; please update the unit file accordingly.
Warning: Jan 22 15:49:43 systemd[1]: /lib/systemd/system/fail2ban.service:12: PIDFile= references path below legacy directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → /run/fail2ban/fail2ban.pid; please update the unit file accordingly.
Warning: Jan 22 15:49:44 systemd[1]: /lib/systemd/system/fail2ban.service:12: PIDFile= references path below legacy directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → /run/fail2ban/fail2ban.pid; please update the unit file accordingly.
Warning: Jan 22 15:50:05 systemd[1]: /lib/systemd/system/fail2ban.service:12: PIDFile= references path below legacy directory /var/run/, updating /var/run/fail2ban/fail2ban.pid → /run/fail2ban/fail2ban.pid; please update the unit file accordingly.
Warning: Jan 22 15:50:18 systemd[1]: Reloading Fail2Ban Service.
Warning: Jan 22 15:51:48 systemd[1]: fail2ban.service: Reload operation timed out. Killing reload process.
Warning: Jan 22 15:51:48 systemd[1]: Reload failed for Fail2Ban Service.
Warning: nextcloud has not been properly removed
Warning: 11897 /!\ Packagers! You are probably using a lua regex. You should use a PCRE regex instead.
Warning: 96659 Load smb config files from /etc/samba/smb.conf
Warning: 96659 Loaded services file OK.
Warning: 96660 Server role: ROLE_STANDALONE
Warning: 112463 setfacl: /home/openmole: No such file or directory
Warning: 112976 2021-01-22 15:53:43 URL:https://codeload.github.com/YunoHost-Apps/yunohost.multimedia/tar.gz/v1.2 [15921] -> "v1.2.tar.gz" [1]
Warning: 114486 ln: failed to create symbolic link '/home/openmole/Multimedia': No such file or directory
Warning: The app was restored to the way it was before the failed upgrade.

Well then … let’s look at the log of Fail2ban in the webadmin : Services > Fail2ban > Share the log with the green button

The green button did not work. Here is the log:

2021-01-22 16:20:16,756 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:18:36
2021-01-22 16:20:16,759 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:18:38
2021-01-22 16:20:16,762 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:18:38
2021-01-22 16:20:16,767 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:18:40
2021-01-22 16:20:16,768 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:18:40
2021-01-22 16:20:16,769 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:18:42
2021-01-22 16:20:16,769 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:18:42
2021-01-22 16:20:16,772 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:19:15
2021-01-22 16:20:16,773 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:19:15
2021-01-22 16:20:16,774 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:19:17
2021-01-22 16:20:16,774 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:19:17
2021-01-22 16:20:16,775 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:19:20
2021-01-22 16:20:16,775 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:19:20
2021-01-22 16:20:16,790 fail2ban.utils          [18482]: Level 39 7fe1559eb710 -- exec: iptables -w -N f2b-recidive
iptables -w -A f2b-recidive -j RETURN
iptables -w -I INPUT -p tcp -j f2b-recidive
2021-01-22 16:20:16,791 fail2ban.utils          [18482]: ERROR   7fe1559eb710 -- stderr: 'iptables: Operation not supported.'
2021-01-22 16:20:16,791 fail2ban.utils          [18482]: ERROR   7fe1559eb710 -- stderr: "iptables v1.8.2 (nf_tables): Chain 'f2b-recidive' does not exist"
2021-01-22 16:20:16,791 fail2ban.utils          [18482]: ERROR   7fe1559eb710 -- stderr: "iptables v1.8.2 (nf_tables): Chain 'f2b-recidive' does not exist"
2021-01-22 16:20:16,791 fail2ban.utils          [18482]: ERROR   7fe1559eb710 -- stderr: "Try `iptables -h' or 'iptables --help' for more information."
2021-01-22 16:20:16,792 fail2ban.utils          [18482]: ERROR   7fe1559eb710 -- returned 2
2021-01-22 16:20:16,792 fail2ban.actions        [18482]: ERROR   Failed to execute ban jail 'recidive' action 'iptables-allports' info 'ActionInfo({'ip': '221.181.185.198', 'family': 'inet4', 'ip-rev': '198.185.181.221.', 'ip-host': None, 'fid': '221.181.185.198', 'failures': 5, 'time': 1611330917.7119076, 'matches': '2021-01-15 19:33:36,875 fail2ban.actions        [30466]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-15 19:33:57,836 fail2ban.actions        [30466]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-15 22:22:30,339 fail2ban.actions        [30466]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-15 22:22:51,906 fail2ban.actions        [30466]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-16 00:44:32,426 fail2ban.actions        [30466]: NOTICE  [sshd] Ban 221.181.185.198', 'restored': 1, 'F-*': {'matches': ['2021-01-15 19:33:36,875 fail2ban.actions        [30466]: NOTICE  [sshd] Ban 221.181.185.198', '2021-01-15 19:33:57,836 fail2ban.actions        [30466]: NOTICE  [pam-generic] Ban 221.181.185.198', '2021-01-15 22:22:30,339 fail2ban.actions        [30466]: NOTICE  [sshd] Ban 221.181.185.198', '2021-01-15 22:22:51,906 fail2ban.actions        [30466]: NOTICE  [pam-generic] Ban 221.181.185.198', '2021-01-16 00:44:32,426 fail2ban.actions        [30466]: NOTICE  [sshd] Ban 221.181.185.198'], 'failures': 5}, 'ipmatches': 'Jan 17 20:33:53 scw-f66613 sshd[25855]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.181.185.198  user=root\nJan 17 20:34:05 scw-f66613 sshd[25865]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.181.185.198  user=root\nJan 17 20:34:05 scw-f66613 sshd[25865]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.181.185.198  user=root\n2021-01-17 18:58:25,033 fail2ban.actions        [24565]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-17 19:46:19,638 fail2ban.actions        [24565]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-17 19:46:42,915 fail2ban.actions        [24565]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-17 20:33:43,584 fail2ban.actions        [24565]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-17 20:34:06,336 fail2ban.actions        [24565]: NOTICE  [pam-generic] Ban 221.181.185.198\nJan 17 20:34:07 scw-f66613 sshd[25865]: Failed password for root from 221.181.185.198 port 53023 ssh2\nJan 17 20:34:07 scw-f66613 sshd[25865]: Failed password for root from 221.181.185.198 port 53023 ssh2\nJan 17 20:34:10 scw-f66613 sshd[25865]: Failed password for root from 221.181.185.198 port 53023 ssh2\nJan 17 20:34:10 scw-f66613 sshd[25865]: Failed password for root from 221.181.185.198 port 53023 ssh2\nJan 17 20:34:13 scw-f66613 sshd[25865]: Failed password for root from 221.181.185.198 port 53023 ssh2\nJan 17 20:34:13 scw-f66613 sshd[25865]: Failed password for root from 221.181.185.198 port 53023 ssh2\nJan 17 21:22:33 scw-f66613 sshd[27988]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.181.185.198  user=root\nJan 17 21:22:33 scw-f66613 sshd[27988]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.181.185.198  user=root\nJan 17 21:22:34 scw-f66613 sshd[27988]: Failed password for root from 221.181.185.198 port 39593 ssh2\nJan 17 21:22:34 scw-f66613 sshd[27988]: Failed password for root from 221.181.185.198 port 39593 ssh2\nJan 17 21:22:38 scw-f66613 sshd[27988]: Failed password for root from 221.181.185.198 port 39593 ssh2\nJan 17 21:22:38 scw-f66613 sshd[27988]: Failed password for root from 221.181.185.198 port 39593 ssh2\nJan 18 02:22:40 scw-f66613 sshd[8814]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.181.185.198  user=root\nJan 18 02:22:40 scw-f66613 sshd[8814]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.181.185.198  user=root\nJan 18 02:22:42 scw-f66613 sshd[8814]: Failed password for root from 221.181.185.198 port 54909 ssh2\nJan 18 02:22:42 scw-f66613 sshd[8814]: Failed password for root from 221.181.185.198 port 54909 ssh2\nJan 18 02:22:47 scw-f66613 sshd[8814]: Failed password for root from 221.181.185.198 port 54909 ssh2\nJan 18 02:22:47 scw-f66613 sshd[8814]: Failed password for root from 221.181.185.198 port 54909 ssh2\nJan 18 02:22:50 scw-f66613 sshd[8814]: Failed password for root from 221.181.185.198 port 54909 ssh2\nJan 18 02:22:50 scw-f66613 sshd[8814]: Failed password for root from 221.181.185.198 port 54909 ssh2\nJan 18 02:22:57 scw-f66613 sshd[8844]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.181.185.198  user=root\nJan 18 02:22:57 scw-f66613 sshd[8844]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.181.185.198  user=root\nJan 18 02:22:59 scw-f66613 sshd[8844]: Failed password for root from 221.181.185.198 port 60573 ssh2\nJan 18 02:22:59 scw-f66613 sshd[8844]: Failed password for root from 221.181.185.198 port 60573 ssh2\nJan 18 02:22:40 scw-f66613 sshd[8814]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.181.185.198  user=root\nJan 18 02:22:40 scw-f66613 sshd[8814]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.181.185.198  user=root\nJan 18 02:22:57 scw-f66613 sshd[8844]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.181.185.198  user=root\nJan 18 02:22:57 scw-f66613 sshd[8844]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.181.185.198  user=root\nJan 18 02:23:11 scw-f66613 sshd[8848]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.181.185.198  user=root\nJan 18 02:23:11 scw-f66613 sshd[8848]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.181.185.198  user=root\nJan 18 02:23:01 scw-f66613 sshd[8844]: Failed password for root from 221.181.185.198 port 60573 ssh2\nJan 18 02:23:01 scw-f66613 sshd[8844]: Failed password for root from 221.181.185.198 port 60573 ssh2\nJan 18 02:23:03 scw-f66613 sshd[8844]: Failed password for root from 221.181.185.198 port 60573 ssh2\nJan 18 02:23:03 scw-f66613 sshd[8844]: Failed password for root from 221.181.185.198 port 60573 ssh2\nJan 18 02:23:11 scw-f66613 sshd[8848]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.181.185.198  user=root\nJan 18 02:23:11 scw-f66613 sshd[8848]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.181.185.198  user=root\nJan 18 02:23:13 scw-f66613 sshd[8848]: Failed password for root from 221.181.185.198 port 24577 ssh2\nJan 18 02:23:13 scw-f66613 sshd[8848]: Failed password for root from 221.181.185.198 port 24577 ssh2\nJan 18 02:23:15 scw-f66613 sshd[8848]: Failed password for root from 221.181.185.198 port 24577 ssh2\nJan 18 02:23:15 scw-f66613 sshd[8848]: Failed password for root from 221.181.185.198 port 24577 ssh2\nJan 18 02:23:18 scw-f66613 sshd[8848]: Failed password for root from 221.181.185.198 port 24577 ssh2\nJan 18 02:23:18 scw-f66613 sshd[8848]: Failed password for root from 221.181.185.198 port 24577 ssh2', 'ipjailmatches': '2021-01-14 02:29:58,192 fail2ban.actions        [4160]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-14 02:30:16,570 fail2ban.actions        [4160]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-14 05:08:03,562 fail2ban.actions        [4160]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-14 05:08:23,301 fail2ban.actions        [4160]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-14 05:34:52,585 fail2ban.actions        [4160]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-14 05:35:19,119 fail2ban.actions        [4160]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-14 05:48:17,129 fail2ban.actions        [4160]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-14 05:48:36,341 fail2ban.actions        [4160]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-14 06:28:41,497 fail2ban.actions        [4160]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-14 06:29:00,417 fail2ban.actions        [4160]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-14 17:36:56,125 fail2ban.actions        [4160]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-14 17:37:26,640 fail2ban.actions        [4160]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-14 20:28:12,550 fail2ban.actions        [4160]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-14 20:28:29,760 fail2ban.actions        [4160]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-14 23:17:56,154 fail2ban.actions        [4160]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-14 23:18:18,220 fail2ban.actions        [4160]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-15 01:52:40,031 fail2ban.actions        [4160]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-15 01:53:32,920 fail2ban.actions        [4160]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-15 04:00:42,792 fail2ban.actions        [4160]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-15 04:01:04,424 fail2ban.actions        [4160]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-15 19:33:36,875 fail2ban.actions        [30466]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-15 19:33:57,836 fail2ban.actions        [30466]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-15 22:22:30,339 fail2ban.actions        [30466]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-15 22:22:51,906 fail2ban.actions        [30466]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-16 00:44:32,426 fail2ban.actions        [30466]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-16 00:45:02,618 fail2ban.actions        [30466]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-16 03:10:40,344 fail2ban.actions        [30466]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-16 03:11:04,843 fail2ban.actions        [30466]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-16 06:20:29,955 fail2ban.actions        [30466]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-16 06:20:49,918 fail2ban.actions        [30466]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-16 11:13:53,935 fail2ban.actions        [24565]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-16 11:14:45,682 fail2ban.actions        [24565]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-16 20:36:29,212 fail2ban.actions        [24565]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-16 20:36:44,833 fail2ban.actions        [24565]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-16 21:45:38,637 fail2ban.actions        [24565]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-16 21:46:01,058 fail2ban.actions        [24565]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-16 22:19:48,237 fail2ban.actions        [24565]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-16 22:20:09,821 fail2ban.actions        [24565]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-16 22:55:21,350 fail2ban.actions        [24565]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-16 22:55:48,665 fail2ban.actions        [24565]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-17 01:18:31,199 fail2ban.actions        [24565]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-17 01:18:59,416 fail2ban.actions        [24565]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-17 17:44:02,819 fail2ban.actions        [24565]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-17 17:44:30,141 fail2ban.actions        [24565]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-17 18:58:08,775 fail2ban.actions        [24565]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-17 18:58:25,033 fail2ban.actions        [24565]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-17 19:46:19,638 fail2ban.actions        [24565]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-17 19:46:42,915 fail2ban.actions        [24565]: NOTICE  [pam-generic] Ban 221.181.185.198\n2021-01-17 20:33:43,584 fail2ban.actions        [24565]: NOTICE  [sshd] Ban 221.181.185.198\n2021-01-17 20:34:06,336 fail2ban.actions        [24565]: NOTICE  [pam-generic] Ban 221.181.185.198', 'ipfailures': 8713, 'ipjailfailures': 535})': Error starting action Jail('recidive')/iptables-allports
2021-01-22 16:20:16,898 fail2ban.actions        [18482]: WARNING [sshd] 112.85.42.49 already banned
2021-01-22 16:21:17,784 fail2ban.actions        [18482]: NOTICE  [sshd] Ban 192.252.215.6
2021-01-22 16:21:17,764 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:20:35
2021-01-22 16:21:17,785 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:20:35
2021-01-22 16:21:17,785 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:20:37
2021-01-22 16:20:16,928 fail2ban.actions        [18482]: WARNING [pam-generic] 112.85.42.49 already banned
2021-01-22 16:21:17,781 fail2ban.filter         [18482]: INFO    [pam-generic] Found 112.85.42.49 - 2021-01-22 16:20:35
2021-01-22 16:21:17,786 fail2ban.filter         [18482]: INFO    [pam-generic] Found 112.85.42.49 - 2021-01-22 16:20:35
2021-01-22 16:21:17,787 fail2ban.filter         [18482]: INFO    [pam-generic] Found 112.85.42.49 - 2021-01-22 16:21:16
2021-01-22 16:21:17,786 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:20:37
2021-01-22 16:21:17,790 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:20:41
2021-01-22 16:21:17,791 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:20:41
2021-01-22 16:21:17,790 fail2ban.filter         [18482]: INFO    [recidive] Found 192.252.215.6 - 2021-01-22 16:21:17
2021-01-22 16:21:17,788 fail2ban.filter         [18482]: INFO    [pam-generic] Found 112.85.42.49 - 2021-01-22 16:21:16
2021-01-22 16:21:17,782 fail2ban.actions        [18482]: NOTICE  [recidive] Restore Ban 221.181.185.220
2021-01-22 16:21:17,791 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:20:45
2021-01-22 16:21:17,805 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:20:45
2021-01-22 16:21:17,807 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:21:16
2021-01-22 16:21:17,807 fail2ban.filter         [18482]: INFO    [sshd] Found 112.85.42.49 - 2021-01-22 16:21:16
2021-01-22 16:21:17,852 fail2ban.utils          [18482]: Level 39 7fe154074500 -- exec: iptables -w -N f2b-sshd
iptables -w -A f2b-sshd -j RETURN
iptables -w -I INPUT -p tcp -m multiport --dports ssh -j f2b-sshd
2021-01-22 16:21:17,853 fail2ban.utils          [18482]: ERROR   7fe154074500 -- stderr: 'iptables: Operation not supported.'
2021-01-22 16:21:17,854 fail2ban.utils          [18482]: ERROR   7fe154074500 -- stderr: "iptables v1.8.2 (nf_tables): Chain 'f2b-sshd' does not exist"
2021-01-22 16:21:17,854 fail2ban.utils          [18482]: ERROR   7fe154074500 -- stderr: "iptables v1.8.2 (nf_tables): Couldn't load match `multiport':No such file or directory"
2021-01-22 16:21:17,854 fail2ban.utils          [18482]: ERROR   7fe154074500 -- stderr: ''
2021-01-22 16:21:17,854 fail2ban.utils          [18482]: ERROR   7fe154074500 -- stderr: "Try `iptables -h' or 'iptables --help' for more information."
2021-01-22 16:21:17,856 fail2ban.utils          [18482]: ERROR   7fe154074500 -- returned 2

Can you confirm that there’s no pending migration in Tools > Migrations

There are these two (I am running them):

18. Migrer les anciennes règles de trafic réseau vers le nouveau système basé sur nftables
17. Migrer les bases de données de PostgreSQL 9.6 vers 11 

The 18 seems promising

Well, it fails unfortunatelly:

La migration 0018_xtable_to_nftable a échoué avec l’exception Impossible de recharger le pare-feu : annulation

… Are there more lines associated to this error message …

Vous ne pouvez pas jouer avec ip6tables ici. Vous êtes soit dans un conteneur, soit votre noyau ne le prend pas en charge

and fort the 17:

La migration 0017_postgresql_9p6_to_11 a échoué avec l’exception PostgreSQL 9.6 est installé mais pas posgreSQL 11 ? Il s'est sans doute passé quelque chose d'étrange sur votre système :(... : annulation

For this one, installing manually posgre 11 could make the fix, no ?

Any suggestions ?

apt install postgresql-11 fixed the postgresql issue but it is still not enough to upgrade nextcloud. And I don’t know how to fix the ip6tables migration issue.