Postfix Failed to start : unable to set exclusive lock: Resource temporarily unavailable
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 :)
Related videos on Youtube

Comments
-
Fahad 10 months
Postfix was running well untill I decided for some reason to restart since I updated message_size_limit
By doing this
postconf -e message_size_limit=24840000
Stopped it and Now ... Postfix wont start , It keeps on saying
fatal: open lock file /var/lib/postfix/master.lock: unable to set exclusive lock: Resource temporarily unavailable
I tried reverting the change but no luck,
Sep 23 20:47:45 example.com systemd[1]: Starting Postfix Mail Transport Agent... Sep 23 20:47:45 example.com postfix/postfix-script[13392]: starting the Postfix mail system Sep 23 20:47:45 example.com postfix/master[13394]: fatal: open lock file /var/lib/postfix/master.lock: unable to set exclusive lock: Resource temporarily unavailable Sep 23 20:47:46 example.com postfix/master[13393]: fatal: daemon initialization failure Sep 23 20:47:47 example.com postfix/postfix-script[13395]: fatal: mail system startup failed Sep 23 20:47:47 example.com systemd[1]: postfix.service: control process exited, code=exited status=1 Sep 23 20:47:47 example.com systemd[1]: Failed to start Postfix Mail Transport Agent. Sep 23 20:47:47 example.com systemd[1]: Unit postfix.service entered failed state. Sep 23 20:47:47 example.com systemd[1]: postfix.service failed.
If it would help , I also installed SSL from LetsEncrypt like 2 weeks ago , perhaps that might be the cause of the problem?
-
Ryan Babchishin almost 7 yearsGoogle says: math.ias.edu/~tarzadon/pages/posts/… Did you see that?
-
Fahad almost 7 yearsThanks for the URL , Not exactly the
same problem
but it helped to arrive there , Deserved the down vote
-