#874071 fail2ban: Fails to start after Jessie to Stretch upgrade due to sshd being enabled in /etc/fail2ban/jail.d/defaults-debian.conf

#874071#5
Date:
2017-09-02 18:04:16 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?
     I upgraded my system from Jessie to Stretch.
     #767119 enables ssh jail in /etc/fail2ban/jail.d/defaults-debian.conf

   * What exactly did you do (or not do) that was effective (or
     ineffective)?
     Disabling the SSH jail in /etc/fail2ban/jail.d/defaults-debian.conf
     fixed the problem.

   * What was the outcome of this action?
     fail2ban does not start. Here is an example. The same happened when
     I try to start it manually:

     Aug 31 01:15:52 vbox systemd[1]: apt-daily-upgrade.timer: Adding 25min
     818.405ms random time.
     Aug 31 01:15:52 vbox systemd[1]: fail2ban.service: Control process
     exited, code=exited status=255
     Aug 31 01:15:52 vbox systemd[1]: Failed to start Fail2Ban Service.
     Aug 31 01:15:52 vbox systemd[1]: fail2ban.service: Unit entered failed
     state.
     Aug 31 01:15:52 vbox systemd[1]: fail2ban.service: Failed with result
     'exit-code'.
     Aug 31 01:15:52 vbox systemd[1]: fail2ban.service: Service hold-off time
     over, scheduling restart.
     Aug 31 01:15:52 vbox systemd[1]: Stopped Fail2Ban Service.
     Aug 31 01:15:52 vbox systemd[1]: Starting Fail2Ban Service...
     Aug 31 01:15:52 vbox fail2ban-client[1464]: WARNING 'filter' not defined
     in 'sshd'. Using default one: ''
     Aug 31 01:15:52 vbox fail2ban-client[1464]: WARNING No filter set for
     jail sshd
     Aug 31 01:15:52 vbox fail2ban-client[1464]: WARNING 'filter' not defined
     in 'sshd'. Using default one: ''
     Aug 31 01:15:52 vbox fail2ban-client[1464]: ERROR  Failed during
     configuration: Bad value substitution: option 'action' in section 'sshd'
     contains an interpolation key 'port' which is not a valid option name.
     Raw value: '%(action_)s'
     Aug 31 01:15:52 vbox systemd[1]: fail2ban.service: Control process
     exited, code=exited status=255
     Aug 31 01:15:52 vbox systemd[1]: Failed to start Fail2Ban Service.
     Aug 31 01:15:52 vbox systemd[1]: fail2ban.service: Unit entered failed
     state.
     Aug 31 01:15:52 vbox systemd[1]: fail2ban.service: Failed with result
     'exit-code'.

   * What outcome did you expect instead?
     fail2ban should start even if the SSH jail is enabled in
     /etc/fail2ban/jail.d/defaults-debian.conf or this option should be
     disabled on systems where this problem occurs.

#874071#10
Date:
2017-12-29 11:04:57 UTC
From:
To:
This bug also affects my upgraded debian.