Unable to start service 'fail2ban'

My YunoHost server

Hardware: VPS bought online (Debian 9.9)
YunoHost version: 3.6.4.6 (stable). (Look here for the entire Diagnosis result)
I have access to my server : Through SSH and through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

The Service Fail2Ban is unable to start. This prevents me from updating and installing new apps.

Click here to read the full error log
Unable to start service 'fail2ban'

Recent service logs:-- Logs begin at Tue 2019-08-06 09:58:13 UTC, end at Fri 2019-08-09 08:01:22 UTC. --
Aug 06 09:58:15 mijn.dosch.nl systemd[1]: Starting Fail2Ban Service...
-- Subject: Unit fail2ban.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit fail2ban.service has begun starting up.
Aug 06 09:58:17 mijn.dosch.nl fail2ban-client[1491]: ERROR No file(s) found for glob /var/log/fail2ban.log
Aug 06 09:58:17 mijn.dosch.nl fail2ban-client[1491]: ERROR Failed during configuration: Have not found any log file for recidive jail
Aug 06 09:58:17 mijn.dosch.nl systemd[1]: fail2ban.service: Control process exited, code=exited status=255
Aug 06 09:58:17 mijn.dosch.nl systemd[1]: Failed to start Fail2Ban Service.
-- Subject: Unit fail2ban.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit fail2ban.service has failed.
-- 
-- The result is failed.
Aug 06 09:58:17 mijn.dosch.nl systemd[1]: fail2ban.service: Unit entered failed state.
Aug 06 09:58:17 mijn.dosch.nl systemd[1]: fail2ban.service: Failed with result 'exit-code'.
Aug 06 09:58:18 mijn.dosch.nl systemd[1]: fail2ban.service: Service hold-off time over, scheduling restart.
Aug 06 09:58:18 mijn.dosch.nl systemd[1]: Stopped Fail2Ban Service.
-- Subject: Unit fail2ban.service has finished shutting down
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit fail2ban.service has finished shutting down.
Aug 06 09:58:18 mijn.dosch.nl systemd[1]: Starting Fail2Ban Service...
-- Subject: Unit fail2ban.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit fail2ban.service has begun starting up.
Aug 06 09:58:20 mijn.dosch.nl systemd[1]: fail2ban.service: Unit cannot be reloaded because it is inactive.
Aug 06 09:58:20 mijn.dosch.nl fail2ban-client[1875]: ERROR No file(s) found for glob /var/log/fail2ban.log
Aug 06 09:58:20 mijn.dosch.nl fail2ban-client[1875]: ERROR Failed during configuration: Have not found any log file for recidive jail
Aug 06 09:58:20 mijn.dosch.nl systemd[1]: fail2ban.service: Control process exited, code=exited status=255
Aug 06 09:58:20 mijn.dosch.nl systemd[1]: fail2ban.service: Unit entered failed state.
Aug 06 09:58:20 mijn.dosch.nl systemd[1]: fail2ban.service: Failed with result 'exit-code'.
Aug 06 09:58:20 mijn.dosch.nl systemd[1]: fail2ban.service: Service hold-off time over, scheduling restart.
Aug 06 09:58:20 mijn.dosch.nl systemd[1]: Stopped Fail2Ban Service.
-- Subject: Unit fail2ban.service has finished shutting down
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit fail2ban.service has finished shutting down.
Aug 06 09:58:20 mijn.dosch.nl systemd[1]: Starting Fail2Ban Service...
-- Subject: Unit fail2ban.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit fail2ban.service has begun starting up.
Aug 06 09:58:22 mijn.dosch.nl fail2ban-client[2076]: ERROR No file(s) found for glob /var/log/fail2ban.log
Aug 06 09:58:22 mijn.dosch.nl fail2ban-client[2076]: ERROR Failed during configuration: Have not found any log file for recidive jail
Aug 06 09:58:22 mijn.dosch.nl systemd[1]: fail2ban.service: Control process exited, code=exited status=255
Aug 06 09:58:22 mijn.dosch.nl systemd[1]: Failed to start Fail2Ban Service.
-- Subject: Unit fail2ban.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit fail2ban.service has failed.
-- 
-- The result is failed.
Aug 06 09:58:22 mijn.dosch.nl systemd[1]: fail2ban.service: Unit entered failed state.
Aug 06 09:58:22 mijn.dosch.nl systemd[1]: fail2ban.service: Failed with result 'exit-code'.
Aug 06 09:58:22 mijn.dosch.nl systemd[1]: fail2ban.service: Service hold-off time over, scheduling restart.
Aug 06 09:58:22 mijn.dosch.nl systemd[1]: Stopped Fail2Ban Service.
-- Subject: Unit fail2ban.service has finished shutting down
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit fail2ban.service has finished shutting down.
Aug 06 09:58:22 mijn.dosch.nl systemd[1]: Starting Fail2Ban Service...
-- Subject: Unit fail2ban.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit fail2ban.service has begun starting up.
Aug 06 09:58:23 mijn.dosch.nl fail2ban-client[2221]: ERROR No file(s) found for glob /var/log/fail2ban.log
Aug 06 09:58:23 mijn.dosch.nl fail2ban-client[2221]: ERROR Failed during configuration: Have not found any log file for recidive jail
Aug 06 09:58:23 mijn.dosch.nl systemd[1]: fail2ban.service: Control process exited, code=exited status=255
Aug 06 09:58:23 mijn.dosch.nl systemd[1]: Failed to start Fail2Ban Service.
-- Subject: Unit fail2ban.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit fail2ban.service has failed.
-- 
-- The result is failed.
Aug 06 09:58:23 mijn.dosch.nl systemd[1]: fail2ban.service: Unit entered failed state.
Aug 06 09:58:23 mijn.dosch.nl systemd[1]: fail2ban.service: Failed with result 'exit-code'.
Aug 06 09:58:24 mijn.dosch.nl systemd[1]: fail2ban.service: Service hold-off time over, scheduling restart.
Aug 06 09:58:24 mijn.dosch.nl systemd[1]: Stopped Fail2Ban Service.
-- Subject: Unit fail2ban.service has finished shutting down
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit fail2ban.service has finished shutting down.
Aug 06 09:58:24 mijn.dosch.nl systemd[1]: Starting Fail2Ban Service...
-- Subject: Unit fail2ban.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit fail2ban.service has begun starting up.
Aug 06 09:58:24 mijn.dosch.nl fail2ban-client[2356]: ERROR No file(s) found for glob /var/log/fail2ban.log
Aug 06 09:58:24 mijn.dosch.nl fail2ban-client[2356]: ERROR Failed during configuration: Have not found any log file for recidive jail
Aug 06 09:58:24 mijn.dosch.nl systemd[1]: fail2ban.service: Control process exited, code=exited status=255
Aug 06 09:58:24 mijn.dosch.nl systemd[1]: Failed to start Fail2Ban Service.
-- Subject: Unit fail2ban.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit fail2ban.service has failed.
-- 
-- The result is failed.
Aug 06 09:58:24 mijn.dosch.nl systemd[1]: fail2ban.service: Unit entered failed state.
Aug 06 09:58:24 mijn.dosch.nl systemd[1]: fail2ban.service: Failed with result 'exit-code'.
Aug 06 09:58:24 mijn.dosch.nl systemd[1]: fail2ban.service: Service hold-off time over, scheduling restart.
Aug 06 09:58:24 mijn.dosch.nl systemd[1]: Stopped Fail2Ban Service.
-- Subject: Unit fail2ban.service has finished shutting down
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit fail2ban.service has finished shutting down.
Aug 06 09:58:24 mijn.dosch.nl systemd[1]: fail2ban.service: Start request repeated too quickly.
Aug 06 09:58:24 mijn.dosch.nl systemd[1]: Failed to start Fail2Ban Service.
-- Subject: Unit fail2ban.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit fail2ban.service has failed.
-- 
-- The result is failed.
Aug 06 09:58:24 mijn.dosch.nl systemd[1]: fail2ban.service: Unit entered failed state.
Aug 06 09:58:24 mijn.dosch.nl systemd[1]: fail2ban.service: Failed with result 'exit-code'.
Aug 09 08:01:22 mijn.dosch.nl systemd[1]: Starting Fail2Ban Service...
-- Subject: Unit fail2ban.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit fail2ban.service has begun starting up.
Aug 09 08:01:22 mijn.dosch.nl fail2ban-client[28261]: ERROR No file(s) found for glob /var/log/fail2ban.log
Aug 09 08:01:22 mijn.dosch.nl fail2ban-client[28261]: ERROR Failed during configuration: Have not found any log file for recidive jail
Aug 09 08:01:22 mijn.dosch.nl systemd[1]: fail2ban.service: Control process exited, code=exited status=255
Aug 09 08:01:22 mijn.dosch.nl systemd[1]: Failed to start Fail2Ban Service.
-- Subject: Unit fail2ban.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit fail2ban.service has failed.
-- 
-- The result is failed.
Aug 09 08:01:22 mijn.dosch.nl systemd[1]: fail2ban.service: Unit entered failed state.
Aug 09 08:01:22 mijn.dosch.nl systemd[1]: fail2ban.service: Failed with result 'exit-code'.

Unable to execute command 'systemctl start fail2ban'

Thank you for any tips!

Meh that’s really a stupid issue for fail2ban to fail because of this …

Can you try to touch /var/log/fail2ban.log then try to restart the service ? :confused:

1 Like

It worked. That simple heh?

The service 'fail2ban' has been started

Wonder why it started failing… I didn’t do anything with that file…

Yes, that’s really not your fault … It’s just that fail2ban can’t start if some files that it’s supposed to monitor aren’t there yet. Even though there are legitimate situations where the file doesn’t exist yet … but will definitely exist in the future.

The most “fun” part here is fail2ban not being able to start because its very own logfile doesn’t exist yet…

1 Like

and it isn’t smart enough to create one…
Thnx for your simple solution. You also solved this one for me!
:hearts: