Package: fail2ban
Version: 0.11.2-2
Severity: important

When I try to install fail2ban (as a dependency of a metapackage) into
a Debian bullseye Docker container, the fail2ban postinst errors with
the message "Have not found any log file for sshd jail", causing the
dpkg process ran by apt to fail. A similar message occurs in buster,
but the message does not result in an error and apt install failure.

   root@bullseye:/# apt install fail2ban
   Reading package lists... Done
   Building dependency tree... Done
   Reading state information... Done
   Suggested packages:
     mailx system-log-daemon monit sqlite3
   Recommended packages:
     nftables | iptables whois python3-pyinotify python3-systemd
   The following NEW packages will be installed:
     fail2ban
   0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
   Need to get 451 kB of archives.
   After this operation, 2,142 kB of additional disk space will be used.
   Get:1 https://friskrepo/debian bullseye/main amd64 fail2ban all 0.11.2-2 
[451 kB]
   Fetched 451 kB in 0s (9,125 kB/s)
   Selecting previously unselected package fail2ban.
   (Reading database ... 19895 files and directories currently installed.)
   Preparing to unpack .../fail2ban_0.11.2-2_all.deb ...
   Unpacking fail2ban (0.11.2-2) ...
   Setting up fail2ban (0.11.2-2) ...
   invoke-rc.d: could not determine current runlevel
   Starting Authentication failure monitor: fail2ban2021-11-14 05:39:39,575 
fail2ban                [98]: ERROR   Failed during configuration: Have not 
found any log file for sshd jail
    failed!
   invoke-rc.d: initscript fail2ban, action "start" failed.
   dpkg: error processing package fail2ban (--configure):
    installed fail2ban package post-installation script subprocess returned 
error exit status 1
   Processing triggers for man-db (2.9.4-2) ...
   Errors were encountered while processing:
    fail2ban
   E: Sub-process /usr/bin/dpkg returned an error code (1)

   root@buster:/# apt install fail2ban
   Reading package lists... Done
   Building dependency tree       
   Reading state information... Done
   Suggested packages:
     mailx system-log-daemon monit sqlite3
   Recommended packages:
     python iptables | nftables whois python3-pyinotify python3-systemd
   The following NEW packages will be installed:
     fail2ban
   0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
   Need to get 385 kB of archives.
   After this operation, 1,777 kB of additional disk space will be used.
   Get:1 https://friskrepo/debian buster/main amd64 fail2ban all 0.10.2-2.1 
[385 kB]
   Fetched 385 kB in 0s (11.2 MB/s)   
   
   Selecting previously unselected package fail2ban.
   (Reading database ... 19493 files and directories currently installed.)
   Preparing to unpack .../fail2ban_0.10.2-2.1_all.deb ...
   Unpacking fail2ban (0.10.2-2.1) ...
   Setting up fail2ban (0.10.2-2.1) ...
   invoke-rc.d: could not determine current runlevel
   [....] Starting authentication failure monitor: fail2ban No file(s) found 
for glob /var/log/auth.log
    Failed during configuration: Have not found any log file for sshd jail
    failed!
   Processing triggers for man-db (2.8.5-2) ...

-- System Information:
Debian Release: 11.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-0.bpo.9-amd64 (SMP w/16 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages fail2ban depends on:
ii  lsb-base  11.1.0
ii  python3   3.9.2-3

Versions of packages fail2ban recommends:
pn  nftables | iptables  <none>
pn  python3-pyinotify    <none>
pn  python3-systemd      <none>
pn  whois                <none>

Versions of packages fail2ban suggests:
pn  mailx              <none>
pn  monit              <none>
pn  sqlite3            <none>
pn  system-log-daemon  <none>

-- no debconf information

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to