Fail2ban service doesn't start: Error: Job for fail2ban.service failed because a timeout was exceeded.




  • Avatar
    Markus Wernecke (Edited )

    Thank You very much for the right way. I got the same result like you have. But is missing. Directory /var/run/fail2ban/ is empty. Perhaps I misunderstood something, but I would like to know how to restore or create or get the missing

    Would be great if You could tell me how to get it - to run fail2ban again after backup restoring/upgrade to Ubuntu18.


  • Avatar
    Pavel Rozental

    Hello Markus,

    The easiest way is to reinstall it from GUI Tools & Settings > Updates & Upgrades

    or command line like described here 

    # plesk installer remove --components fail2ban
    # plesk installer add --components fail2ban


  • Avatar
    Markus Wernecke (Edited )

    Hi Pavel. Thanks a lot for your help. It's necessary to do some additional work. I use dedicated Ubuntu 18.04.1 by 1und1 and Plesk 17.8.11 - Removing and installing alone was not successful. I got the following from Plesk Forum.

    • plesk installer remove --components fail2ban
    • aptitude purge fail2ban plesk-fail2ban-configurator
    • rm -rf /etc/fail2ban
    • rm -rf /etc/fail2ban.previous
    • plesk installer add --components fail2ban (not enough/successful)
    • However, only installing over Update/Upgrade panel brought the working fail2ban back.

     Like You wrote the only successful way was to re-install it over Updates/Upgrades panel.

    Great. THANKS a lot.

  • Avatar
    Tristan Huitenga

    Thanks for the tip. My /var/run/fail2ban folder was gone after every reboot on my Strato vps combined with Plesk. I added a cron job that recreated this folder at reboot:

    1. vi /var/spool/cron/crontabs/root

    2. Added this at the end of the file:

    @reboot mkdir -p /var/run/fail2ban ; chown pleskuser:pleskuser /var/run/fail2ban

Please sign in to leave a comment.

Have more questions? Submit a request