【环境信息】
【问题复现步骤】
1. 安装包 yum install opendmarc-y
2. 启动服务 systemctl start opendmarc.service
3. 查询服务状态 systemctl status opendmarc.service
【预期结果】
服务启动成功
【实际结果】
服务启动失败
【附件信息】
Hi duanxuemin, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Base-service, and any of the maintainers: @hexiaowen , @Monday , @zhujianwei001 , @谢志鹏 , @陈棋德 , @openeuler-ci-bot
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
opendmarc服务启动失败:
[root@localhost opendmarc-new]# systemctl status opendmarc
× opendmarc.service - Domain-based Message Authentication, Reporting & Conformance (DMARC) Milter
Loaded: loaded (/usr/lib/systemd/system/opendmarc.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2023-03-01 03:03:50 CST; 7s ago
Docs: man:opendmarc(8)
man:opendmarc.conf(5)
man:opendmarc-import(8)
man:opendmarc-reports(8)
http://www.trusteddomain.org/opendmarc/
** Process: 8621 ExecStart=/usr/sbin/opendmarc -f (code=exited, status=69)**
Main PID: 8621 (code=exited, status=69)
3月 01 03:03:50 localhost.localdomain systemd[1]: opendmarc.service: Scheduled restart job, restart counter is at 5.
3月 01 03:03:50 localhost.localdomain systemd[1]: Stopped Domain-based Message Authentication, Reporting & Conformance (DMARC) Milter.
3月 01 03:03:50 localhost.localdomain systemd[1]: opendmarc.service: Start request repeated too quickly.
3月 01 03:03:50 localhost.localdomain systemd[1]: opendmarc.service: Failed with result 'exit-code'.
3月 01 03:03:50 localhost.localdomain systemd[1]: Failed to start Domain-based Message Authentication, Reporting & Conformance (DMARC) M>
经过查看日志,发现为ExecStart=/usr/sbin/opendmarc -f 参数未生效,导致配置文件未导入,服务启动失败
修改后:
[root@localhost opendmarc-new]# systemctl status opendmarc
● opendmarc.service - Domain-based Message Authentication, Reporting & Conformance (DMARC) Milter
Loaded: loaded (/usr/lib/systemd/system/opendmarc.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2023-03-02 14:34:03 CST; 1s ago
Docs: man:opendmarc(8)
man:opendmarc.conf(5)
man:opendmarc-import(8)
man:opendmarc-reports(8)
http://www.trusteddomain.org/opendmarc/
Main PID: 5164 (opendmarc)
Tasks: 3 (limit: 37503)
Memory: 656.0K
CGroup: /system.slice/opendmarc.service
** └─ 5164 /usr/sbin/opendmarc -f -c /etc/opendmarc.conf**
service 配置文件:
[root@localhost opendmarc-new]# cat /usr/lib/systemd/system/opendmarc.service
[Unit]
Description=Domain-based Message Authentication, Reporting & Conformance (DMARC) Milter
Documentation=man:opendmarc(8) man:opendmarc.conf(5) man:opendmarc-import(8) man:opendmarc-reports(8) http://www.trusteddomain.org/opendmarc/
After=network.target nss-lookup.target syslog.target
[Service]
Type=simple
RuntimeDirectory=opendmarc
RuntimeDirectoryMode=0750
EnvironmentFile=-/etc/sysconfig/opendmarc
ExecStart=/usr/sbin/opendmarc -f $OPTIONS
ExecReload=/bin/kill -USR1 $MAINPID
Restart=on-failure
User=opendmarc
Group=opendmarc
Umask=0007
ReadWritePaths=/var/spool/opendmarc
ProtectSystem=strict
ProtectHome=true
[Install]
WantedBy=multi-user.target
ExecStart=/usr/sbin/opendmarc -f $OPTIONS
ExecReload=/bin/kill -USR1 $MAINPID
以上两个配置生效后,问题解决
在23.03RC2上验证结果如下:
x86:
arm:
登录 后才可以发表评论