Can't open PID file /run/named/named.pid (yet?) after start

mathx

Active Member
Jan 16, 2017
26
3
3
Toronto
cPanel Access Level
DataCenter Provider
Cpanel server on Proxmox 5.4, under an LXC container. Cpanel 11.84.0.19. CentOS Linux release 7.7.1908 (Core).

Cant seem to find this problem mentioned specifically on forums or google.

Server was running fine for weeks untouched, then suddenly today, alerts in email about named failing. I think it was some monthly update/restart related to systemd.

I have local_nameserver_type=bind but I think there's a systemd issue or such that systemd or some chroot it's putting named into cant read /run/named at all:
Code:
Jan 17 09:42:12 cpanelserver.com systemd[1]: Can't open PID file /run/named/named.pid (yet?) after start: No such file or directory
Jan 17 09:43:42 cpanelserver.com systemd[1]: named.service start operation timed out. Terminating.
Jan 17 09:43:42 cpanelserver.com systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
Jan 17 09:43:42 cpanelserver.com systemd[1]: Unit named.service entered failed state.
Jan 17 09:43:42 cpanelserver.com systemd[1]: named.service failed.

Waiting for named to info [restartsrv_bind] systemd failed to start the service Startnamed  (The /usr/bin/systemctl restart named.service --no-ask-password command (process 32638) reported error number 1 when it ended.): Job for named.service failed because a timeout was exceeded. See "systemctl status named.service" and "journalctl -xe" for info [restartsrv_bind] systemd failed to start the service Detailsnamed.

(The /usr/bin/systemctl restart named.service --no-ask-password command (process 32684) reported error number 1 when it ended.): Job for named.service failed because a timeout was exceeded. See "systemctl status named.service" and "journalctl -xe" for failed.

Cpanel::Exception::Services::StartError
Service Status

Service Error
        (XID 57rhyv) The Detailsnamed.
service failed to start.

Startup Log
        Jan 17 10:05:07 cpanelserver.com named[32691]: automatic empty zone: view internal: HOME.ARPA
        Jan 17 10:05:07 cpanelserver.com named[32691]: none:104: 'max-cache-size 90%' - setting to 1843MB (out of 2048MB)
        Jan 17 10:05:07 cpanelserver.com named[32691]: set up managed keys zone for view external, file 'external.mkeys'
        Jan 17 10:05:07 cpanelserver.com named[32691]: none:104: 'max-cache-size 90%' - setting to 1843MB (out of 2048MB)
        Jan 17 10:05:08 cpanelserver.com named[32691]: command channel listening on 127.0.0.1#953
        Jan 17 10:05:08 cpanelserver.com systemd[1]: Can't open PID file /run/named/named.pid (yet?) after start: No such file or directory
        Jan 17 10:06:37 cpanelserver.com systemd[1]: named.service start operation timed out. Terminating.
        Jan 17 10:06:37 cpanelserver.com systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
        Jan 17 10:06:37 cpanelserver.com systemd[1]: Unit named.service entered failed state.
        Jan 17 10:06:37 cpanelserver.com systemd[1]: named.service failed.
named has failed. Contact your system administrator if the service does not automagically recover.
and after all that named does in fact not start, it is not running. But I started it manually, and it runs ok:

Code:
named      585  0.0  5.8 761664 123072 ?       Ssl  10:20   0:00 /usr/sbin/named -u named -c /etc/named.conf

# cat /var/run/named/named.pid
585

/run/named#ls -latr
total 38
-rw-------  1 named named 102 Jan 17 10:20 session.key
-rw-r--r--  1 named named   4 Jan 17 10:20 named.pid
drwxr-xr-x  2 named named   4 Jan 17 10:20 .
drwxrwxrwt 11 root  root   48 Jan 17 11:23 ..
but I still get the regular cpanel alert cuz it of course still cannot read the named.pid file, which is the whole issue:

Code:
Jan 17 10:05:08 cpanelserver.com systemd[1]: Can't open PID file /run/named/named.pid (yet?) after start: No such file or directory                                          
Jan 17 10:06:37 cpanelserver.com systemd[1]: named.service start operation timed out.   Terminating.                                                                           
Jan 17 10:06:37 cpanelserver.com systemd[1]: Failed to start Berkeley Internet Name  Domain (DNS).                                                                          
Jan 17 10:06:37 cpanelserver.com systemd[1]: Unit named.service entered failed state.
Jan 17 10:06:37 cpanelserver.com systemd[1]: named.service failed.
seems that restartsrv_named and all the scripts related cannot access/read /run/named which means it cant start it, or see if it's running.

(Technically I dont even need named for this server, the domain uses external nameservers, I should turn it off, but this wont solve this problem for other servers where I do, if it pops up again).
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,269
313
Houston
Can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


Thanks!
 

cPAdminsMichael

Well-Known Member
Dec 19, 2016
167
59
103
Denmark
cPanel Access Level
Root Administrator
Hi!
Did you solve this or find a solution? We have this issue on every 2nd restart - it seems to be quite random. It's not a big thing as long as you know which services usually have issue with the PID file as it's almost always because the /var/run/<service> directory is missing after the restart... but it's just irritating :)