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.

cPanel: Find accounts with highest CPU, Memory & MySQL Usage

You may have come across a time where there’s higher-than-usual resource usage, and you’re trying to pinpoint the cause. Sometimes that can be tricky, though, with the below command, you can quickly and easily build up a list of the top 5 users that are consuming your CPU, Memory and MySQL resources. This command does not make any changes to your server. The expected output of the command can also be seen below.

 

OUT=$(/usr/local/cpanel/bin/dcpumonview | grep -v Top | sed -e ‘s#<[^>]*># #g’ | while read i ; do NF=`echo $i | awk {‘print NF’}` ; if [[ “$NF” == “5” ]] ; then USER=`echo $i | awk {‘print $1’}`; OWNER=`grep -e “^OWNER=” /var/cpanel/users/$USER | cut -d= -f2` ; echo “$OWNER $i”; fi ; done) ; (echo “USER CPU” ; echo “$OUT” | sort -nrk4 | awk ‘{printf “%s %s%\n”,$2,$4}’ | head -5) | column -t ;echo;(echo -e “USER MEMORY” ; echo “$OUT” | sort -nrk5 | awk ‘{printf “%s %s%\n”,$2,$5}’ | head -5) | column -t ;echo;(echo -e “USER MYSQL” ; echo “$OUT” | sort -nrk6 | awk ‘{printf “%s %s%\n”,$2,$6}’ | head -5) | column -t ;

 

Output Will be

 

USER       CPU
user1        2.51%
user2        1.48%
user3        1.04%
user4        0.77%
user5        0.61%

USER       MEMORY
user1        5.67%
user2        0.38%
user3        0.38%
user4        0.13%
user5        0.12%

USER       MYSQL
user1        0.3%
user2        0.0%
user3        0.0%
user4        0.0%
user5        0.0%

cPanel MySQL/MariaBB error: adminbin Cpanel/cpmysql/DBCACHE: exit 11 [SOLVED]

Many cPanel users are experiencing the above error within the cPanel interface recently; The error appears within cPanel, giving the impression that MariaDB/ MySQL is not working. Infect the error is a false positive, MariaDB/MySQL is infect working perfectly fine.

 

 The MySQL server is currently offline.
 adminbin Cpanel/cpmysql/DBCACHE: exit 1

First Check Log in cPanel

/usr/local/cpanel/logs/error_log

You May Get Something Like That

cpanel::cpanel::cptt_exectag("/usr/local/cpanel/base/frontend/paper_lantern/sql/index.html.tt", 1) called at cpanel.pl line 4637
cpanel::cpanel::run_standard_mode() called at cpanel.pl line 929
cpanel::cpanel::script("cpanel::cpanel", "./frontend/paper_lantern/sql/index.html.tt") called at cpanel.pl line 325
[2021-10-26 05:47:41 +0000] info [] The cacheid for the user “thetechp” was reset because it was in the future: Tue Nov 9 08:12:02 2021
[2021-10-26 05:47:41 +0000] info [] The cacheid for the user “thetechp” was reset because it was in the future: Tue Nov 9 08:12:06 2021
[2021-10-26 05:47:41 +0000] info [] The cacheid for the user “agunmyid” was reset because it was in the future: Tue Nov 9 08:06:37 2021

To Fix This Issue

mysqldump MySQL > /root/mysql-backup.sql
Then Go to WHM Click Jetbackup & Restore Old Backup To That User which one is affected   & Get Fix 
/scripts/restartsrv_mysql
Have a Good Day 🙂 

Install cPanel In CentOS

Before Start, We Need to Know What is cPanel
cPanel is an online Linux-based graphical interface (GUI) used as a control panel to simplify website and server management. cPanel allows you to publish websites, manage domains, organize web files, create email accounts, and more.

Let’s Go for Install it in Centos VPS, my VPS run centos 7 ( 8 GB ram, 4 Core CPU)

First, We Need to Login VPS from putty Software, if You Linux User Then use the terminal

For Putty User:

For Linux User:

ssh root@192.168.1.1

After Login Your Just Give This Command

yum update -y

This Command will Update your OS Repo

Then Use cPanel Install Command

cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest

Now It will Start Install Auto, you don’t need to press anything

Finally, You have Installed cPanel in your Server Or VPS

Powerful Web Hosting with WordPress Optimized Solution Available.


Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore agna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco oris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate elit esse cillum dolore eu fugiat nulla pariatur excepteur sint ecat.

Continue reading “Powerful Web Hosting with WordPress Optimized Solution Available.”