Monthly Archives: August 2015

libMagickWand.so.2: cannot open shared object file

While working on one cPanel server we could see below error in error_log file for one client

libMagickWand.so.2: cannot open shared object file

The error log were filled by such errors

reinstalling imagemagick  using command  /scripts/installimagemagick  didnt work as error were still persisting .

So renamed the php,ini file

mv /usr/local/lib/php.ini /usr/local/lib/php.ini-old

Now to regenerate the new php.ini file I had to use command

/scripts/phpini

A new PHP.ini was create with default entries like a newly set server.

Modified the PHP.ini to customize it  as needed

Then had to finish it by rebuilding apache and php using easyapache

/scripts/easyapache

Now all sites work fine without any error 🙂

 

 

 

 

vzquota : (error) Quota on syscall for id 248: Device or resource busy

While working on Virtualizor I could come across an error where vps was not starting

I could get below error

[root@hostonline lock]# vzctl start 248
Starting container…
Warning: configuration file for distribution cpanel-Centos64 not found, using defaults from /etc/vz/dists/default
vzquota : (error) Quota on syscall for id 248: Device or resource busy
vzquota : (error) Possible reasons:
vzquota : (error) – Container’s root is already mounted
vzquota : (error) – there are opened files inside Container’s private area
vzquota : (error) – your current working directory is inside Container’s
vzquota : (error) private area
vzquota : (error) Currently used file(s):
/vz/private/248/var/spool/exim/input/T/1ZMogT-0000tf-4T-D
vzquota on failed [3]

The issue was due to some process locking the file in container which was not allowing vps to be started or rebooted

The solution to this issue is to find the process locking up the vm on node

The command is mentioned below which is lsof  ( list of open file )

[root@hostonlinevar]# lsof 2> /dev/null | egrep ‘/vz/root/248|/vz/private/248’

bash 95741 root cwd DIR 8,1 4096 42344315 /vz/private/248/var
lsof 125649 root cwd DIR 8,1 4096 42344315 /vz/private/248/var
egrep 125650 root cwd DIR 8,1 4096 42344315 /vz/private/248/var
lsof 125652 root cwd DIR 8,1 4096 42344315 /vz/private/248/var

Kill the respective processes mentioned above

And again check if there is any process still active locking vps

[root@hostonine ~]# lsof 2> /dev/null | egrep ‘/vz/root/248|/vz/private/248’

Now VM is starting  fine  after killing the process locking the vm

[root@hostonline ~]# vzctl restart 248
Restarting container
Starting container…
Warning: configuration file for distribution cpanel not found, using defaults from /etc/vz/dists/default
Container is mounted
Adding IP address(es): 193.114.189.47 193.114.189.48
Setting CPU limit: 10
Setting CPU units: 1000
Setting CPUs: 2
Setting devices
Container start in progress…
[root@hostonine ~]#

Maildelivery Report blank cPanel/WHM

Maildevery Report sometimes does not seem to work in WHM .

The issue is due to corruption in exims stats database and tables in it

Below is the fix for same

#Login to Mysql as root

root@host [/var/lib/mysql]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 646659
Server version: 5.5.42-cll MySQL Community Server (GPL)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

 

#Drop database eximstats

mysql> drop database eximstats;
Query OK, 4 rows affected (0.05 sec)

 

Create new database eximstats;

mysql> create database eximstats;
Query OK, 1 row affected (0.00 sec)

mysql> quit
Bye

Now restore eximstats tables using below command

root@host [/var/lib/mysql]# mysql eximstats < /usr/local/cpanel/etc/eximstats_db.sql

#Update stats using below command

root@host [~]# /usr/local/cpanel/bin/updateeximstats
updateeximstats: database schema is up to date.

Now delivery report in WHM should show results 🙂

 

 

 

Can’t create new tempfile Mysql

While working today came across new error in Mysql

[myfuncol_student.ow_base_config] error: Can't create new tempfile: './myfuncol_student/ow_base_config.TMD

Repairing the Mysql didn’t fix this issue

mysql> repair table ow_base_config;
+———————————+——–+———-+——————————————————————–+
| Table | Op | Msg_type | Msg_text |
+———————————+——–+———-+——————————————————————–+
| myfuncol_student.ow_base_config | repair | error | Can’t create new tempfile: ‘./myfuncol_student/ow_base_config.TMD’ |
| myfuncol_student.ow_base_config | repair | status | Operation failed |
+———————————+——–+———-+——————————————————————–+

I ran below command to fix this issue

 

root@hostonl [/var/lib/mysql]# myisamchk -r -f myfuncol_student/ow_base_config.MYI
– recovering (with sort) MyISAM-table ‘myfuncol_student/ow_base_config.MYI’
Data records: 228
– Fixing index 1
– Fixing index 2

Now database is working fine

mysql> repair table ow_base_config;
+———————————+——–+———-+———-+
| Table | Op | Msg_type | Msg_text |
+———————————+——–+———-+———-+
| myfuncol_student.ow_base_config | repair | status | OK |
+———————————+——–+———-+———-+
1 row in set (0.01 sec)

 

 

Blank PHPmyadmin page in cpanel

While working with one hosting client we came across an issue where PHPmyadmin was blank

On checking logs on /usr/local/cpanel/logs/error_log we could see below error

root@hosonline  [~]# tail -n 10 /usr/local/cpanel/logs/error_log
Cpanel::Server::write_buffer(Cpanel::Server=HASH(0x4abf5d8), “HTTP/1.1 401 Access Denied\x{d}\x{a}Set-Cookie: cprelogin=no; HttpOnl”…) called at /usr/local/cpanel/Cpanel/Server.pm line 1132
Cpanel::Server::write_content_to_socket(Cpanel::Server=HASH(0x4abf5d8), IO::Socket::SSL=GLOB(0x4a9c208), 0, “HTTP/1.1 401 Access Denied\x{d}\x{a}Set-Cookie: cprelogin=no; HttpOnl”…, SCALAR(0x20f8ae8)) called at /usr/local/cpanel/Cpanel/Server.pm line 626
Cpanel::Server::badpass(Cpanel::Server=HASH(0x4abf5d8), __CPANEL_HIDDEN__, 1) called at cpsrvd.pl line 2997
cpanel::cpsrvd::badpass(__CPANEL_HIDDEN__, 1) called at cpsrvd.pl line 5278
cpanel::cpsrvd::handle_auth() called at cpsrvd.pl line 1222
cpanel::cpsrvd::handle_one_connection() called at cpsrvd.pl line 1073
cpanel::cpsrvd::script() called at cpsrvd.pl line 437
PHP Fatal error: Class ‘AuthenticationCpanel’ not found in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/common.inc.php on line 876
PHP Fatal error: Class ‘AuthenticationCpanel’ not found in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/common.inc.php on line 876
PHP Fatal error: Class ‘AuthenticationCpanel’ not found in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/common.inc.php on line 876

The issue was diagnosed to missing libraries

We resolved the issue using below command by upgrading PHPmyadmin

/usr/local/cpanel/bin/updatephpmyadmin –force

Now PHPmyadmin works like Charm 🙂

 

configure: error: * uuid support not found (this typically means the uuid development ackage is missing)

While working on Asterisk on cpanel server I could come across below error while compiling Asterisk

configure: error: * uuid support not found (this typically means the uuid development ackage is missing)

The issue was due to missing module.

It was resolved by using below libraries

#yum install uuid-devel
#yum install libuuid-devel

Now compile in working fine for Asterisk

 

 

eth0: Timesync Tx Control register not set as expected

While working on Centos 6 install I had  a new guest today

Guest being but with error ” eth0: Timesync Tx Control register not set as expected”

Amazed to see this error for first time in centos 6 I google around finally to see its a bug and fix for it

I restarted networking using /etc/init.d/network restart and checked logs in

tail -n 100 /var/log/messages

e1000e: eth0 NIC Link is Down
e1000e 0000:03:00.0: eth0: Reset adapter
e1000e 0000:03:00.0: eth0: Reset adapter unexpectedly
e1000e 0000:03:00.0: eth0: Timesync Tx Control register not set as expected

 

A quick workaround is as follows:-

1. SSH into affected server

2. Add pcie_aspm=off kernel parameters to grub config, e.g.:-
# cd /boot/grub
# vim grub.conf
….
kernel /vmlinuz-2.6.32-431.5.1.el6.x86_64 ro root=/dev/mapper/vg_server-LogVol00 nomodeset rd_MD_UUID=c8cb6527:97bad21d:75373cd1:0dd9261b  KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_LVM_LV=vg_server21/LogVol00 rd_LVM_LV=vg_server21/LogVol01 rd_NO_LUKS rd_MD_UUID=ec1c1858:b6c1ad58:6562ea8b:0e8113e2 crashkernel=auto SYSFONT=latarcyrheb-sun16 rd_NO_DM rhgb quiet pcie_aspm=off

– (Add pcie_aspm=off at the end of the kernel parameters)

3. Save and reboot

Now network should work fine

Then this is indicative of the CentOS 6.x kernel Intel e1000e driver issue, as described here:-
http://bugs.centos.org/view.php?id=6810
http://bugs.centos.org/view.php?id=6814