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

Solution 1:

Thanks to to the URL shared with @ryan-babchishin , it helped to arrive to the solution

##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

#htop 

or simply do

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

Now

#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 system

Postfix is running again!

Let me play Sticky Bubble on Android to relax a bit :)