Fail2ban wont start

Now I get a slightly different message that includes: .
To force a start use “systemctl reset-failed fail2ban.service” followed by “sysemctl start fail2ban.service” again.

Can’t tell what’s happening after doing the first command but after the second command I’m back to square 1

Do I need to reboot?

Has Fail2ban issue been resolved yet? I have FreePBX 15 PBXes that wont start Fail2Ban, even after upgrading sysadmin.

I dont think so. I just tried upgrading sys admin and the firewall and see no difference.

Did either of you try this:

Yes and that did not work, same error message. I looked through all of these recent threads before I left the question asking if it was resolved

Thanks. Unfortunately that did not work.

Jul 20 12:27:54 xxx systemd[1]: fail2ban.service: control process exited, code=exited status=255
Jul 20 12:27:54 xxx systemd[1]: Failed to start Fail2Ban Service.
Jul 20 12:27:54 xxx systemd[1]: Unit fail2ban.service entered failed state.
Jul 20 12:27:54 xxx systemd[1]: fail2ban.service failed.
Jul 20 12:27:54 xxx systemd[1]: fail2ban.service holdoff time over, scheduling restart.
Jul 20 12:27:54 xxx systemd[1]: Stopped Fail2Ban Service.
Jul 20 12:27:54 xxx systemd[1]: start request repeated too quickly for fail2ban.service
Jul 20 12:27:54 xxx systemd[1]: Failed to start Fail2Ban Service.
Jul 20 12:27:54 xxx systemd[1]: Unit fail2ban.service entered failed state.
Jul 20 12:27:54 xxx systemd[1]: fail2ban.service failed.

Just installed sysadmin 15.0.21.68 update and fail2ban still not running.
Also Restapps and xmpp daemons not running.
Any suggestions please.
Tried all the above methods no change.

Thanks

Ralph

As no answer given on this thread can anyone direct me to similar thread with responses please?
I have not been able to locate it as referred to above.

Fail2ban won't start after update perhaps?

yum reinstall fail2ban
worked for me

did not work for me
still no running fail2ban

Got another system with fail2ban errors.

Took a look in journalctl -xe and saw this:
ERROR No file(s) found for glob /var/log/asterisk/zulu_out.log

Solution:
sudo -u asterisk touch /var/log/asterisk/zulu_out.log

4 Likes

Thanks very much. This allowed Instrusion detection to be restarted and thus fail2ban is working.
Still have restapps and xmpp daemons not working since recent upgrades.

1 Like

restapps just upgraded but still not running as per dashboard

restarted restapps and xmpp manually via cli and all seems to be running now

1 Like

Just upgraded to 15 - running sysadmin 15.0.21.68 and Fail2Ban not starting for me too.
[root@pbx ~]# systemctl status fail2ban.service -l
● fail2ban.service - Fail2Ban Service
Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Fri 2021-07-30 14:39:43 PDT; 1min 23s ago
Process: 10679 ExecStart=/usr/bin/fail2ban-client -x start (code=exited, status=255)
Process: 10677 ExecStartPre=/bin/mkdir -p /var/run/fail2ban (code=exited, status=0/SUCCESS)

Jul 30 14:39:43 pbx.my.domain systemd[1]: Failed to start Fail2Ban Service.
Jul 30 14:39:43 pbx.my.domain systemd[1]: Unit fail2ban.service entered failed state.
Jul 30 14:39:43 pbx.my.domain systemd[1]: fail2ban.service failed.
Jul 30 14:39:43 pbx.my.domain systemd[1]: fail2ban.service holdoff time over, scheduling restart.
Jul 30 14:39:43 pbx.my.domain systemd[1]: Stopped Fail2Ban Service.
Jul 30 14:39:43 pbx.my.domain systemd[1]: start request repeated too quickly for fail2ban.service
Jul 30 14:39:43 pbx.my.domain systemd[1]: Failed to start Fail2Ban Service.
Jul 30 14:39:43 pbx.my.domain systemd[1]: Unit fail2ban.service entered failed state.
Jul 30 14:39:43 pbx.my.domain systemd[1]: fail2ban.service failed.

Tried the zulu command and /var/www/html/admin/modules/sysadmin/hooks/fail2ban-apache-config attempt. None have worked.

Still same issues. Systemadmin is now fixed from edge update, but fail2ban remains broken after restore. Tried all methods above

Had the same problem after last yum update and full Freepbx update to 15.0.17.43, tried to reinstall Fail2ban and tinkered around a bit to no avail,
Then tried the manual /var/www/html/admin/modules/sysadmin/hooks/fail2ban-apache-config and it worked like a charm. all is up and running now !!