On CentOS7 I have the fail2ban-client working flawlessly, as it bans ips on failed logins as configured, but when I look at its systemctl status it shows as if it wouldn't be active or in failed state if I tried to start fail2ban by systemctl.
$ sudo fail2ban-client start
37,359 fail2ban.server [19559]: INFO Starting Fail2ban v0.9.7
37,359 fail2ban.server [19559]: INFO Starting in daemon mode
$ sudo fail2ban-client status
Status
|- Number of jail: 14
`- Jail list: apache-auth, ...
$ sudo systemctl status fail2ban -l
● fail2ban.service - Fail2Ban Service
Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; disabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/fail2ban.service.d
└─limit.conf
Active: inactive (dead)
Docs: man:fail2ban(1)
$ sudo fail2ban-client stop
Shutdown successful
$ sudo systemctl start fail2ban
Job for fail2ban.service failed because a fatal signal was delivered to the control process. See "systemctl status fail2ban.service" and "journalctl -xe" for details.
$ sudo systemctl status fail2ban -l
● fail2ban.service - Fail2Ban Service
Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; disabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/fail2ban.service.d
└─limit.conf
Active: failed (Result: start-limit) since Wed 2019-01-30 18:56:50 CET; 11s ago
Docs: man:fail2ban(1)
Process: 20154 ExecStartPre=/bin/mkdir -p /var/run/fail2ban (code=killed, signal=SEGV)
systemd[1]: fail2ban.service: control process exited, code=killed status=11
systemd[1]: Failed to start Fail2Ban Service.
systemd[1]: Unit fail2ban.service entered failed state.
systemd[1]: fail2ban.service failed.
systemd[1]: fail2ban.service holdoff time over, scheduling restart.
systemd[1]: Stopped Fail2Ban Service.
systemd[1]: start request repeated too quickly for fail2ban.service
systemd[1]: Failed to start Fail2Ban Service.
systemd[1]: Unit fail2ban.service entered failed state.
systemd[1]: fail2ban.service failed.
/var/log/fail2ban.log
shows no more details than the above systemctl status fail2ban -l
. Why doesn't it start by systemctl?