Cannot upgrade and migrate to YunoHost 3

Hello,

I am trying to upgrade my server but, somehow, cannot.
I use a Raspberry 3B.

I updated everything via the graphical interface, going to “update the system”.
Then, in “Tools / Versions”, I did the same.
Still, here is what is showing:

yunohost 2.7.14.5 (stable)
yunohost-admin 2.7.14 (stable)
moulinette 2.7.14 (stable)
ssowat 2.7.14 (stable)

Then I tried with the command line:

sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
sudo yunohost tools update
sudo yunohost tools upgrade

I have this error:

root@YunoHost:~# sudo yunohost tools upgrade
Warning: Upgrading app jirafeau…
Warning: Upgrading app nextcloud…
Warning: Upgrading app opensondage…
Warning: Upgrading app searx…
Warning: Upgrading app synapse…
Warning: Upgrading app wallabag2…
Warning: unable to upgrade apps: [Errno 61] No app to upgrade
Error: Unable to upgrade some applications

I am wondering if this is not the reason why I cannot upgrade to YunoHost 3.

Also, as decribed in this thread: [La migration 3 migrate_to_stretch a échoué: “Votre système n’est pas complètement à jour”] (in French), I tried the following but didn’t find any error:

root@YunoHost:~#     sudo apt list --upgradable -a
Listing... Done
metronome/stable 3.7.9+33b7572-1 armhf [upgradable from: 3.7.9+33b7572-1]
metronome/now 3.7.9+33b7572-1 armhf [installed,upgradable to: 3.7.9+33b7572-1]

Thanks for your help!

Hi @Thibaut ,

Before doing anything : backup, export, extract, … and copy/paste on another device.

Then you should try :

apt update && apt dist-upgrade && apt autoremove && apt autoclean
yunohost tools update
yunohost tools upgrade --ignore-apps
yunohost tools migrations migrate

Sources :

ppr

Hi ppr, thanks a lot for your reply.

yunohost tools migrations migrate

started well but then:

Error: Migration 3 migrate_to_stretch has failed with exception Your system is not fully up to date. Please perform a regular upgrade before running the migration to stretch., aborting

@Thibaut ,

Have you done first an apt dist-upgrade before ?

ppr

Sure, I followed your instructions step by step.
By the way it gives that:

apt dist-upgrad
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

@Thibaut ,

Could you try to unhold metronome and retry the previous commands

apt-mark unhold metronome

ppr

First of all, I had that:

apt update && apt dist-upgrade && apt autoremove && apt autoclean
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
E: Invalid operation autoremove

In case, I continued.
The migration (yunohost tools migrations migrate) looked to work as it was loading during something like 20/30 minutes.
Then:

Error: Migration 3 migrate_to_stretch has failed with exception [Errno 2] No such file or directory: ‘/etc/fail2ban/filter.d/yunohost.conf’, aborting

@Thibaut ,

Don’t care about autoremove for now and try this

wget http://ftp.fr.debian.org/debian/pool/main/f/fail2ban/fail2ban_0.9.6-2_all.deb
dpkg -i --force-confmiss fail2ban_0.9.6-2_all.deb
mv /etc/fail2ban /etc/fail2ban.old2
dpkg -i --force-confmiss /var/cache/apt/archives/fail2ban*.deb
yunohost service regen-conf fail2ban --force
systemctl restart fail2ban
yunohost service status fail2ban

Edit @Thibaut
Then :

apt update && apt dist-upgrade
yunohost tools update
yunohost tools upgrade --ignore-apps
yunohost tools migrations migrate

/Edit

After, if all is gone well, you could do

apt-get autoremove && apt-get autoclean

But later, there is no urgency :wink:

ppr

1 Like

I have error messages at each step.
The problem looks to come from fail2ban.

Here are the 2 first steps:

dpkg -i --force-confmiss fail2ban_0.9.6-2_all.deb
(…)
Process: 25818 ExecStart=/usr/bin/fail2ban-client -x start (code=exited, status=1/FAILURE)
CGroup: /system.slice/fail2ban.service
└─1615 /usr/bin/python /usr/bin/fail2ban-server -b -s /var/r…id

Sep 27 17:41:12 YunoHost systemd[1]: fail2ban.service: Control process…s=1
Sep 27 17:41:12 YunoHost systemd[1]: Failed to start Fail2Ban Service.
Sep 27 17:41:12 YunoHost systemd[1]: fail2ban.service: Unit entered fa…te.
Sep 27 17:41:12 YunoHost systemd[1]: fail2ban.service: Failed with res…t’.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package fail2ban (–install):
subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (232-25+deb9u4) …
Processing triggers for man-db (2.7.6.1-2) …
Errors were encountered while processing:
fail2ban

root@YunoHost:~# dpkg -i --force-confmiss /var/cache/apt/archives/fail2ban*.deb
dpkg: error: cannot access archive ‘/var/cache/apt/archives/fail2ban*.deb’: No such file or directory

Hello all,

I reinstalled the OS from scratch, problem solved.
Thanks

Thibaut

J’avais le même problème.

J’ai suivi toutes ces belles instructions, les unes après les autres, sans me préoccuper des messages d’erreurs et … succès ! In fine, je me retrouve avec la 3.2 installée.

Impeccable, merci beaucoup !
Une belle procédure quand on coince dans la migration de la 2.7.14.5 sous jessie vers la 3.2 sous stretch. Quand, après la migration, on se retrouve sous strech, mais toujours sous 2.7.14.5 et pas sous 3.2. Et rien n’a faire ça coince. Pour finir la migration il faut appliquer les étapes dont tu parles. Merci, Cela résolu joliment le problème.
Merci

1 Like

I’ve tried the instructions above, but I believe I broke something. Would you mind checking where I made a mistake?

root@klimek:~# sudo yunohost tools migrations migrate --accept-disclaimer
Warning: Running migration 3 migrate_to_stretch...
Hit http://archive.raspberrypi.org jessie InRelease
Hit http://mirrordirector.raspbian.org jessie InRelease
Hit http://repo.yunohost.org jessie InRelease
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Hit http://repo.yunohost.org jessie/stable armhf Packages
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages
Ign http://repo.yunohost.org jessie/stable Translation-en
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Reading package lists...
Error: Migration 3 migrate_to_stretch has failed with exception Your system is not fully up to date. Please perform a regular upgrade before running the migration to stretch., aborting
root@klimek:~# wget http://ftp.fr.debian.org/debian/pool/main/f/fail2ban/fail2ban_0.9.6-2_all.deb
converted 'http://ftp.fr.debian.org/debian/pool/main/f/fail2ban/fail2ban_0.9.6-2_all.deb' (ANSI_X3.4-1968) -> 'http://ftp.fr.debian.org/debian/pool/main/f/fail2ban/fail2ban_0.9.6-2_all.deb' (UTF-8)
--2018-12-07 19:22:32--  http://ftp.fr.debian.org/debian/pool/main/f/fail2ban/fail2ban_0.9.6-2_all.deb
Resolving ftp.fr.debian.org (ftp.fr.debian.org)... 2a01:e0c:1:1598::2, 212.27.32.66
Connecting to ftp.fr.debian.org (ftp.fr.debian.org)|2a01:e0c:1:1598::2|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 287540 (281K) [application/x-debian-package]
Saving to: 'fail2ban_0.9.6-2_all.deb'

fail2ban_0.9.6-2_al 100%[=====================>] 280.80K  --.-KB/s   in 0.1s   

2018-12-07 19:22:33 (2.17 MB/s) - 'fail2ban_0.9.6-2_all.deb' saved [287540/287540]

root@klimek:~# dpkg -i --force-confmiss fail2ban_0.9.6-2_all.deb
(Reading database ... 46206 files and directories currently installed.)
Preparing to unpack fail2ban_0.9.6-2_all.deb ...
Unpacking fail2ban (0.9.6-2) over (0.8.13-1) ...
Setting up fail2ban (0.9.6-2) ...
Installing new version of config file /etc/bash_completion.d/fail2ban ...
Installing new version of config file /etc/fail2ban/action.d/badips.conf ...

Configuration file `/etc/fail2ban/action.d/badips.py', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/action.d/blocklist_de.conf ...
Installing new version of config file /etc/fail2ban/action.d/bsd-ipfw.conf ...

Configuration file `/etc/fail2ban/action.d/cloudflare.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/action.d/complain.conf ...

Configuration file `/etc/fail2ban/action.d/firewallcmd-allports.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/action.d/firewallcmd-ipset.conf ...

Configuration file `/etc/fail2ban/action.d/firewallcmd-multiport.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/action.d/firewallcmd-new.conf ...

Configuration file `/etc/fail2ban/action.d/firewallcmd-rich-logging.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/action.d/firewallcmd-rich-rules.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/action.d/iptables-allports.conf ...

Configuration file `/etc/fail2ban/action.d/iptables-common.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/action.d/iptables-ipset-proto4.conf ...
Installing new version of config file /etc/fail2ban/action.d/iptables-ipset-proto6-allports.conf ...
Installing new version of config file /etc/fail2ban/action.d/iptables-ipset-proto6.conf ...
Installing new version of config file /etc/fail2ban/action.d/iptables-multiport-log.conf ...
Installing new version of config file /etc/fail2ban/action.d/iptables-multiport.conf ...
Installing new version of config file /etc/fail2ban/action.d/iptables-new.conf ...
Installing new version of config file /etc/fail2ban/action.d/iptables-xt_recent-echo.conf ...
Installing new version of config file /etc/fail2ban/action.d/iptables.conf ...

Configuration file `/etc/fail2ban/action.d/mail-whois-common.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/action.d/mail-whois-lines.conf ...
Installing new version of config file /etc/fail2ban/action.d/mail-whois.conf ...
Installing new version of config file /etc/fail2ban/action.d/mynetwatchman.conf ...

Configuration file `/etc/fail2ban/action.d/nftables-allports.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/action.d/nftables-common.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/action.d/nftables-multiport.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/action.d/npf.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/action.d/nsupdate.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/action.d/route.conf ...
Installing new version of config file /etc/fail2ban/action.d/sendmail-common.conf ...

Configuration file `/etc/fail2ban/action.d/sendmail-geoip-lines.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/action.d/sendmail-whois-ipjailmatches.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/action.d/sendmail-whois-ipmatches.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/action.d/sendmail-whois-lines.conf ...

Configuration file `/etc/fail2ban/action.d/sendmail-whois-matches.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/action.d/sendmail-whois.conf ...
Installing new version of config file /etc/fail2ban/action.d/sendmail.conf ...

Configuration file `/etc/fail2ban/action.d/shorewall-ipset-proto6.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/action.d/shorewall.conf ...

Configuration file `/etc/fail2ban/action.d/smtp.py', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/action.d/symbiosis-blacklist-allports.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/action.d/ufw.conf ...

Configuration file `/etc/fail2ban/action.d/xarf-login-attack.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/fail2ban.conf ...
Installing new version of config file /etc/fail2ban/filter.d/apache-auth.conf ...
Installing new version of config file /etc/fail2ban/filter.d/apache-badbots.conf ...

Configuration file `/etc/fail2ban/filter.d/apache-botsearch.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/filter.d/apache-common.conf ...

Configuration file `/etc/fail2ban/filter.d/apache-fakegooglebot.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/filter.d/apache-modsecurity.conf ...
Installing new version of config file /etc/fail2ban/filter.d/apache-noscript.conf ...

Configuration file `/etc/fail2ban/filter.d/apache-pass.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/filter.d/apache-shellshock.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/filter.d/assp.conf ...
Installing new version of config file /etc/fail2ban/filter.d/asterisk.conf ...

Configuration file `/etc/fail2ban/filter.d/botsearch-common.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/filter.d/common.conf ...

Configuration file `/etc/fail2ban/filter.d/counter-strike.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/filter.d/courier-auth.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/filter.d/courier-smtp.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/filter.d/cyrus-imap.conf ...

Configuration file `/etc/fail2ban/filter.d/directadmin.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/filter.d/dovecot.conf ...

Configuration file `/etc/fail2ban/filter.d/drupal-auth.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/filter.d/ejabberd-auth.conf ...
Installing new version of config file /etc/fail2ban/filter.d/exim-common.conf ...
Installing new version of config file /etc/fail2ban/filter.d/exim-spam.conf ...
Installing new version of config file /etc/fail2ban/filter.d/exim.conf ...
Installing new version of config file /etc/fail2ban/filter.d/freeswitch.conf ...

Configuration file `/etc/fail2ban/filter.d/froxlor-auth.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/filter.d/groupoffice.conf ...

Configuration file `/etc/fail2ban/filter.d/guacamole.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/filter.d/haproxy-http-auth.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/filter.d/ignorecommands/apache-fakegooglebot', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/filter.d/kerio.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/filter.d/mongodb-auth.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/filter.d/monit.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/filter.d/murmur.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/filter.d/mysqld-auth.conf ...
Installing new version of config file /etc/fail2ban/filter.d/named-refused.conf ...

Configuration file `/etc/fail2ban/filter.d/nginx-botsearch.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/filter.d/nginx-http-auth.conf ...

Configuration file `/etc/fail2ban/filter.d/nginx-limit-req.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/filter.d/nsd.conf ...

Configuration file `/etc/fail2ban/filter.d/openhab.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/filter.d/oracleims.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/filter.d/pam-generic.conf ...

Configuration file `/etc/fail2ban/filter.d/portsentry.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/filter.d/postfix-rbl.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/filter.d/postfix-sasl.conf ...
Installing new version of config file /etc/fail2ban/filter.d/postfix.conf ...
Installing new version of config file /etc/fail2ban/filter.d/proftpd.conf ...
Installing new version of config file /etc/fail2ban/filter.d/pure-ftpd.conf ...
Installing new version of config file /etc/fail2ban/filter.d/recidive.conf ...
Installing new version of config file /etc/fail2ban/filter.d/roundcube-auth.conf ...

Configuration file `/etc/fail2ban/filter.d/screensharingd.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/filter.d/sendmail-reject.conf ...
Installing new version of config file /etc/fail2ban/filter.d/sieve.conf ...

Configuration file `/etc/fail2ban/filter.d/slapd.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/filter.d/solid-pop3d.conf ...
Installing new version of config file /etc/fail2ban/filter.d/squid.conf ...

Configuration file `/etc/fail2ban/filter.d/squirrelmail.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/filter.d/sshd-ddos.conf ...
Installing new version of config file /etc/fail2ban/filter.d/sshd.conf ...

Configuration file `/etc/fail2ban/filter.d/stunnel.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/filter.d/tine20.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/fail2ban/filter.d/vsftpd.conf ...
Installing new version of config file /etc/fail2ban/filter.d/wuftpd.conf ...

Configuration file '/etc/fail2ban/jail.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** jail.conf (Y/I/N/O/D/Z) [default=N] ? 

Configuration file `/etc/fail2ban/jail.d/defaults-debian.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/paths-common.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/paths-debian.conf', does not exist on system.
Installing new config file as you requested.

Configuration file `/etc/fail2ban/paths-opensuse.conf', does not exist on system.
Installing new config file as you requested.
Installing new version of config file /etc/init.d/fail2ban ...

Configuration file `/etc/monit/monitrc.d/fail2ban', does not exist on system.
Installing new config file as you requested.
Job for fail2ban.service failed. See 'systemctl status fail2ban.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript fail2ban, action "start" failed.
dpkg: error processing package fail2ban (--install):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (215-17+deb8u8) ...
Processing triggers for man-db (2.7.5-1~bpo8+1) ...
Errors were encountered while processing:
 fail2ban
root@klimek:~# dpkg -i --force-confmiss fail2ban_0.9.6-2_all.deb
(Reading database ... 46426 files and directories currently installed.)
Preparing to unpack fail2ban_0.9.6-2_all.deb ...
Unpacking fail2ban (0.9.6-2) over (0.9.6-2) ...
Setting up fail2ban (0.9.6-2) ...
^C
root@klimek:~# yunohost service status fail2ban yunohost-firewall
fail2ban: 
  active: failed
  active_at: 
    human: 1970-01-01 00:00:00
    timestamp: 0
  description: protects against bruteforce and other kind of attacks from the Internet
  loaded: enabled
  service_file_path: /lib/systemd/system/fail2ban.service
  status: failed
yunohost-firewall: 
  active: active
  active_at: 
    human: 2018-07-30 13:17:51
    timestamp: 1532956671015952
  description: manages open and close connexion ports to services
  loaded: enabled
  service_file_path: /lib/systemd/system/yunohost-firewall.service
  status: exited
root@klimek:~# dpkg -i --force-confmiss fail2ban_0.9.6-2_all.deb
(Reading database ... 46426 files and directories currently installed.)
Preparing to unpack fail2ban_0.9.6-2_all.deb ...
Unpacking fail2ban (0.9.6-2) over (0.9.6-2) ...
Setting up fail2ban (0.9.6-2) ...
Job for fail2ban.service failed. See 'systemctl status fail2ban.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript fail2ban, action "start" failed.
dpkg: error processing package fail2ban (--install):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (215-17+deb8u8) ...
Processing triggers for man-db (2.7.5-1~bpo8+1) ...
Errors were encountered while processing:
 fail2ban
root@klimek:~# wget http://ftp.fr.debian.org/debian/pool/main/f/fail2ban/fail2ban_0.9.6-2_all.deb
converted 'http://ftp.fr.debian.org/debian/pool/main/f/fail2ban/fail2ban_0.9.6-2_all.deb' (ANSI_X3.4-1968) -> 'http://ftp.fr.debian.org/debian/pool/main/f/fail2ban/fail2ban_0.9.6-2_all.deb' (UTF-8)
--2018-12-07 19:27:02--  http://ftp.fr.debian.org/debian/pool/main/f/fail2ban/fail2ban_0.9.6-2_all.deb
Resolving ftp.fr.debian.org (ftp.fr.debian.org)... 2a01:e0c:1:1598::2, 212.27.32.66
Connecting to ftp.fr.debian.org (ftp.fr.debian.org)|2a01:e0c:1:1598::2|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 287540 (281K) [application/x-debian-package]
Saving to: 'fail2ban_0.9.6-2_all.deb.1'

fail2ban_0.9.6-2_al 100%[=====================>] 280.80K  1.66MB/s   in 0.2s   

2018-12-07 19:27:02 (1.66 MB/s) - 'fail2ban_0.9.6-2_all.deb.1' saved [287540/287540]

root@klimek:~# dpkg -i --force-confmiss fail2ban_0.9.6-2_all.deb
(Reading database ... 46426 files and directories currently installed.)
Preparing to unpack fail2ban_0.9.6-2_all.deb ...
Unpacking fail2ban (0.9.6-2) over (0.9.6-2) ...
Setting up fail2ban (0.9.6-2) ...
Job for fail2ban.service failed. See 'systemctl status fail2ban.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript fail2ban, action "start" failed.
dpkg: error processing package fail2ban (--install):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (215-17+deb8u8) ...
Processing triggers for man-db (2.7.5-1~bpo8+1) ...
Errors were encountered while processing:
 fail2ban
root@klimek:~# mv /etc/fail2ban /etc/fail2ban.old2
root@klimek:~# dpkg -i --force-confmiss /var/cache/apt/archives/fail2ban*.deb
dpkg: error processing archive /var/cache/apt/archives/fail2ban*.deb (--install):
 cannot access archive: No such file or directory
Errors were encountered while processing:
 /var/cache/apt/archives/fail2ban*.deb
root@klimek:~# yunohost service status fail2ban
active: failed
active_at: 
  human: 1970-01-01 00:00:00
  timestamp: 0
description: protects against bruteforce and other kind of attacks from the Internet
loaded: enabled
service_file_path: /lib/systemd/system/fail2ban.service
status: failed
root@klimek:~# mv /etc/fail2ban.old2 /etc/fail2ban     
root@klimek:~# yunohost service status fail2ban
active: failed
active_at: 
  human: 1970-01-01 00:00:00
  timestamp: 0
description: protects against bruteforce and other kind of attacks from the Internet
loaded: enabled
service_file_path: /lib/systemd/system/fail2ban.service
status: failed
root@klimek:~# yunohost tools update
Success! The application list yunohost has been fetched
Success! The application list community has been fetched
apps: 
packages: 
root@klimek:~# yunohost tools upgrade --ignore-apps
Success! The system has been upgraded
root@klimek:~# yunohost service status fail2ban
active: failed
active_at: 
  human: 1970-01-01 00:00:00
  timestamp: 0
description: protects against bruteforce and other kind of attacks from the Internet
loaded: enabled
service_file_path: /lib/systemd/system/fail2ban.service
status: failed
root@klimek:~#

Hello

I have the same issue. I am gonna try this solution.

Slapd brought me some troubles too.

RPi 3B
Yunohost 2.7.14
Nextcloud
(that’s it)

Hi,
first of all thanks for the great instructions here!

I’d tried migrating a couple of times already but had problems and had to leave Yuno running 2.7.14 until now :frowning:

I ran through the commands above twice (second time after “unhold metronome”).

Then I could at least start the migration process.

Unfortunately this gave me errors again - both fail2ban and dependencies. I’ve tried the suggested “–fix broken-install” but get nowhere with that.

Here are the errors:
fatal: unable to auto-detect email address (got ‘root@YunoHost.(none)’)
warning: etckeeper failed to commit changes in /etc using git
W: No sandbox user ‘_apt’ on the system, can not drop privileges
E: Sub-process /usr/bin/dpkg returned an error code (1)
Reading package lists… Done
Building dependency tree
Reading state information… Done
You might want to run ‘apt --fix-broken install’ to correct these.
The following packages have unmet dependencies:
mariadb-server-10.0 : Depends: mariadb-client-10.0 (>= 10.0.38-0+deb8u1) but it is not installed
Depends: mariadb-server-core-10.0 (>= 10.0.38-0+deb8u1) but it is not installed
E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).
Warning: Port 587 is already opened for IPv4 connections
Warning: Port 587 is already opened for IPv6 connections
Success! The firewall has been reloaded
Warning: Port 465 is already closed for IPv4 connections
Warning: Port 465 is already closed for IPv6 connections
Success! The firewall has been reloaded
Warning: Starting the yunohost package upgrade … The migration will end, but the actual upgrade will happen right after. After the operation is complete, you might have to re-log on the webadmin.
Error: Migration 3 migrate_to_stretch has failed with exception [Errno 2] No such file or directory: ‘/etc/fail2ban/filter.d/yunohost.conf’, aborting

Hopefully someone can help me here.

Thanks in advance

Fil

Hi,

does ls -ld /etc/fail2ban.old shows anything ?

Hi Aleks,
thanks for the quick reply!

Yes it does:

drwxr-xr-x 6 root root 4096 Jul 12 23:07 /etc/fail2ban.old

Thanks again

Fil

Hmthen maybe can you try to

cp /etc/fail2ban.old/filter.d/yunohost.conf /etc/fail2ban/filter.d/yunohost.conf

then retry the migration ?

I get this message:
cp: cannot create regular file ‘/etc/fail2ban/filter.d/yunohost.conf’: No such file or directory

I guess that means that the directory isn’t there - should I create it?

Cheers

Fil

Seems like the whole directory structure under /etc isn’t there:
ls /etc/fail2ban
ls: cannot access ‘/etc/fail2ban’: No such file or directory

Eh so instead let’s try to :

cp -r /etc/fail2ban.old /etc/fail2ban