Author Topic: Can't open PID file /var/run/dovecot/master.pid (yet?) after start: No such file  (Read 807 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Hello,

i am having master.pid file cant be found error as below. i have check /var/run/dovecot/master.pid exists with the following permissions. can someone suggest me why i am getting this error as the file and folder already exists with valid pid info inside.


[root@server ~]# service dovecot status -l
Redirecting to /bin/systemctl status  -l dovecot.service
● dovecot.service - Dovecot IMAP/POP3 email server
   Loaded: loaded (/usr/lib/systemd/system/dovecot.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2020-05-08 02:09:15 CEST; 10h ago
     Docs: man:dovecot(1)
           http://wiki2.dovecot.org/
  Process: 29745 ExecStop=/usr/bin/doveadm stop (code=exited, status=0/SUCCESS)
  Process: 29797 ExecStart=/usr/sbin/dovecot (code=exited, status=0/SUCCESS)
  Process: 29794 ExecStartPre=/usr/sbin/portrelease dovecot (code=exited, status=0/SUCCESS)
  Process: 29787 ExecStartPre=/usr/libexec/dovecot/prestartscript (code=exited, status=0/SUCCESS)
 Main PID: 29801 (dovecot)
   CGroup: /system.slice/dovecot.service
           ├─19670 dovecot/ssl-params
           ├─29801 /usr/sbin/dovecot
           ├─29802 dovecot/anvil
           ├─29803 dovecot/log
           └─29805 dovecot/config

May 08 02:09:14 server.smartwebsolutions.club systemd[1]: Starting Dovecot IMAP/POP3 email server...
May 08 02:09:15 server.smartwebsolutions.club systemd[1]: Can't open PID file /var/run/dovecot/master.pid (yet?) after start: No such file or directory
May 08 02:09:15 server.smartwebsolutions.club systemd[1]: Started Dovecot IMAP/POP3 email server.
[root@server ~]# ll /var/run/dovecot/
total 8
srw------- 1 root    root       0 May  8 02:09 anvil
srw------- 1 root    root       0 May  8 02:09 anvil-auth-penalty
srw------- 1 dovecot root       0 May  8 02:09 auth-client
srw------- 1 dovecot root       0 May  8 02:09 auth-login
srw------- 1 root    root       0 May  8 02:09 auth-master
-rw------- 1 root    root      32 May  6 02:54 auth-token-secret.dat
srw-rw-rw- 1 vmail   mail       0 May  8 02:09 auth-userdb
srw------- 1 dovecot root       0 May  8 02:09 auth-worker
srw------- 1 root    root       0 May  8 02:09 config
srw-rw-rw- 1 vmail   mail       0 May  8 02:09 dict
srw------- 1 root    root       0 May  8 02:09 dict-async
srw------- 1 root    root       0 May  8 02:09 director-admin
srw-rw-rw- 1 root    root       0 May  8 02:09 dns-client
srw------- 1 root    root       0 May  8 02:09 doveadm-server
lrwxrwxrwx 1 root    root      25 May  8 02:09 dovecot.conf -> /etc/dovecot/dovecot.conf
drwxr-xr-x 2 root    root      40 May  6 00:54 empty
srw------- 1 root    root       0 May  8 02:09 imap-hibernate
srw------- 1 root    root       0 May  8 02:09 imap-master
srw-rw-rw- 1 root    root       0 May  8 02:09 imap-urlauth
srw------- 1 dovecot root       0 May  8 02:09 imap-urlauth-worker
srw-rw-rw- 1 root    root       0 May  8 02:09 indexer
srw------- 1 dovecot root       0 May  8 02:09 indexer-worker
srw------- 1 root    root       0 May  8 02:09 ipc
srw-rw-rw- 1 root    root       0 May  8 02:09 lmtp
srw------- 1 root    root       0 May  8 02:09 log-errors
drwxr-x--- 2 root    dovenull 160 May  8 02:09 login
srw------- 1 root    root       0 May  8 02:09 master
-rw------- 1 root    root       6 May  8 02:09 master.pid
srw------- 1 root    root       0 May  8 02:09 replication-notify
prw------- 1 root    root       0 May  8 02:09 replication-notify-fifo
srw------- 1 dovecot root       0 May  8 02:09 replicator
srw-rw-rw- 1 root    root       0 May  8 02:09 ssl-params
srw-rw--w- 1 root    root       0 May  8 02:09 stats
prw------- 1 root    root       0 May  8 02:09 stats-mail
prw------- 1 root    root       0 May  8 02:09 stats-user
drwxr-x--- 2 root    dovenull  80 May  8 02:09 token-login

Offline
***
No s flag in chmod, so dovecot user can't read it. 
Systemctl stop dovecot
Delete master.pid
Systemctl start dovecot

Should give the correct permissions.

Chances are dovecot was started as root one time accidentally and created the file without system access
Google Hangouts:  rcschaff82@gmail.com

Offline
*
thanks bro.... issue was resolved by stop and start of dovecot service.

[root@server dovecot]# service dovecot status -l
Redirecting to /bin/systemctl status  -l dovecot.service
● dovecot.service - Dovecot IMAP/POP3 email server
   Loaded: loaded (/usr/lib/systemd/system/dovecot.service; enabled; vendor pres                                                                                                             et: disabled)
   Active: active (running) since Fri 2020-05-08 13:26:15 CEST; 58s ago
     Docs: man:dovecot(1)
           http://wiki2.dovecot.org/
  Process: 4885 ExecStop=/usr/bin/doveadm stop (code=exited, status=0/SUCCESS)
  Process: 4992 ExecStart=/usr/sbin/dovecot (code=exited, status=0/SUCCESS)
  Process: 4989 ExecStartPre=/usr/sbin/portrelease dovecot (code=exited, status=                                                                                                             0/SUCCESS)
  Process: 4982 ExecStartPre=/usr/libexec/dovecot/prestartscript (code=exited, s                                                                                                             tatus=0/SUCCESS)
 Main PID: 4995 (dovecot)
   CGroup: /system.slice/dovecot.service
           ├─4995 /usr/sbin/dovecot
           ├─4996 dovecot/anvil
           ├─4997 dovecot/log
           ├─4999 dovecot/config
           └─5058 dovecot/auth

May 08 13:26:15 server.smartwebsolutions.club systemd[1]: Starting Dovecot IMAP/                                                                                                             POP3 email server...
May 08 13:26:15 server.smartwebsolutions.club systemd[1]: Started Dovecot IMAP/P                                                                                                             OP3 email server.

Offline
*
the first time i stop and start dovecot service the issue was resolved .... but unfortunately after i had to reboot the server , the issue appears back again and this time stop start the dovecot service doesn't help.

someone at plesk forum is suggesting to fix the permissions for : # chown root:dovecot /var/run/dovecot as its root:root in my case if you see my output shared before.

should i change the dovecot folder permission as above ? how it was working fine before with root:root ? anyidea

Offline
***
drwxr-xr-x   5 root     dovecot     740 May 14 00:17 dovecot

chown root:dovecot /var/run/dovecot
chmod 755 /var/run/dovecot
Google Hangouts:  rcschaff82@gmail.com

Offline
*
wow .... .thanks .... it worked  8)