Apache: [emerg] (28)No space left on device: Couldn’t create accept lock

September 17, 2009    |   Posted by admin   |    Category: cPanel Management

semget: [emerg] (28) No space left on device OR Apache: No space left on device: Couldn’t create accept lock

You may receive “No space left on device” message while starting the Apache service, however, it has nothing to do with the disk space. The reason behind the error message is Semaphores.

You will have to kill the active semaphore processes in order to start Apache service successfully. To list the PIDs of the active semaphore processes, execute:

# ipcs -s
------ Semaphore Arrays --------
key        semid        owner      perms      nsems
0x00000000 366673220    apache    600        1
0x00000000 366706589    apache    600        1
0x00000000 366732358    apache    600        1
0x00000000 366734353    apache    600        1

It will list all the PIDs which need to be killed:

# ipcrm -s PID

If you have a long list of processes, execute the following commands:

# ipcs -s | grep apache | awk ' { print $2 } ' | xargs ipcrm sem

Replace ”apache’ in the above command with the actual “owner” of the processes returned in the “ipcs -s” command. Apache will start successfully once these processes are killed.

What is a Semaphore?
Semaphores are use to communicate between active processes. Apache write down some information of such processes before the communication actually begins and if Apache fails to write the information, it results in the “No space left on device: Couldn’t create accept lock” error message.

Comments Off on Apache: [emerg] (28)No space left on device: Couldn’t create accept lock

defer_router defer (-1): All deliveries are handled by MailScanner

September 15, 2009    |   Posted by admin   |    Category: cPanel Management

You suddenly realize that the emails on your server are not working and the mail logs shows the following messages:

1MnfEt-0007pQ-Tn == xyz@abc.com R=defer_router defer (-1): All deliveries are handled by MailScanner
1MnfBw-00037y-9h == abc@xyz.com R=defer_router defer (-1): All deliveries are handled by MailScanner

This mostly happens when Mailscanner is not working properly as all deliveries are handled by MailScanner. To fix the issue, restart your mail service first i.e.

service exim restart

then, start the Mailscanner executing the following command:

/usr/mailscanner/bin/check_mailscanner

If it displays any PIDs, kill them and execute the command again. This will start your MTA and MailScanner which will make sure your emails start working again.

Comments Off on defer_router defer (-1): All deliveries are handled by MailScanner

How to increase mail size in exim?

September 15, 2009    |   Posted by admin   |    Category: cPanel Management

You may receive a bounce back message saying “Message size exceeds maximum permitted” on sending an email greater than the size defined in the exim configuration. On a cPanel server, the message size limit is 50MB by default.

In order to raise the message size limit, you need to edit the exim configuration file either manually located at /etc/exim.conf OR from WHM >> Exim Configuration Editor > Advanced Mode and at the very start of the file, add the following line:

message_size_limit = 100

Save the file and restart the exim service.

# service exim restart

This will increase the message size to 100MB. You can verify the new size by executing the following command:

# exim -bP | grep message_size_limit

Comments Off on How to increase mail size in exim?

phpMyAdmin: Cannot start session without errors.

September 11, 2009    |   Posted by admin   |    Category: cPanel Management

“phpMyAdmin: Cannot start session without errors” is a common error while accessing phpmyadmin on a cPanel server. The problem relates to either of the following listed issues OR both

a) session.save_path parameter is not set properly in the phpMyAdmin configuration.
b) Ownership of the ‘phpmyadmin’ directory is incorrect.

1) To set “session.save_path”,  edit the phpMyAdmin configuration file

# pico /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php

Search for the parameter and set the value to /tmp

session.save_path =  /tmp

2) To correct the ownership of the directory, goto /var/cpanel/userhomes directory and execute

# chown cpanelphpmyadmin.cpanelphpmyadmin cpanelphpmyadmin -R

Once the issues are corrected, open phpMyAdmin in a different window ( to eliminate cache problem) and it should work fine.

Comments Off on phpMyAdmin: Cannot start session without errors.