The officially official Devuan Forum!

You are not logged in.

#1 2023-09-02 12:54:10

bai4Iej2need
Member
From: Ortenau
Registered: 2021-04-25
Posts: 117  

[SOLVED] after upgrade from chimaera to daedalus fail2ban package is broken

Hi I had a rather smooth update/upgrade/dist-upgrade from chimaera to daedalus this night.

One package did not make it : fail2ban is now in a state where it cannot be removed, purged nor reinstalled

dpkg --force-conflicts --remove fail2ban > fail2ban_errors 2>&1
cat fail2ban_errors
(Reading database ... 73048 files and directories currently installed.)
Removing fail2ban (1.0.2-2) ...
Stopping Authentication failure monitor: fail2ban failed!
invoke-rc.d: initscript fail2ban, action "stop" failed.
dpkg: error processing package fail2ban (--remove):
 installed fail2ban package pre-removal script subprocess returned error exit status 1
Starting Authentication failure monitor: fail2ban2023-09-02 14:21:41,881 fail2ban.configreader   [13051]: WARNING 'allowipv6' not defined in 'Definition'. Using default one: 'auto'
2023-09-02 14:21:42,070 fail2ban                [13051]: ERROR   Failed during configuration: Bad value substitution: option 'ignorecommand' in section 'apache-fakegooglebot' contains an interpolation key 'ignorecommands_dir' which is not a valid option name. Raw value: '%(ignorecommands_dir)s/apache-fakegooglebot <ip>'
 failed!
invoke-rc.d: initscript fail2ban, action "start" failed.
dpkg: error while cleaning up:
 installed fail2ban package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 fail2ban
action "stop" failed.

This action must fail, because the fail2ban is not running from the beginning.
Stopping a not running process must not produce an error, because the wished result is already achieved. (initscripts?)

why does the removal procedure try to start the app ?

dpkg --force-remove-reinstreq --remove fail2ban 

  same result

locate fakegooglebot | grep -E "^/etc"
/etc/fail2ban/filter.d/apache-fakegooglebot.conf
/etc/fail2ban/filter.d/ignorecommands/apache-fakegooglebot

Nothing which I understand

Now I am lost, because this hinders other install activities . Each time dpkg is called, this errors show up, of course multiple times.

Last edited by bai4Iej2need (2023-09-02 13:10:57)


The devil, you know, is better than the angel, you don't know. by a British Citizen, I don't know too good.
One generation abandons the enterprises of another like stranded vessels. By Henry David Thoreau, WALDEN, Economy. Line 236 (Gutenberg text Version)
broken by design :
https://bugs.debian.org/cgi-bin/bugrepo … bug=958390

Offline

#2 2023-09-02 15:46:19

bai4Iej2need
Member
From: Ortenau
Registered: 2021-04-25
Posts: 117  

Re: [SOLVED] after upgrade from chimaera to daedalus fail2ban package is broken

This fixed it
https://www.f1-consult.com/linux/debian … -packages/

Attention turn the music off!  This is the last thing, I need, if I have to fix a problem.


The devil, you know, is better than the angel, you don't know. by a British Citizen, I don't know too good.
One generation abandons the enterprises of another like stranded vessels. By Henry David Thoreau, WALDEN, Economy. Line 236 (Gutenberg text Version)
broken by design :
https://bugs.debian.org/cgi-bin/bugrepo … bug=958390

Offline

#3 2023-09-02 16:24:21

chris2be8
Member
Registered: 2018-08-11
Posts: 307  

Re: [SOLVED] after upgrade from chimaera to daedalus fail2ban package is broken

My first thought would be to patch the fail2ban initscript to always return success. Eg put exit 0 near the start of it.

Offline

#4 2023-09-03 19:07:05

bai4Iej2need
Member
From: Ortenau
Registered: 2021-04-25
Posts: 117  

Re: [SOLVED] after upgrade from chimaera to daedalus fail2ban package is broken

@chris2be8
I made an attempt to reinstall fail2ban on top of the still existing conf files.

apt install fail2ban

This failed and the system was borked as before.
now I looked for the /var/lib/dpkg/info/fail2ban.prerm script
changed the exit value to 0

dpkg --remove --force-remove-reinstreq fail2ban
(Reading database... 103543 files and directories are currently installed.)
Removing fail2ban (1.0.2-2)...
Stopping authentication failure monitor: fail2ban failed!
invoke-rc.d: initscript fail2ban, action stop failed.
Processing triggers for man-db (2.11.2-2)...
root@$HOSTNAME /var/lib/dpkg/info # dpkg --remove --force-remove-reinstreq fail2ban
dpkg: warning: request to delete fail2ban will be ignored, of which only the
  conf files are on the system; use --purge to purge them
root@$HOSTNAME /var/lib/dpkg/info # dpkg --purge fail2ban
(Reading database... 103272 files and directories are currently installed.)
Deleting fail2ban (1.0.2-2) configuration files...
dpkg: warning: while removing fail2ban, directory '/usr/lib/python3/dist-packages/fail2ban/tests/files/config/apache-auth' is not empty, so will not be deleted
dpkg: warning: while removing fail2ban, directory '/usr/lib/python3/dist-packages/fail2ban/tests/files/action.d' is not empty, so it will not be deleted
dpkg: warning: while removing fail2ban, directory '/usr/lib/python3/dist-packages/fail2ban/tests/action_d' is not empty, so will not be deleted
dpkg: warning: while removing fail2ban, directory '/usr/lib/python3/dist-packages/fail2ban/server' is not empty, so will not be deleted
dpkg: warning: while removing fail2ban, directory '/usr/lib/python3/dist-packages/fail2ban/client' is not empty, so will not be deleted
dpkg: warning: while removing fail2ban, directory '/etc/fail2ban/jail.d' is not empty, so will not be deleted
dpkg: warning: while removing fail2ban, directory '/etc/fail2ban/filter.d' is not empty, so will not be deleted
dpkg: warning: while removing fail2ban, directory '/etc/fail2ban/action.d' is not empty, so will not be deleted
root@$HOSTNAME /var/lib/dpkg/info # rm -rf /etc/fail2ban
root@$HOSTNAME /var/lib/dpkg/info # rm -rf /usr/lib/python3/dist-packages/fail2ban

So Your advice worked. Thx
Finally got rid of the darn package which caused the highest load in the system.
I will do another thing to protect the server  .

Last edited by bai4Iej2need (2023-09-03 19:07:46)


The devil, you know, is better than the angel, you don't know. by a British Citizen, I don't know too good.
One generation abandons the enterprises of another like stranded vessels. By Henry David Thoreau, WALDEN, Economy. Line 236 (Gutenberg text Version)
broken by design :
https://bugs.debian.org/cgi-bin/bugrepo … bug=958390

Offline

Board footer