Postfix Failed to start : unable to set exclusive lock: Resource temporarily unavailable


The Problem

So I was using systemctl to start,reload,stop postfix and it was adding other hidden users , I recently updated virtualmin , and it keeps on using

#systemctl status postfix.service #systemctl stop postfix.service #systemctl start postfix.service

Instead of

#postfix <start/stop>

The Solution

So it resulted the master.lock being used by other users hence we can not modify , resulting to

fatal: mail system startup failed

We only need to kill the process and start postfix

Now ... Check to see if the file is there

#ls -l /var/lib/postfix/master.lock

Look for the process utilizing it


or simply do

#fuser /var/lib/postfix/master.lock 7881


#ps -ef | grep 7881 root 7881 1 0 Sep16 ? 00:00:09 /usr/libexec/postfix/master -w postfix 9127 7881 0 10:04 ? 00:00:00 pickup -l -t unix -u postfix 9469 7881 0 10:13 ? 00:00:00 smtpd -n smtp -t inet -u -o stress= -o smtpd_sasl_auth_enable=yes postfix 9470 7881 0 10:13 ? 00:00:00 proxymap -t unix -u postfix 9471 7881 0 10:13 ? 00:00:00 smtpd -n smtp -t inet -u -o stress= -o smtpd_sasl_auth_enable=yes postfix 9472 7881 0 10:13 ? 00:00:00 anvil -l -t unix -u postfix 9476 7881 0 10:13 ? 00:00:00 trivial-rewrite -n rewrite -t unix -u root 9486 8671 0 10:13 pts/0 00:00:00 grep --color=auto 7881 postfix 28581 7881 0 Sep17 ? 00:00:01 qmgr -l -t unix -u

Find the Process that uses the lock file

Kill the Process

#kill 7881

Now lets get back to postfix

# postfix status postfix/postfix-script: the Postfix mail system is not running

Now start it

# postfix start postfix/postfix-script: starting the Postfix mail systemref:

2017-07-10 16:24:44gstlouis

How I used the steps above on my VPS

ps -ef | grep postfix
find the process number PID
kill the PID

systemctl start postfix
I used systemctl so that it starts and vitualmin can see it.  From what I could see doing 'postfix start' didn't seem to get postfix looking like its online with virtualmin (but postfix was working and online)

2017-07-10 16:27:24