I just installed fail2ban on my Ubuntu 10.04 server.

When I try to start the client it returns:

ERROR Could not start server. Maybe an old socket file is still present. Try to remove /var/run/fail2ban/fail2ban.sock. If you used fail2ban-client to start the server, adding the -x option will do it

I deleted the fail2ban.sock, but nothing changed. How should I fix this?

  • How do you try to start the client? – Janne Pikkarainen May 22 '12 at 13:29
  • fail2ban-client start – x_vi_r May 22 '12 at 13:59
  • Anything in fail2ban.log? – mgorven May 22 '12 at 22:28

I guess your fail2ban server closed unexpectedly (may be killed?). Check /var/run/fail2ban/fail2ban.sock file. Remove if exist and run fail2ban with command below:

sudo service fail2ban start


sudo systemctl start fail2ban.service


sudo fail2ban-client start

considering to which is supported with OS you are using.

Also you may try to run another instance of fail2ban. Before you run fail2ban, check for service with ps ax | grep fail2ban. If service is not running, then you can safely start service.

  • 1
    Thx ! I started it with sudo fail2ban-client start as i see on the Ubuntu french documentation and it didn't works... Now it seems to works well. I'll ask for a change of the french wiki. – x_vi_r Jun 6 '12 at 7:38

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.