Category Archives: CentOS

fail2ban.actions – ERROR Failed to start jail ‘apache-fakegooglebot’ action ‘firewallcmd-ipset’: Error starting action

Got this sh*t on my error logs…

firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -p tcp -m multiport --dports http,https -m set --match-set fail2ban-apache-fakegooglebot src -j REJECT --reject-with icmp-port-unreachable -- killed with signal 124 (return code: 252)
2017-07-08 21:26:11,212 fail2ban.actions [3781]: ERROR Failed to start jail 'apache-fakegooglebot' action 'firewallcmd-ipset': Error starting action
2017-07-08 21:26:11,416 fail2ban.action [3781]: ERROR ipset create fail2ban-apache-modsecurity hash:ip timeout 6000
firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -p tcp -m multiport --dports http,https -m set --match-set fail2ban-apache-modsecurity src -j REJECT --reject-with icmp-port-unreachable -- stdout: ''

Solution? Let’s set banaction to iptables! 🙂

# Override /etc/fail2ban/jail.d/00-firewalld.conf:
banaction = iptables-multiport

!!

centos – Error Summary – Disk Requirements – more space needed on the /boot filesystem

 

Error Summary
-------------
Disk Requirements:
 At least 3MB more space needed on the /boot filesystem.

[[email protected] pjrfigueiredo]# df -H /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       199M  156M   29M  85% /boot
[[email protected] pjrfigueiredo]# rpm -qa | grep kernel
kernel-tools-libs-3.10.0-514.16.1.el7.x86_64
abrt-addon-kerneloops-2.1.11-45.el7.centos.x86_64
kernel-tools-3.10.0-514.16.1.el7.x86_64
kernel-3.10.0-514.10.2.el7.x86_64
kernel-3.10.0-514.16.1.el7.x86_64
[[email protected] pjrfigueiredo]# rpm -e kernel-3.10.0-514.10.2.el7.x86_64
[[email protected] pjrfigueiredo]# df -H /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       199M  111M   74M  61% /boot

or…

sudo yum remove `rpm -q kernel | grep -v 'uname -r'`

The name org.freedesktop.PolicyKit1 was not provided by any .service files

 

x[email protected]:~$ service mysql restart
Failed to restart mysql.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and ‘systemctl status mysql.service’ for details.

 

[email protected]:~$ systemctl start deluged
Failed to start deluged.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and ‘systemctl status deluged.service’ for details.

 

try do sudo!

CentOS – Enable the mod_proxy modules in the HTTPD

In our /etc/httpd/conf/httpd.conf lets see if we have the following lines on it.
Uncomment them or add them.

  1. LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
    LoadModule proxy_http_module modules/mod_proxy_http.so
    # Uncomment these to proxy FTP or HTTPS
    #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
    #LoadModule proxy_connect_module modules/mod_proxy_connect.so
    

 

PHP 5.6 on CentOS 7

This is how I managed to have PHP 5.6 on a fresh CentOS 7.

yum install epel-release
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum clean
yum update

Then…

yum install php56w php56w-opcache php56w-mcrypt php56w-pdo php56w-mysql php56w-mbstring php56w-gd php56w-dom

 

ImageMagick

yum install ImageMagick php56w-imagick

 

Restart httpd

service httpd restart