cPanel: cPHulk Service Failure

On a cPanel system with cPHulk, you may run into an error like so:

(XID e22d2d) The “cphulkd” service failed because it cannot find the “/var/run/cphulkd_db.sock” socket.

The subprocess “/usr/local/cpanel/scripts/restartsrv_cphulkd” reported error number 255 when it ended.

The system could not provide log messages for “cphulkd” because it failed to read all of the potential log files with the following errors: Error while attempting to open “/var/log/secure”: “No such file or directory”, Error while attempting to open “/var/log/maillog”: “No such file or directory”, Error while attempting to open “/var/log/messages”: “No such file or directory”

This typically indicates that the rsyslogd service is not installed and/or not running, which is responsible for maintaining files such as /var/log/secure, /var/log/messages, etc.

# /scripts/restartsrv_rsyslogd
(XID bx88f7) The “rsyslog” service is disabled.

To resolve this, simply install the rsyslog RPM:

# yum install rsyslog

You then need to start the service, and configure it to start on boot:

# systemctl start rsyslog
# systemctl enable rsyslog

You’re now all done! The missing log files should now exist, and cPHulk should no longer return an error message about missing files.

HOW TO INSTALL REDIS AND PHP REDIS ON A CPANEL CENTOS 7 SERVER

This guide will show you how to set up Redis and PHP Redis to dramatically increase the performance of your server.

Redis is an open-source solution that functions as a database of structured cached data that is saved in your server’s RAM. Instead than relying on disk delay, the cache will deliver significantly higher throughput because it is stored in memory.

The guide presupposed that you have a CentOS 7 server with cPanel installed. If you have a Managed Server the installation can be done by our support.

1) Login through SSH and run the following commands :

sudo yum install epel-release yum-utils
sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum-config-manager --enable rem
yum install redis

2) Once installed, you would need to start it:

sudo systemctl start redis
sudo systemctl enable redis
sudo systemctl status redis

The latest command should give you a confirmation of that Redis is running.

sudo systemctl status redis
● redis.service – Redis persistent key-value database
Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/redis.service.d
└─limit.conf
Active: active (running) since Fri 2021-09-17 12:41:53 EDT; 8s ago
Main PID: 17753 (redis-server)
CGroup: /system.slice/redis.service
└─17753 /usr/bin/redis-server 127.0.0.1:6379

It also returns the port being used (here 6379) which you may need for your application.

3) log in to WHM and search in the WHM sidebar for Module Installers. Click on it and then click on Manage PHP PECL.

4) At the next stage, select the PHP version you would like to install Redis For and inside the Module Search type Redis and click on Go

5) Finally, in the search result click on Install and after a few seconds, it should be completed.

That’s it, you have now enabled a Redis Cache on your server.

./