SOLVED – No such file or directory at /usr/local/cpanel/Cpanel/

June 6, 2017

Internal Server Error No such file or directory at /usr/local/cpanel/Cpanel/ line 268.

This short article will show you how to resolve the problem of failed to open session lockfile: FILE=/var/cpanel/sessions/raw/:. You will normally see this error  message when you try to login into your WHM, and the error message will look similar to this  one here.

Internal Server Error 500

failed to open session lockfile: FILE=/var/cpanel/sessions/raw/:6JshdawOgyEXNsSUCD_uo3hdmjreq_Pl1CIlg4sbuYlItTYRTqsivT24h65kikM2.lock, No such file or directory at /usr/local/cpanel/Cpanel/ line 261.

How to resolve
Step 1

df -i  : to check the usage of inode space and if it is showing 100% used  like this

root@server [~]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/vg_server-lv_root 15073280 15073280 0 100% /
tmpfs 4096118 1 4096117 1% /dev/shm
/dev/sdb1 128016 53 127963 1% /boot
/dev/sda1 61054976 2526190 58528786 5% /home
/usr/tmpDSK 262144 45283 216861 18% /tmp

Step 2

then run the following commands

cd /var/spool;rm -rf exim

to delete the exim file and that should resolve the problem .  You can then re-run the command df -i again to see if there are still spaces there.

Step 3

Capture 2015-07-28 08.16.04if you have nginx  plugin installed on your WHM  you may want to clean up the cachefiles from the Engintron for WHM plugin admin panel . Head to Engintron for WHM  Admin panel and click on  “Force cleanup Nginx cache & temp files, restart Nginx” to clean up all the cache files in /var/cache/nginx/client_temp

Follow these steps and i am sure you server will be back online in no time.