Fail2ban fail to start "sng-deskapp Jail"

Hello guys im stumped on this. i update the firewall to 16.0.57.6 and fail2ban stopped working. i ssh to the pbx and get this error.

# systemctl -l status fail2ban
● fail2ban.service - Fail2Ban Service
   Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; disabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Fri 2023-02-17 11:23:40 EST; 5min ago
  Process: 12364 ExecStart=/usr/bin/fail2ban-client -x start (code=exited, status=255)
  Process: 12362 ExecStartPre=/bin/mkdir -p /var/run/fail2ban (code=exited, status=0/SUCCESS)

Feb 17 11:23:40 evinox-freepbx systemd[1]: fail2ban.service: control process exited, code=exited status=255
Feb 17 11:23:40 evinox-freepbx systemd[1]: Failed to start Fail2Ban Service.
Feb 17 11:23:40 evinox-freepbx systemd[1]: Unit fail2ban.service entered failed state.
Feb 17 11:23:40 evinox-freepbx systemd[1]: fail2ban.service failed.
Feb 17 11:23:40 evinox-freepbx systemd[1]: fail2ban.service holdoff time over, scheduling restart.
Feb 17 11:23:40 evinox-freepbx systemd[1]: Stopped Fail2Ban Service.
Feb 17 11:23:40 evinox-freepbx systemd[1]: start request repeated too quickly for fail2ban.service
Feb 17 11:23:40 evinox-freepbx systemd[1]: Failed to start Fail2Ban Service.
Feb 17 11:23:40 evinox-freepbx systemd[1]: Unit fail2ban.service entered failed state.
Feb 17 11:23:40 evinox-freepbx systemd[1]: fail2ban.service failed.

i then ran this and got this error

# fail2ban-client -x start
ERROR  No file(s) found for glob /var/log/asterisk/sangomartapi/rtapi.log
ERROR  Failed during configuration: Have not found any log file for sng-deskapp jail

anyone running to this problem?

fwconsole ma downloadinstall framework
fwconsole ma downloadinstall core
fwconsole ma downloadinstall firewall
fwconsole ma downloadinstall sysadmin
fwconsole chown
fwconsole r
fwconsole restart

If in anyway sangoma is out of sync with fail2ban (they have been for 8 years right now) then although current versions of f2b will not object to missing log files, ancient ones will happily parse an empty file ‘neutrally’ so make one . .

touch  /var/log/asterisk/sangomartapi/rtapi.log 

This should get you up and running with what you have, why the f2b jails are not properly configured is an ongoing question . . .

Well I tryed what Comtech said and Dicko next and this is what i got back

Error Output:
================
Job for fail2ban.service failed because the control process exited with error code. See "systemctl status fail2ban.service" and "journalctl -xe" for details.

and then tryed the Touch and got this

]# touch  /var/log/asterisk/sangomartapi/rtapi.log
touch: cannot touch ‘/var/log/asterisk/sangomartapi/rtapi.log’: No such file or directory

i think i may have to restore form backup.

In the absence of that directory, then first

mkdir /var/log/asterisk/sangomartapi

Again, that needs Sangoma to fix it properly

1 Like

LoL your right. i was crossed eyes trying to fix this. that work making the directory and then the file
thanks guys

I had the same issue. Mkdir and Touch commands resolved it for us as well.