在启动期间在/ var / log / messages中重新启动服务器后,仅在这4行中logging了Postfix(1秒内的所有操作):
systemd: Starting Postfix Mail Transport Agent... systemd: postfix.service: control process exited, code=exited status=1 systemd: Failed to start Postfix Mail Transport Agent. systemd: Unit postfix.service entered failed state.
同时(在同一秒内)在/ var / log / maillog中只有1行:
postfix/postfix-script[2069]: fatal: the Postfix mail system is already running
1)。 哪里可以find关于这个错误的更多信息?
2)。 如果在这之前系统日志中没有关于Postfix的任何logging,那么它是如何运行的呢?
UPDATE
如果我手动运行Postfix – 这是完美的! 问题只是在启动时间。
systemctl启动后缀
journalctl -xe
May 30 17:41:58 CentOS-70-64-minimal systemd[1]: Starting Postfix Mail Transport Agent... -- Subject: Unit postfix.service has begun with start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit postfix.service has begun starting up. May 30 17:41:59 CentOS-70-64-minimal postfix/postfix-script[6524]: starting the Postfix mail system May 30 17:41:59 CentOS-70-64-minimal postfix/master[6526]: daemon started -- version 2.10.1, configuration /etc/postfix May 30 17:41:59 CentOS-70-64-minimal systemd[1]: Started Postfix Mail Transport Agent. -- Subject: Unit postfix.service has finished start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit postfix.service has finished starting up. -- -- The start-up result is done. May 30 17:42:06 CentOS-70-64-minimal postfix/postfix-script[6538]: the Postfix mail system is running: PID: 6526
更新2
哇,最后不完美….我尝试发送电子邮件:
php -a mail('[email protected]','subject','text');
并获得错误。
在/ var /日志/ maillog的
May 30 17:41:59 postfix/postfix-script[6524]: starting the Postfix mail system May 30 17:41:59 postfix/master[6526]: daemon started -- version 2.10.1, configuration /etc/postfix May 30 17:42:06 postfix/postfix-script[6538]: the Postfix mail system is running: PID: 6526 May 30 17:51:35 postfix/pickup[6527]: A4DC31180305: uid=0 from=<root> May 30 17:51:35 postfix/cleanup[6554]: A4DC31180305: message-id=<[email protected]> May 30 17:51:35 postfix/qmgr[6528]: A4DC31180305: from=<[email protected]>, size=411, nrcpt=2 (queue active) May 30 17:51:35 postfix/smtp[6556]: fatal: open lock file pid/unix.smtp: cannot open file: Permission denied May 30 17:51:35 postfix/cleanup[6554]: C483211802E1: message-id=<[email protected]> May 30 17:51:35 postfix/qmgr[6528]: C483211802E1: from=<[email protected]>, size=579, nrcpt=1 (queue active) May 30 17:51:35 postfix/local[6557]: A4DC31180305: to=<[email protected]>, relay=local, delay=0.28, delays=0.17/0.04/0/0.07, dsn=2.0.0, status=sent (forwarded as C483211802E1) May 30 17:51:36 postfix/master[6526]: warning: process /usr/libexec/postfix/smtp pid 6556 exit status 1 May 30 17:51:36 postfix/master[6526]: warning: /usr/libexec/postfix/smtp: bad command startup -- throttling May 30 17:52:36 postfix/smtp[6558]: fatal: open lock file pid/unix.smtp: cannot open file: Permission denied
netstat -nlap | grep':25'
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 6526/master
后缀状态
postfix/postfix-script: the Postfix mail system is running: PID: 6526
更新3
再次美好的一天!
系统中没有明显和奇怪的东西:)
我没有改变任何设置,重新启动服务器,看到所有的作品必须。
在启动时只需要两行/ var / log / messages和Postfix就可以了:
systemd: Starting Postfix Mail Transport Agent... systemd: Started Postfix Mail Transport Agent.
谢谢你的build议!!
对于第二个问题:自服务启动以来日志文件可能已经被旋转(意味着日志现在在其他文件中)。
对于这个问题: “已经运行”消息有可能是误导性的:通常在服务器进程退出时需要相当长的时间(几十秒),而不是干净地closures它监听的套接字/端口,直到另一个服务器实例可以成功绑定并收听相同的端口。 我想说这个消息只是表示这样的绑定失败(如果另一个服务器实例仍然在运行,同样的失败也是可见的)。
我会检查另一个实例是否正在运行,如果没有,请尝试再次启动服务。
一般来说,我build议停止一个服务,等一下,然后启动它(而不是简单地重新启动它),除非服务明确支持平稳重启。