• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

fail2ban problems with latest update plesk 12.5.30 Update #8

Giorgos Kontopoulos

Basic Pleskian
yesterday plesk updated automatically with no problems to
plesk 12.5.30 Update #8, last updated at Oct 28, 2015 04:04 AM

A few hours ago all of a sudden websites reported 502 nginx error
and trying to go to the plesk panel ip:8443 gave me this error

Code:
ERROR: Zend_Db_Statement_Exception: SQLSTATE[HY000]: General error: 1 Can't create/write to file '/tmp/#sql_48e_0.MYI' (Errcode: 122) (Pdo.php:234)
Search for related Knowledge Base articles

after some searching and login in with ssh I realized looking at "top"
that fail2ban-server was consuming all CPU

was trying to stop the fail2ban with many different ways led to NOTHING
Code:
/usr/local/psa/bin/ip_ban --disable
SQLSTATE[HY000]: General error: 1 Can't create/write to file '/tmp/#sql_3e1_0.MYI' (Errcode: 122)

/etc/init.d/fail2ban stop
Stopping fail2ban: ERROR  NOK: ('unable to open database file',)
                                                           [FAILED]
service -p fail2ban
-p: unrecognized service

service --stop fail2ban
--stop: unrecognized service

restarting the server would let me access the websites and plesk for just a less than a minute and then it was all over again

at brief moments of connection in plesk home I could see that "total usage CPU" was reported as 1000000% from maximum (not exact number but a ridiculously high number) by "server health" standard plesk component

when running service --status-all
Code:
courierlogger (pid  526) is running...
courierlogger (pid  530) is running...
courierlogger (pid  626) is running...
courierlogger (pid  607) is running...
courierlogger (pid  637) is running...
crond is stopped
Dr.Web drwebd is running
fail2ban-server (pid  801) is running...
Status
|- Number of jail:    9
`- Jail list:    plesk-apache, plesk-apache-badbot, plesk-courierimap, plesk-horde, plesk-panel, plesk-postfix, plesk-proftpd, plesk-roundcube, ssh
htcacheclean is stopped
httpd (pid  876) is running...
Table: nat
Chain PREROUTING (policy ACCEPT)
num  target     prot opt source               destination    

Chain POSTROUTING (policy ACCEPT)
num  target     prot opt source               destination    

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination    

Table: filter
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination    
1    f2b-plesk-proftpd  tcp  --  0.0.0.0/0            0.0.0.0/0           multiport dports 21,20,990,989
2    f2b-plesk-horde  tcp  --  0.0.0.0/0            0.0.0.0/0           multiport dports 80,443,7080,7081
3    f2b-plesk-login  tcp  --  0.0.0.0/0            0.0.0.0/0           multiport dports 8880,8443
4    f2b-plesk-postfix  tcp  --  0.0.0.0/0            0.0.0.0/0           multiport dports 25,465,587
5    f2b-SSH    tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:22
6    f2b-apache  tcp  --  0.0.0.0/0            0.0.0.0/0           multiport dports 80,443,7080,7081
7    f2b-plesk-courierimap  tcp  --  0.0.0.0/0            0.0.0.0/0           multiport dports 143,220,993,110,995
8    f2b-plesk-roundcube  tcp  --  0.0.0.0/0            0.0.0.0/0           multiport dports 80,443,7080,7081
9    f2b-BadBots  tcp  --  0.0.0.0/0            0.0.0.0/0           multiport dports 80,443,7080,7081

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination    

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination    

Chain f2b-BadBots (1 references)
num  target     prot opt source               destination    
1    RETURN     all  --  0.0.0.0/0            0.0.0.0/0      

Chain f2b-SSH (1 references)
num  target     prot opt source               destination    
1    RETURN     all  --  0.0.0.0/0            0.0.0.0/0      

Chain f2b-apache (1 references)
num  target     prot opt source               destination    
1    RETURN     all  --  0.0.0.0/0            0.0.0.0/0      

Chain f2b-plesk-courierimap (1 references)
num  target     prot opt source               destination    
1    RETURN     all  --  0.0.0.0/0            0.0.0.0/0      

Chain f2b-plesk-horde (1 references)
num  target     prot opt source               destination    
1    RETURN     all  --  0.0.0.0/0            0.0.0.0/0      

Chain f2b-plesk-login (1 references)
num  target     prot opt source               destination    
1    RETURN     all  --  0.0.0.0/0            0.0.0.0/0      

Chain f2b-plesk-postfix (1 references)
num  target     prot opt source               destination    
1    RETURN     all  --  0.0.0.0/0            0.0.0.0/0      

Chain f2b-plesk-proftpd (1 references)
num  target     prot opt source               destination    
1    RETURN     all  --  0.0.0.0/0            0.0.0.0/0      

Chain f2b-plesk-roundcube (1 references)
num  target     prot opt source               destination    
1    RETURN     all  --  0.0.0.0/0            0.0.0.0/0      

Table: mangle
Chain PREROUTING (policy ACCEPT)
num  target     prot opt source               destination    

Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination    

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination    

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination    

Chain POSTROUTING (policy ACCEPT)
num  target     prot opt source               destination    

mailman is stopped
messagebus (pid  1266) is running...
mysqld (pid  993) is running...
version: 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6_6.2 (none)
CPUs found: 2
worker threads: 2
number of zones: 51
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running
named (pid  793) is running...
netconsole module not loaded
Configured devices:
lo venet0
Currently active devices:
lo venet0
nginx (pid  1322) is running...
nmbd is stopped
nscd is stopped
ntpd is stopped
psa-pc-remote (pid  453) is running...
php-fpm is stopped
php-fpm is stopped
php-fpm is stopped
portreserve is stopped
master (pid 1118) is running...
                                                                      is running
psa-health-monitor-notificationd is stopped
Process accounting is disabled.
quota_nld is stopped
rdisc is stopped
rpcbind is stopped
rsyslogd (pid  1152) is running...
saslauthd (pid  1290) is running...
smbd is stopped
snmpd is stopped
snmptrapd is stopped
spamd (pid  907) is running...
openssh-daemon (pid  1283) is running...
sw-collectd is stopped
sw-cp-serverd (pid  378) is running...
sw-engine-fpm (pid  848) is running...
/etc/init.d/vzreboot: line 11: /reboot: Disk quota exceeded
xinetd (pid  347) is running...

noticed at the end "Disk quota exceeded"

but "df -h" did not report exceeding disk space
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/vzfs             150G   26G  125G  17% /
none                  2.0G  4.0K  2.0G   1% /dev
/dev/vzfs             150G   26G  125G  17% /var/named/chroot/etc/named
/dev/vzfs             150G   26G  125G  17% /var/named/chroot/var/named
/dev/vzfs             150G   26G  125G  17% /var/named/chroot/etc/named.rfc1912.zones
/dev/vzfs             150G   26G  125G  17% /var/named/chroot/usr/lib64/bind
/dev/vzfs             150G   26G  125G  17% /var/named/chroot/etc/named.iscdlv.key
/dev/vzfs             150G   26G  125G  17% /var/named/chroot/etc/named.root.key

I had to clean "rm -rf /tmp/*"

and restart the server from my providers control panel

and then I was able to stop the fail2ban server

Code:
/usr/local/psa/bin/ip_ban --disable
SUCCESS: inactive
[root@qs ~]# SQLSTATE[HY000]: General error: 1 Can't create/write to file '/tmp/#sql_3e1_0.MYI' (Errcode: 122)

after that everything became back to normal
I decided to keep fail2ban disabled untill ... I know what is going on

centos version 6.3
fail2ban version 0.9.2-centos6.15093018

related issues that did not seem to have something specific to my problem
http://talk.plesk.com/threads/fail2ban-extension-hangs.335345
http://talk.plesk.com/threads/plesk-12-0-18-update-68-and-fail2ban-0-9-3-problem.335183/
http://talk.plesk.com/threads/fail2ban-problems-in-plesk-12-0-18-update-68.335009/#post-789192

do you recommend I update to centos 6.7 ?
will it make any difference ?
is it safe ?
will it break my plesk and websites ?

thanks for all suggestions
 
Last edited:
Back
Top