I've been running fail2ban successfully for a long time on RHEL.

Now all of a sudden starting, stopping and restarting via /etc/init.d/fail2ban no longer works:

# /etc/init.d/fail2ban start
Starting fail2ban: [  OK  ]

# service fail2ban status
Fail2ban (pid 31808) is running...
ERROR  Unable to contact server. Is it running?

# /etc/init.d/fail2ban stop
Stopping fail2ban: [FAILED]

However if I do it this way it works:

# /usr/bin/fail2ban-client start
2014-02-11 15:46:13,863 fail2ban.server : INFO   Starting Fail2ban v0.8.4
2014-02-11 15:46:13,863 fail2ban.server : INFO   Starting in daemon mode

# /usr/bin/fail2ban-client status
|- Number of jail:      10
`- Jail list: ...

#/usr/bin/fail2ban-client stop
Shutdown successful

The file /etc/init.d/fail2ban hasn't changed and I can't see anything wrong with it.


I figured it out.

There was a rogue fail2ban process running. After I killed it, fail2ban now restarts in the usual manner.

| improve this answer | |
  • Hi, I am facing the same issue too! Could you please tell me how you did this. Thanks! – SidS May 11 '17 at 21:18
  • It was a while ago so I don't recall. I'm guessing I did top found the process in question and did kill pid but that's assuming you have a rogue process running like I did – MrCarrot May 11 '17 at 21:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.