postfix启动报错

查看postfix状态

✘ ⚡ root@dslab-pub  /  service postfix status

Redirecting to /bin/systemctl status postfix.service

postfix.service - Postfix Mail Transport Agent

   Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)

   Active: failed (Result: exit-code) since 四 2020-05-14 10:51:57 CST; 4s ago

  Process: 14545 ExecStart=/usr/sbin/postfix start (code=exited, status=1/FAILURE)

  Process: 14542 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)

  Process: 14538 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=0/SUCCESS)

Main PID: 20862 (code=killed, signal=TERM)

 

5月 14 10:51:57 dslab-pub systemd[1]: Starting Postfix Mail Transport Agent...

5月 14 10:51:57 dslab-pub postfix/postfix-script[14552]: fatal: the Postfix mail system is already running

5月 14 10:51:57 dslab-pub systemd[1]: postfix.service: control process exited, code=exited status=1

5月 14 10:51:57 dslab-pub systemd[1]: Failed to start Postfix Mail Transport Agent.

5月 14 10:51:57 dslab-pub systemd[1]: Unit postfix.service entered failed state.

5月 14 10:51:57 dslab-pub systemd[1]: postfix.service failed.

重启

✘ ⚡ root@dslab-pub  /  systemctl start postfix.service

Job for postfix.service failed because the control process exited with error code. See "systemctl status postfix.service" and "journalctl -xe" for details.

重启也失败了😭

 

 

解决方法:

HOW TO FIX:

The error to note here is the following:

fatal: open lock file /var/lib/postfix/master.lock

I first killed the smtp and smtpd processes that runs by postfix:

# killall -9 smtp
# killall -9 smtpd

But that didn’t solve the problem. I then used the fuser command to check which process holds the lock file:

# fuser /var/lib/postfix/master.lock
/var/lib/postfix/master.lock: 18698

Then we check the process 18698 and kill the responsible process:

# ps -axwww|grep 18698
9333 pts/0 S+ 0:00 grep --color=auto 18698

18698 ? Ss 4:28 /usr/libexec/postfix/master -w
# killall -9 /usr/libexec/postfix/master
or
# kill -9 18698

Once the process is killed, you can now start the postfix:

# service postfix start
# service postfix status|grep Active
Redirecting to /bin/systemctl status postfix.service
Active: active (running) since Tue 2018-01-09 04:15:50 UTC; 4min 45s ago

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值