find_free_dqentry(): Data block full but it shouldn’t.

March 9, 2010    |   Posted by admin   |    Category: Linux Administration

Error:

VFS: Error -5 occurred while creating quota.
VFS: find_free_dqentry(): Data block full but it shouldn't.

Explanation:

When the quota files i.e. aquota.user and aquota.group gets corrupt, you will notice the server logs with a message “VFS: Error -5 occurred while creating quota. find_free_dqentry(): Data block full but it shouldn’t”. 

The ‘fixquotas’ script is use to update the quota files but the script cannot read these files either thus increases the CPU usage while quota update is in process. The solution is to remove and create the aquota.user and aquota.group files and run the quotacheck again.

Solution:

First, turn off the quota:

# quotaoff -av

Move the aquota files i.e. /aquota.user and /aquota.group to a temporary directory.

# mkdir /root/tmp_aquota
# mv /aquota.* /root/tmp_aquota/

Now, create the aquota.user and aquota.group files again

# touch /aquota.user
# touch /aquota.group

Now, execute ‘quotacheck’ to build a table of current disk usage.

# /scripts/quotacheck   (cPanel server)
OR
# quotacheck -augm

While quotacheck in process, you may see a message as “quotacheck : Warning quota files aquota.group was probably truncated. Can’t save quota settings” which is normal under these circumstances.

Once the quotacheck process completes, turn on the quotas

# quotaon -av

Quota update will work fine again.

Comments Off on find_free_dqentry(): Data block full but it shouldn’t.

PleskFatalException Unable to connect to database

March 2, 2010    |   Posted by admin   |    Category: Plesk Management

On accessing the Plesk control panel you may receive the “PleskFatalException Unable to connect to database: Too many connections” error message and this is caused when the mysql connections on the server are exceeded than the specified value.

ERROR: PleskFatalException Unable to connect to database:
mysql_connect() : Too many connections 0:
/usr/local/psa/admin/plib/common_func.php3:190 psaerror (string
'Unable to connect to database: mysql_connect() Too many connections')

The temporary solution is to restart the Mysql service, and the permanent solution is to increase the max_connections value in the mysql configuration.

SSH to your server and restart the mysql service

# /etc/init.d/mysqld restart

If the problem is occurring quite frequently, you should increase the max_connections value in the my.cnf file. To check the existing max_connections value

# mysqladmin variables -uadmin -p`cat /etc/psa/.psa.shadow` \
 | grep max_connections

To increase the max_connections value, edit the /etc/my.cnf file

# vi /etc/my.cnf

and set the following parameter

max_connections = new_value

where, new_value should be the number higher than the existing mysql connections retrieved from the previous command.

Save the file and restart the Mysql service for the changes to take affect:

# /etc/init.d/mysqld restart
Comments Off on PleskFatalException Unable to connect to database

Fatal! Write Failure: /etc/valiases/domain.tld

February 28, 2010    |   Posted by admin   |    Category: cPanel Management

You may receive the “Fatal! Write failure /etc/valiases/domain.tld” error message while adding a email forwarder OR a catchall email address from Email Accounts section of cPanel. The error looks like follows:

Fatal! Write Failure: /etc/valiases/domainname.tld. Ignore any 
messages of success this can only result in failure!

The ‘Fatal! Write Failure’ issue occurs when the /etc/valiases/domainname.tld file is missing OR the file is having incorrect permissions. SSH to the server and create/correct the file permissions:

# cd /etc/valiases/
# touch domainname.tld
# chown username.mail domainname.tld
# chmod 644 domainname.tld

Once the valiases file is created for the domain with proper permissions, you will be able to add the email forwarder and catchall for the domain successfully.

Comments Off on Fatal! Write Failure: /etc/valiases/domain.tld

cPanel domain Bandwidth Limit Exceeded

February 26, 2010    |   Posted by admin   |    Category: cPanel Management

The message “Bandwidth Limit Exceeded” is received on accessing a website when it exceeds the allotted bandwidth for the domain.

Bandwidth Limit Exceeded
The server is temporarily unable to service your request due to the 
site owner reaching his/her bandwidth limit.  Please try again later. 
Apache/2.2.13 (Unix) mod_ssl/2.2.13 OpenSSL/0.9.7a PHP/5.2.9 
Server at www.domainame.tld Port 80

To bring the website back online or un-suspend the bandwidth exceed-er, use the option

WHM >> Account Functions >> Unsuspend Bandwidth Exceeders
 >> click "Proceed".

This will reset the bandwidth usage to zero for the account. To increase the bandwidth limit for the account, use the option

WHM >> Account Information >> "View Bandwidth Usage"
Comments Off on cPanel domain Bandwidth Limit Exceeded

Perl Script: Can’t do setuid (cannot exec sperl)

February 23, 2010    |   Posted by admin   |    Category: Linux Administration

Your perl script sometimes work from the command line but shows “Internal Server Error” on accessing the script via the browser. The Apache error logs shows the error message as

"Can't do setuid (cannot exec sperl)".

The the reason for the setuid error on the  perl script is the script have the setuid bit set and won’t work from the browser since they are running under the user apache. To make such perl scripts work, you need to install the perl-suidperl package.

To install the package, just execute the command

# yum install perl-suidperl
Comments Off on Perl Script: Can’t do setuid (cannot exec sperl)