Fail2ban Failed to access socket path: /var/run/fail2ban/fail2ban.sock. Is fail2ban running?

Alors attention, a prendre avec des pincettes car je ne suis pas un expert alors vaut mieux attendre ceux qui le sont…

Le probleme est que certains journaux peuvent ne pas exister ce qui plante le démarrage de fail2ban. Et la solution apportée dans certains forum et de mettre backend=systemd.

En l’occurence je n’ai pas http.error meme apres un redémarrage

sudo ls /var/www/html/log
alexaapi_node   gshd                  openvpn_DNS_Jeedom  ttscast_daemon
broadlink       jMQTTd                plugin              tvremote_daemon
camera_record   listener_execution    rfxcom              worxLandroidS_daemon
cron_execution  mqtt2d                scenario_execution  z2md
espeasy_node    MQTTDiscovery_daemon  scenarioLog         zwavejsd
fullyKiosK      mymodbus              tgw_1514

nano /etc/fail2ban/jail.d/jeedom.conf

[apache-botsearch]
backend = systemd
enabled  = true
port     = http,https
filter   = apache-botsearch
logpath   = /var/www/html/log/http*.error
maxretry = 6

[apache-overflows]
backend = systemd
enabled  = true
port     = http,https
filter   = apache-overflows
logpath   = /var/www/html/log/http*.error
maxretry = 2

[apache-noscript]
backend = systemd
enabled  = true
port     = http,https
filter   = apache-noscript
logpath   = /var/www/html/log/http*.error
maxretry = 1

sudo systemctl restart fail2ban
sudo systemctl status fail2ban

● fail2ban.service - Fail2Ban Service
     Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
    Drop-In: /usr/lib/systemd/system/fail2ban.service.d
             └─override.conf
     Active: active (running) since Tue 2024-05-07 18:54:02 CEST; 3s ago
       Docs: man:fail2ban(1)
    Process: 67385 ExecStartPre=/bin/mkdir -p /run/fail2ban (code=exited, status=0/SUCCESS)
   Main PID: 67387 (fail2ban-server)
      Tasks: 11 (limit: 14131)
     Memory: 31.1M
        CPU: 882ms
     CGroup: /system.slice/fail2ban.service
             └─67387 /usr/bin/python3 /usr/bin/fail2ban-server -xf start

mai 07 18:54:02 Jeedom systemd[1]: Starting Fail2Ban Service...
mai 07 18:54:02 Jeedom systemd[1]: Started Fail2Ban Service.
mai 07 18:54:03 Jeedom fail2ban-server[67387]: Server ready

fail2ban-client status

Status
|- Number of jail:      4
`- Jail list:   apache-botsearch, apache-noscript, apache-overflows, sshd

Et on a bien tous les services
et on reboot pour vérifier…

Je le répète, je fais peut être de la merde, mais c’est toute ma vie ca :smile:
Et au pire faut bien apprendre !