Postfix unable to start with error: open lock file /var/lib/postfix/master.lock: unable to set exclusive lock

Created:

2017-01-06 22:57:00 UTC

Modified:

2017-08-08 13:16:50 UTC

2

Was this article helpful?


Have more questions?

Submit a request

Postfix unable to start with error: open lock file /var/lib/postfix/master.lock: unable to set exclusive lock

Applicable to:

  • Plesk for Linux

Issue Symptoms

Unable to start Postfix mail server, the following error occurs:



# systemctl status postfix
postfix.service - Postfix Mail Transport Agent
Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2017-01-06 22:48:21 UTC; 4s ago
Process: 36797 ExecStart=/usr/sbin/postfix start (code=exited, status=1/FAILURE)
Process: 36794 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)
Process: 36792 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=0/SUCCESS)
Main PID: 13643 (code=killed, signal=TERM)
Jan 06 22:48:19 mail.plesk.com systemd[1]: Starting Postfix Mail Transport Agent...
Jan 06 22:48:19 mail.plesk.com postfix/master[36870]: fatal: open lock file /var/lib/postfix/master.lock: unable to set exclusive lock: Resource temporarily unavailable
Jan 06 22:48:20 mail.plesk.com postfix/master[36869]: fatal: daemon initialization failure
Jan 06 22:48:21 mail.plesk.com systemd[1]: postfix.service: control process exited, code=exited status=1
Jan 06 22:48:21 mail.plesk.com systemd[1]: Failed to start Postfix Mail Transport Agent.
Jan 06 22:48:21 mail.plesk.com systemd[1]: Unit postfix.service entered failed state.
Jan 06 22:48:21 mail.plesk.com systemd[1]: postfix.service failed.

 

Conditions

Hanged postfix process

Resolution

1. Find and terminate hanged postfix processes using its PIDs:

# ps aux | grep postfix
# kill -9 PID

2. If /var/lib/postfix/master.lock file is present, remove it:

 # rm /var/lib/postfix/master.lock

3. Start Postfix:

# systemctl start postfix

 

Have more questions? Submit a request
Please sign in to leave a comment.