Linux
systemctl 解析殺死模式失敗,忽略混合
在 CentOS 7 上,我想檢查
nginx
服務的狀態:# systemctl status nginx -l nginx.service - The nginx HTTP and reverse proxy server Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled) Active: inactive (dead) Jun 30 03:40:08 dev01 systemd[1]: [/usr/lib/systemd/system/nginx.service:13] Failed to parse kill mode, ignoring mixed
然後我啟用了它:
# systemctl enable nginx
並再次檢查了它:# systemctl status nginx -l nginx.service - The nginx HTTP and reverse proxy server Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled) Active: inactive (dead) Jun 30 03:40:08 dev01 systemd[1]: [/usr/lib/systemd/system/nginx.service:13] Failed to parse kill mode, ignoring mixed Jun 30 03:40:21 dev01 systemd[1]: [/usr/lib/systemd/system/nginx.service:13] Failed to parse kill mode, ignoring mixed
這是什麼錯誤?為什麼每次我這樣做:
# systemctl enable nginx
,status
在底部添加另一個錯誤副本。我enable
連續做了 4 到 5 次,然後status
顯示了 5 個這樣的錯誤。這個錯誤是關於什麼的?此外,當我最終
start
服務時,所有這些錯誤都從status
.
systemd 使用 syslog 將所有消息(啟動/停止)記錄到 /var/log/message,您看到的錯誤行基本上都是帶有 tail 選項的“nginx”的所有匹配行。它的東西 =~
grep nginx | tail
將顯示“nginx”grep 的 /var/log/message 的最後 10 行。基本上 systemctl 顯示日誌中的最後 10 行以幫助使用者辨識問題。[root@puppetmaster ~]# grep nginx /var/log/messages| tail Jul 1 05:59:50 localhost systemd: [/usr/lib/systemd/system/nginx.service:13] Failed to parse kill mode, ignoring: mixed Jul 1 05:59:57 localhost systemd: [/usr/lib/systemd/system/nginx.service:13] Failed to parse kill mode, ignoring: mixed Jul 1 06:05:35 localhost systemd: [/usr/lib/systemd/system/nginx.service:13] Failed to parse kill mode, ignoring: mixed Jul 1 06:23:30 localhost systemd: [/usr/lib/systemd/system/nginx.service:13] Failed to parse kill mode, ignoring: mixed Jul 1 06:23:34 localhost systemd: [/usr/lib/systemd/system/nginx.service:13] Failed to parse kill mode, ignoring: mixed Jul 1 06:23:46 localhost systemd: [/usr/lib/systemd/system/nginx.service:13] Failed to parse kill mode, ignoring: mixed Jul 1 06:27:07 localhost systemd: [/usr/lib/systemd/system/nginx.service:13] Failed to parse kill mode, ignoring: mixed Jul 1 06:27:19 localhost systemd: [/usr/lib/systemd/system/nginx.service:13] Failed to parse kill mode, ignoring: mixed Jul 1 06:27:24 localhost systemd: [/usr/lib/systemd/system/nginx.service:13] Failed to parse kill mode, ignoring: mixed Jul 1 06:27:28 localhost systemd: [/usr/lib/systemd/system/nginx.service:13] Failed to parse kill mode, ignoring: mixed