Fail2ban doesn't start (issue with logs)

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 11.2.30.2 (stable)
How are you able to access your server: The webadmin
SSH
Direct access via physical keyboard/screen
Are you in a special context or did you perform specific tweaking on your YunoHost instance ?: no

Describe your issue

Hi,

I think my issue is similar to Can not start fail2ban , fail2ban doesn’t start and the logs point to a missing jail for a specific app (in my case streams__2). I tried using the command given and replacing the name of the app but that didn’t work.

The logs are below but in short fail2ban fails to start because:
Sep 20 14:18:22 fail2ban-server[2689]: 2024-09-20 14:18:22,041 fail2ban [2689]: ERROR Failed during configuration: Have not found any log file for streams__2 jail
Sep 20 14:18:22 fail2ban-server[2689]: 2024-09-20 14:18:22,042 fail2ban [2689]: ERROR Async configuration of server failed

Share relevant logs or error messages

LOGFILE: journalctl
– Journal begins at Fri 2024-09-20 11:45:19 CEST, ends at Fri 2024-09-20 14:18:22 CEST. –
Sep 20 13:26:27 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 20 13:26:27 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.
Sep 20 13:47:53 systemd[1]: Starting Fail2Ban Service…
Sep 20 13:47:53 systemd[1]: Started Fail2Ban Service.
Sep 20 13:47:53 fail2ban-server[99754]: 2024-09-20 13:47:53,875 fail2ban [99754]: ERROR Failed during configuration: Have not found any log file for streams__2 jail
Sep 20 13:47:53 fail2ban-server[99754]: 2024-09-20 13:47:53,878 fail2ban [99754]: ERROR Async configuration of server failed
Sep 20 13:47:53 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 20 13:47:53 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.
Sep 20 13:52:53 systemd[1]: Starting Fail2Ban Service…
Sep 20 13:52:53 systemd[1]: Started Fail2Ban Service.
Sep 20 13:52:54 fail2ban-server[100987]: 2024-09-20 13:52:54,058 fail2ban [100987]: ERROR Failed during configuration: Have not found any log file for streams__2 jail
Sep 20 13:52:54 fail2ban-server[100987]: 2024-09-20 13:52:54,060 fail2ban [100987]: ERROR Async configuration of server failed
Sep 20 13:52:54 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 20 13:52:54 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.
Sep 20 13:53:19 systemd[1]: Starting Fail2Ban Service…
Sep 20 13:53:19 systemd[1]: Started Fail2Ban Service.
Sep 20 13:53:19 fail2ban-server[101069]: 2024-09-20 13:53:19,968 fail2ban [101069]: ERROR Failed during configuration: Have not found any log file for streams__2 jail
Sep 20 13:53:19 fail2ban-server[101069]: 2024-09-20 13:53:19,969 fail2ban [101069]: ERROR Async configuration of server failed
Sep 20 13:53:19 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 20 13:53:19 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.
– Boot 888ddf38ebb44f29a0fe0fae53faa47e –
Sep 20 13:55:36 systemd[1]: Starting Fail2Ban Service…
Sep 20 13:55:36 systemd[1]: Started Fail2Ban Service.
Sep 20 13:55:36 fail2ban-server[729]: 2024-09-20 13:55:36,740 fail2ban [729]: ERROR Failed during configuration: Have not found any log file for streams__2 jail
Sep 20 13:55:36 fail2ban-server[729]: 202LOGFILE: journalctl
– Journal begins at Fri 2024-09-20 11:45:19 CEST, ends at Fri 2024-09-20 14:18:22 CEST. –
Sep 20 13:26:27 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 20 13:26:27 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.
Sep 20 13:47:53 systemd[1]: Starting Fail2Ban Service…
Sep 20 13:47:53 systemd[1]: Started Fail2Ban Service.
Sep 20 13:47:53 fail2ban-server[99754]: 2024-09-20 13:47:53,875 fail2ban [99754]: ERROR Failed during configuration: Have not found any log file for streams__2 jail
Sep 20 13:47:53 fail2ban-server[99754]: 2024-09-20 13:47:53,878 fail2ban [99754]: ERROR Async configuration of server failed
Sep 20 13:47:53 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 20 13:47:53 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.
Sep 20 13:52:53 systemd[1]: Starting Fail2Ban Service…
Sep 20 13:52:53 systemd[1]: Started Fail2Ban Service.
Sep 20 13:52:54 fail2ban-server[100987]: 2024-09-20 13:52:54,058 fail2ban [100987]: ERROR Failed during configuration: Have not found any log file for streams__2 jail
Sep 20 13:52:54 fail2ban-server[100987]: 2024-09-20 13:52:54,060 fail2ban [100987]: ERROR Async configuration of server failed
Sep 20 13:52:54 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 20 13:52:54 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.
Sep 20 13:53:19 systemd[1]: Starting Fail2Ban Service…
Sep 20 13:53:19 systemd[1]: Started Fail2Ban Service.
Sep 20 13:53:19 fail2ban-server[101069]: 2024-09-20 13:53:19,968 fail2ban [101069]: ERROR Failed during configuration: Have not found any log file for streams__2 jail
Sep 20 13:53:19 fail2ban-server[101069]: 2024-09-20 13:53:19,969 fail2ban [101069]: ERROR Async configuration of server failed
Sep 20 13:53:19 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 20 13:53:19 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.
– Boot 888ddf38ebb44f29a0fe0fae53faa47e –
Sep 20 13:55:36 systemd[1]: Starting Fail2Ban Service…
Sep 20 13:55:36 systemd[1]: Started Fail2Ban Service.
Sep 20 13:55:36 fail2ban-server[729]: 2024-09-20 13:55:36,740 fail2ban [729]: ERROR Failed during configuration: Have not found any log file for streams__2 jail
Sep 20 13:55:36 fail2ban-server[729]: 2024-09-20 13:55:36,742 fail2ban [729]: ERROR Async configuration of server failed
Sep 20 13:55:36 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 20 13:55:36 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.
Sep 20 13:55:37 systemd[1]: Starting Fail2Ban Service…
Sep 20 13:55:37 systemd[1]: Started Fail2Ban Service.
Sep 20 13:55:37 fail2ban-server[1528]: 2024-09-20 13:55:37,128 fail2ban [1528]: ERROR Failed during configuration: Have not found any log file for streams__2 jail
Sep 20 13:55:37 fail2ban-server[1528]: 2024-09-20 13:55:37,129 fail2ban [1528]: ERROR Async configuration of server failed
Sep 20 13:55:37 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 20 13:55:37 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.
Sep 20 14:01:09 systemd[1]: Starting Fail2Ban Service…
Sep 20 14:01:09 systemd[1]: Started Fail2Ban Service.
Sep 20 14:01:09 fail2ban-server[2044]: 2024-09-20 14:01:09,704 fail2ban [2044]: ERROR Failed during configuration: Have not found any log file for streams__2 jail
Sep 20 14:01:09 fail2ban-server[2044]: 2024-09-20 14:01:09,707 fail2ban [2044]: ERROR Async configuration of server failed
Sep 20 14:01:09 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 20 14:01:09 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.
Sep 20 14:17:47 systemd[1]: Starting Fail2Ban Service…
Sep 20 14:17:47 systemd[1]: Started Fail2Ban Service.
Sep 20 14:17:47 fail2ban-server[2607]: 2024-09-20 14:17:47,197 fail2ban [2607]: ERROR Failed during configuration: Have not found any log file for streams__2 jail
Sep 20 14:17:47 fail2ban-server[2607]: 2024-09-20 14:17:47,197 fail2ban [2607]: ERROR Async configuration of server failed
Sep 20 14:17:47 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 20 14:17:47 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.
Sep 20 14:18:21 systemd[1]: Starting Fail2Ban Service…
Sep 20 14:18:21 systemd[1]: Started Fail2Ban Service.
Sep 20 14:18:22 fail2ban-server[2689]: 2024-09-20 14:18:22,041 fail2ban [2689]: ERROR Failed during configuration: Have not found any log file for streams__2 jail
Sep 20 14:18:22 fail2ban-server[2689]: 2024-09-20 14:18:22,042 fail2ban [2689]: ERROR Async configuration of server failed
Sep 20 14:18:22 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 20 14:18:22 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.
4-09-20 13:55:36,742 fail2ban [729]: ERROR Async configuration of server failed
Sep 20 13:55:36 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 20 13:55:36 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.
Sep 20 13:55:37 systemd[1]: Starting Fail2Ban Service…
Sep 20 13:55:37 systemd[1]: Started Fail2Ban Service.
Sep 20 13:55:37 fail2ban-server[1528]: 2024-09-20 13:55:37,128 fail2ban [1528]: ERROR Failed during configuration: Have not found any log file for streams__2 jail
Sep 20 13:55:37 fail2ban-server[1528]: 2024-09-20 13:55:37,129 fail2ban [1528]: ERROR Async configuration of server failed
Sep 20 13:55:37 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 20 13:55:37 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.
Sep 20 14:01:09 systemd[1]: Starting Fail2Ban Service…
Sep 20 14:01:09 systemd[1]: Started Fail2Ban Service.
Sep 20 14:01:09 fail2ban-server[2044]: 2024-09-20 14:01:09,704 fail2ban [2044]: ERROR Failed during configuration: Have not found any log file for streams__2 jail
Sep 20 14:01:09 fail2ban-server[2044]: 2024-09-20 14:01:09,707 fail2ban [2044]: ERROR Async configuration of server failed
Sep 20 14:01:09 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 20 14:01:09 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.
Sep 20 14:17:47 systemd[1]: Starting Fail2Ban Service…
Sep 20 14:17:47 systemd[1]: Started Fail2Ban Service.
Sep 20 14:17:47 fail2ban-server[2607]: 2024-09-20 14:17:47,197 fail2ban [2607]: ERROR Failed during configuration: Have not found any log file for streams__2 jail
Sep 20 14:17:47 fail2ban-server[2607]: 2024-09-20 14:17:47,197 fail2ban [2607]: ERROR Async configuration of server failed
Sep 20 14:17:47 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 20 14:17:47 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.
Sep 20 14:18:21 systemd[1]: Starting Fail2Ban Service…
Sep 20 14:18:21 systemd[1]: Started Fail2Ban Service.
Sep 20 14:18:22 fail2ban-server[2689]: 2024-09-20 14:18:22,041 fail2ban [2689]: ERROR Failed during configuration: Have not found any log file for streams__2 jail
Sep 20 14:18:22 fail2ban-server[2689]: 2024-09-20 14:18:22,042 fail2ban [2689]: ERROR Async configuration of server failed
Sep 20 14:18:22 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
Sep 20 14:18:22 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.

What does sudo ls -l /var/log/streams__2 return ?

Also can you elaborate if you did anything specific before this started happening ? Did you just install streams__2 ? Or did you upgrade it ? Or anything else ?

Hi, thanks for answering.

The command returns: "ls: cannot access ‘/var/log/streams__2’: No such file or directory

I restored the streams that I had backed-up from the raspberry pi setup on the new hardware. No new upgrades or anything. I should add that I am able to connect to streams__2, so the app itself works. (it is __2 because I had first tested streams on another domain)

I just checked, and although I can access the app and it is online, it is not listed with the services in the admin webportal?

Hmpf yeah sounds like the restore script of the app is inconsistent …

Anyway you can recreate the log dir with sudo mkdir /var/log/streams__2 and chown streams__2 /var/log/streams__2, but it’s puzzling that the app did work without the log dir existing …

Hi, the commands came through, but fail2ban still doesn’t want to start (same error messages)? Any other ideas?

zblerf yeah it probably also wants the log file to exist so let’s run

sudo touch /var/log/streams__2/php.log
sudo chown streams__2 /var/log/streams__2/php.log

Hi, I tested it, and even fresh installs of streams don’t seem to be listed in “services” although with fresh installs that issue is ignored by fail2ban for some reason. I gave up, but thanks for your help!!