• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Fail2ban not working on almalinux

zodi

New Pleskian
I just installed plesk on almalinux and fail2ban not started.
I reinstalled fail2ban via plesk, but it still doesn't work.

Is there any solution to this?
 
systemctl status fail2ban.service
Code:
 fail2ban.service - Fail2Ban Service
   Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/fail2ban.service.d
           └─50-ensure-log.conf
   Active: failed (Result: exit-code) since Sat 2021-07-31 20:46:07 EEST; 20min ago
     Docs: man:fail2ban(1)
  Process: 75103 ExecStart=/usr/bin/fail2ban-server -xf start (code=exited, status=255)
  Process: 75099 ExecStartPre=/bin/sh -c umask 077; touch /var/log/fail2ban.log; restorecon /var/log/fail2ban.log >/dev/null 2>
  Process: 75097 ExecStartPre=/bin/mkdir -p /run/fail2ban (code=exited, status=0/SUCCESS)
 Main PID: 75103 (code=exited, status=255)

Jul 31 20:46:07  systemd[1]: Starting Fail2Ban Service...
Jul 31 20:46:07  systemd[1]: Started Fail2Ban Service.
Jul 31 20:46:07  fail2ban-server[75103]: 2021-07-31 20:46:07,939 fail2ban        >
Jul 31 20:46:07  fail2ban-server[75103]: 2021-07-31 20:46:07,942 fail2ban        >
Jul 31 20:46:07  systemd[1]: fail2ban.service: Main process exited, code=exited, >
Jul 31 20:46:07  systemd[1]: fail2ban.service: Failed with result 'exit-code'.
 
Try to look into /var/log/fail2ban.log to see the details why it is failing to start.
 
systemctl start fail2ban.service
systemctl enable fail2ban.service

after

systemctl status fail2ban.service

status active: failed

fail2ban.service - Fail2Ban Service
Loaded: loaded (/usr/lib/systemd/system/fail2ban.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/fail2ban.service.d
└─50-ensure-log.conf
Active: failed (Result: exit-code) since Mon 2021-11-15 07:16:03 CET; 1min 31s ago
Docs: man:fail2ban(1)
Main PID: 3386 (code=exited, status=255)

nov 15 07:16:03 cloud.spaziohost.com systemd[1]: Starting Fail2Ban Service...
nov 15 07:16:03 cloud.spaziohost.com systemd[1]: Started Fail2Ban Service.
nov 15 07:16:03 cloud.spaziohost.com fail2ban-server[3386]: 2021-11-15 07:16:03,203 fail2ban [3386]: ERROR Failed during configuration: Have not found any lo>
nov 15 07:16:03 cloud.spaziohost.com fail2ban-server[3386]: 2021-11-15 07:16:03,204 fail2ban [3386]: ERROR Async configuration of server failed
nov 15 07:16:03 cloud.spaziohost.com systemd[1]: fail2ban.service: Main process exited, code=exited, status=255/n/a
nov 15 07:16:03 cloud.spaziohost.com systemd[1]: fail2ban.service: Failed with result 'exit-code'.
 
Code:
ERROR Failed during configuration: Have not found any lo>
Where is the continuation of this line of the log? It should be like:
Code:
ERROR Failed during configuration: Have not found any log file for plesk-horde jail
for example. In this case create the missing logfiles manually and assign required ownership for them:
Code:
# touch /var/log/maillog
# mkdir /var/log/psa-horde
# touch /var/log/psa-horde/psa-horde.log
# chown horde_sysuser:horde_sysgroup /var/log/psa-horde/psa-horde.log
 
If I remember correctly one other thing that you have to watch is that a minimal install of AlmaLinux and Plesk doesn't actually install rsyslog so your logs (/var/log/messages, /var/log/maillog, /var/log/secure) are always empty. You have to install it manually so that fail2ban can track things properly:

Code:
yum install rsyslog
systemctl enable rsyslog --now
 
If I remember correctly one other thing that you have to watch is that a minimal install of AlmaLinux and Plesk doesn't actually install rsyslog so your logs (/var/log/messages, /var/log/maillog, /var/log/secure) are always empty. You have to install it manually so that fail2ban can track things properly:

yum install rsyslog
systemctl enable rsyslog --now

dnf install rsyslog -y
systemctl abilita rsyslog --now

Thank you perfect it worked.

So when do you install Almalinux, what kind of installation do you need to do?
 
The minimal install that you did was correct. This is really a Plesk bug as it should be making sure that a proper logger is installed when you install Plesk.
 
This is really a Plesk bug as it should be making sure that a proper logger is installed when you install Plesk.
 
Back
Top