Fail2ban will not start

Fail2ban fails to start. FreePBX 16.0.40.7, Fail2ban 0.8.14-78.

systemctl status fail2ban.service

fail2ban.service - Fail2Ban Service

Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; disabled; vendor preset: disabled)

Active: failed (Result: start-limit) since Thu 2023-11-30 07:53:57 CST; 21min ago

Process: 12719 ExecStart=/usr/bin/fail2ban-client -x start (code=exited, status=255)

Process: 12717 ExecStartPre=/bin/mkdir -p /var/run/fail2ban (code=exited, status=0/SUCCESS)

Nov 30 07:53:57 xxxxxxxxxxxxx.com systemd[1]: fail2ban.service failed.

Nov 30 07:53:57 xxxxxxxxxxxxx.com systemd[1]: fail2ban.service holdoff time over, scheduling restart.

Nov 30 07:53:57 xxxxxxxxxxxxx.com systemd[1]: Stopped Fail2Ban Service.

Nov 30 07:53:57 xxxxxxxxxxxxx.com systemd[1]: start request repeated too quickly for fail2ban.service

Nov 30 07:53:57 xxxxxxxxxxxxx.com systemd[1]: Failed to start Fail2Ban Service.

Nov 30 07:53:57 xxxxxxxxxxxxx.com systemd[1]: Unit fail2ban.service entered failed state.

Nov 30 07:53:57 xxxxxxxxxxxxx.com systemd[1]: fail2ban.service failed.

Nov 30 07:54:02 xxxxxxxxxxxxx.com systemd[1]: start request repeated too quickly for fail2ban.service

Nov 30 07:54:02 xxxxxxxxxxxxx.com systemd[1]: Failed to start Fail2Ban Service.

Nov 30 07:54:02 xxxxxxxxxxxxx.com systemd[1]: fail2ban.service failed

journalctl -xe

– Defined-By: systemd

– Support: systemd-devel Info Page

– Unit session-65.scope has finished starting up.

– The start-up result is done.

Nov 30 08:17:01 xxxxxxxxxxxxx.com CROND[16971]: (asterisk) CMD ([ -e /usr/sbin/fwconsole ] && /usr/sbin/fwconsole job --run --quiet 2>&1 > /dev/null)

Nov 30 08:17:01 xxxxxxxxxxxxx.com crontab[16986]: (asterisk) LIST (asterisk)

Nov 30 08:17:01 xxxxxxxxxxxxx.com crontab[16988]: (asterisk) LIST (asterisk)

Nov 30 08:17:05 xxxxxxxxxxxxx.com crontab[17055]: (asterisk) LIST (asterisk)

Nov 30 08:17:05 xxxxxxxxxxxxx.com crontab[17057]: (asterisk) LIST (asterisk)

Nov 30 08:17:05 xxxxxxxxxxxxx.com crontab[17059]: (asterisk) LIST (asterisk)

Nov 30 08:17:05 xxxxxxxxxxxxx.com crontab[17060]: (asterisk) REPLACE (asterisk)

Nov 30 08:17:05 xxxxxxxxxxxxx.com crontab[17062]: (asterisk) LIST (asterisk)

Nov 30 08:17:05 xxxxxxxxxxxxx.com crontab[17064]: (asterisk) LIST (asterisk)

Nov 30 08:17:05 xxxxxxxxxxxxx.com crontab[17065]: (asterisk) REPLACE (asterisk)

Nov 30 08:17:05 xxxxxxxxxxxxx.com crontab[17067]: (asterisk) LIST (asterisk)

Nov 30 08:17:05 xxxxxxxxxxxxx.com systemd[1]: Removed slice User Slice of asterisk.

– Subject: Unit user-999.slice has finished shutting down

– Defined-By: systemd

– Support: systemd-devel Info Page

– Unit user-999.slice has finished shutting down.

Did this help?

Fail2ban wont start - FreePBX / Security - FreePBX Community Forums

I ran
/var/www/html/admin/modules/sysadmin/hooks/fail2ban-apache-config
as suggested, but it didn’t change anything. I had reviewed the entire thread and several others before posting. Either this is a different problem or I’m just missing it, which is quite possible.

From a shell as root, what does

issue ?

/usr/bin/fail2ban-client -x start
ERROR No section: ‘Definition’
ERROR Failed during configuration: ‘bool’ object is not iterable

Looks like one of your conf foles got mangled, I would reinstall

Ouch. I’ve actually never done that. Is the install destructive to the current configuration?

Apparently your current configuration is already destructive :wink:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.