Centos 7 - Can't find PID file - /var/run /run

clubhost

Verified User
Joined
Oct 28, 2004
Messages
46
Location
Sydney, Australia
I did a fresh install of Direct Admin on a VPS with Centos 7. yum updated etc.

Connected via ssh OK, but when using Direct Admin 70% of the time the browser would give me "cannot connect" errors. Yet my ssh session would still be connected without any dropouts.

This was driving me crazy, how do you google search a webpage being up and down, but ssh remained OK. I also found multiple services named, ftp, etc were up and down as well

I found error messages in the error logs pointing to issues with not being able to locate the PID file.

Well with all my fault finding with my limited linux skills I've come to the conclusion that Centos 7 places it's PID files in the "/run" folder as opposed to previous versions placing them in the "/var/run" folder. I suspect some software has not yet caught up with this. I'm happy for anyone to elaborate on this.

This is not specific to Direct Admin either, I had similar issues with a cPanel VPS as well.

I found that moving all contents from "/var/run" to "/run" and then creating a symbolic link fixed the issues;
Code:
mv /var/run/*.* /run
rm -fr /var/run
ln -s /run /var/run

I hope that this helps others that may be experiencing similar issues.
 
Back
Top