fail2ban stopped working after latest update

2 posts / 0 new
Last post
#1 Thu, 05/25/2017 - 13:36
truelivingorganics

fail2ban stopped working after latest update

Simply put fail2ban will not start any longer. I have been trying to work this out with the fail2ban people with no success. But what keeps happening is the system after trying to start fail2ban for sometime the log files show that during apache overflow jail start fail2ban runs into an error saying it can no longer allocate memory.

2017-05-22 12:57:12,274 fail2ban.utils [5453]: ERROR 118ca58 -- exec: iptables -n -L INPUT | grep -q 'f2b-apache-overflows[ \t]' 2017-05-22 12:57:12,274 fail2ban.utils [5453]: ERROR iptables -n -L INPUT | grep -q 'f2b-apache-overflows[ \t]' -- failed with [Errno 12] Cannot allocate memory 2017-05-22 12:57:12,274 fail2ban.CommandAction [5453]: ERROR Invariant check failed. Trying to restore a sane environment 2017-05-22 12:57:12,275 fail2ban.utils [5453]: ERROR 114b530 -- exec: iptables -D INPUT -p tcp -j f2b-apache-overflows iptables -F f2b-apache-overflows iptables -X f2b-apache-overflows 2017-05-22 12:57:12,275 fail2ban.utils [5453]: ERROR iptables -D INPUT -p tcp -j f2b-apache-overflows iptables -F f2b-apache-overflows iptables -X f2b-apache-overflows -- failed with [Errno 12] Cannot allocate memory

Any help on this would be nice or better yet I rather be pointed to the old fail2ban rpm file so I can just reinstall it.

Thu, 05/25/2017 - 22:47
coderinthebox

I encountered that one and it was indeed a memory allocation error. My Fail2Ban is linked with CSF. Fail2ban is config to scan for 1 year range and it always caused a memory error when fail2ban restart (it releases all bans and then all the logs for 1 year span).

If you are sure that there was no memory issue with your server , it may arise from wrong configuration.

Visit me at coderinthebox.com

Topic locked