This article will show you how to resolve the problem of failed to open session lockfile: /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
The system failed to open the session file “/var/cpanel/sessions/raw/:I42_GcGzaAMV9J88” because of an error: No such file or directory at /usr/local/cpanel/Cpanel/Session.pm line 268
How to resolve

Step 1

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

[email protected] [~]# df -ih
Filesystem           Inodes IUsed IFree IUse% Mounted on
/dev/mapper/VolGroup-lv_root 3.2M  3.2M   84K   100% /
tmpfs                  2.0M     1  2.0M    1% /dev/shm
/dev/sda1              126K    62  125K    1% /boot
/dev/mapper/VolGroup-lv_home 28M  2.0M   26M    8% /home
/usr/tmpDSK            132K   29K  103K   22% /tmp

Step 2

Then run the following command

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 -ih again to see the free space available.