When i try and restart fail2ban using sudo service fail2ban restart
it displays the following error from systemctl status fail2ban.service
Apr 02 20:12:30 centos systemd[1]: fail2ban.service: control process exited, code=exited status=255
Apr 02 20:12:30 centos systemd[1]: Failed to start Fail2Ban Service.
Apr 02 20:12:30 centos systemd[1]: Unit fail2ban.service entered failed state.
Apr 02 20:12:30 centos systemd[1]: fail2ban.service failed.
Apr 02 20:12:30 centos systemd[1]: fail2ban.service holdoff time over, scheduling restart.
Apr 02 20:12:30 centos systemd[1]: Stopped Fail2Ban Service.
Apr 02 20:12:30 centos systemd[1]: start request repeated too quickly for fail2ban.service
Apr 02 20:12:30 centos systemd[1]: Failed to start Fail2Ban Service.
Apr 02 20:12:30 centos systemd[1]: Unit fail2ban.service entered failed state.
Apr 02 20:12:30 centos systemd[1]: fail2ban.service failed.
then when i run it, displays this error sugesting that fail2ban is not starting as sudo
Apr 02 20:12:30 centos fail2ban-client[3623]: ERROR No file(s) found for glob /var/www/example.com/log/error.log
Apr 02 20:12:30 centos fail2ban-client[3623]: ERROR Failed during configuration: Have not found any log file for apache jail
Apr 02 20:12:30 centos systemd[1]: fail2ban.service: control process exited, code=exited status=255
Apr 02 20:12:30 centos systemd[1]: Failed to start Fail2Ban Service.
However, if i use the command sudo fail2ban-client start
then Fail2Ban Starts normally with no errors.
Does anyone have any idea as to why service is not working with Fail2Ban because i believe its also stopping it from starting at boot?