Fail2ban does not start

What type of hardware are you using: VPS bought online
What YunoHost version are you running: 12.0.12
How are you able to access your server: The webadmin
SSH

Describe your issue

fail2ban does not start
What can i try

thanks for help

Share relevant logs or error messages

yunohost service log fail2ban

journalctl:

  • Mar 31 12:47:45 systemd[1]: Started fail2ban.service - Fail2Ban Service.
  • Mar 31 12:47:45 fail2ban-server[624]: 2025-03-31 12:47:45,790 fail2ban.configreader [624]: WARNING ‘allowipv6’ not defined in ‘Definition’. Using default one: ‘auto’
  • Mar 31 12:47:45 fail2ban-server[624]: 2025-03-31 12:47:45,897 fail2ban [624]: ERROR Failed during configuration: Have not found any log file for streams jail
  • Mar 31 12:47:45 fail2ban-server[624]: 2025-03-31 12:47:45,905 fail2ban [624]: ERROR Async configuration of server failed
  • Mar 31 12:47:45 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
  • Mar 31 12:47:45 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.
  • Mar 31 12:47:46 systemd[1]: Started fail2ban.service - Fail2Ban Service.
  • Mar 31 12:47:46 fail2ban-server[1015]: 2025-03-31 12:47:46,453 fail2ban.configreader [1015]: WARNING ‘allowipv6’ not defined in ‘Definition’. Using default one: ‘auto’
  • Mar 31 12:47:46 fail2ban-server[1015]: 2025-03-31 12:47:46,481 fail2ban [1015]: ERROR Failed during configuration: Have not found any log file for streams jail
  • Mar 31 12:47:46 fail2ban-server[1015]: 2025-03-31 12:47:46,489 fail2ban [1015]: ERROR Async configuration of server failed
  • Mar 31 12:47:46 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
  • Mar 31 12:47:46 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.
  • Mar 31 13:50:49 systemd[1]: Started fail2ban.service - Fail2Ban Service.
  • Mar 31 13:50:49 fail2ban-server[12859]: 2025-03-31 13:50:49,344 fail2ban.configreader [12859]: WARNING ‘allowipv6’ not defined in ‘Definition’. Using default one: ‘auto’
  • Mar 31 13:50:49 fail2ban-server[12859]: 2025-03-31 13:50:49,381 fail2ban [12859]: ERROR Failed during configuration: Have not found any log file for streams jail
  • Mar 31 13:50:49 fail2ban-server[12859]: 2025-03-31 13:50:49,390 fail2ban [12859]: ERROR Async configuration of server failed
  • Mar 31 13:50:49 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
  • Mar 31 13:50:49 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.
  • Mar 31 13:51:14 systemd[1]: Started fail2ban.service - Fail2Ban Service.
  • Mar 31 13:51:14 fail2ban-server[12949]: 2025-03-31 13:51:14,511 fail2ban.configreader [12949]: WARNING ‘allowipv6’ not defined in ‘Definition’. Using default one: ‘auto’
  • Mar 31 13:51:14 fail2ban-server[12949]: 2025-03-31 13:51:14,535 fail2ban [12949]: ERROR Failed during configuration: Have not found any log file for streams jail
  • Mar 31 13:51:14 fail2ban-server[12949]: 2025-03-31 13:51:14,540 fail2ban [12949]: ERROR Async configuration of server failed
  • Mar 31 13:51:14 systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/EXCEPTION
  • Mar 31 13:51:14 systemd[1]: fail2ban.service: Failed with result ‘exit-code’.

Hi rockylll,

What a bummer, all those (and previous) errors!

Could anything have happened with ownership/permissions of /var?

fail2ban reads log files (/var/log/*) to do what it does. “not found any log file” can mean that there is no file, or that fail2ban does not have access. To see which logs fail2ban tries to read, look in /etc/fail2ban/paths-*.conf)

Seeing the error in your unable-to-restore-backup thread ( 2025-03-29 22:01:39,504: WARNING - ERROR 1045 (28000): Access denied for user 'hubzilla'@'localhost' (using password: YES), it seems permissions is the first thing to look into.

Other things I would (generally) check:

  • disk full? (df -h)
  • filesystem corrupt? (fsck.ext4, or whichever filesystem is active at /var)
  • mount points unavailable? (compare /etc/fstab with actually mounted filesystems)

but you may have done already done that earlier.

Good luck!

1 Like

@wbk Thanks

how ?

all the folder have 755 set as permissions root as owner and

… group?

That seems OK, mostly. I think you could try taking away the paths-files in the fail2ban-configuration. That way, fail2ban would start without doing any scanning of logs, but it won’t complain about no access to logs either.

After that you can re-introduce the log files to be scanned, and find out which one(s) cause(s) trouble.

1 Like

so i disabled

/etc/fail2ban/paths-debian.conf

and did

yunohost service restart fail2ban

and fail2ban was running :slight_smile:

then i enabled

/etc/fail2ban/paths-debian.conf

again and did

yunohost service restart fail2ban

and even after

reboot

fail2ban keeps running

So did we fix the problem ?

It seems so, great!

While mysterious, it may be that while running your server for a while, the missing log was created by a running process.

So… Upgraded to Debian/Yunohost 12 and all problems solved now?

1 Like

Ok - than i will mark this thread as solved :slight_smile:

no - all my other problems mentioned in the other threads stay… the re installation of the backup does not work popper

@wbk need your help

i tried few things today and doing so i crashed my Hubzilla sites

instead of
yunohost service restard fail2ban

i did

yunohost service reload fail2ban

an now the sites do not work anymore

what does fail2ban ?

do you have any idea what i could try?

thanks for your help

uninstall fail2ban from yunohost
and install from source from apt install -y fail2ban much better

Thanks

form some strange reason i had to reinstall some PHP modules and now the sites work again… no idea why the PHP modules were lost

use tools from yunohost to regen apps by SH not by source direcly manualy

installed apps by my_webapp also…

does YNH uninstalls php modules just like that? even curl was missing - no idea why

normaly not but you can reinstall/regen to fix

i think the problem here was that php modules were uninstalled by uninstalling a regular YNH app so that the app on my_webapp did not work anymore because this app would still needed this modules.

all this seams has nothing to do with fail2ban