Fork me on GitHub

Job for ipvsadm.service failed because the control process exited with error code.

1、启动ipvsadm 服务报错如下:

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

2、通过状态查询,发现缺少 /etc/sysconfig/ipvsadm

systemctl status ipvsadm
● ipvsadm.service - Initialise the Linux Virtual Server
   Loaded: loaded (/usr/lib/systemd/system/ipvsadm.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2021-05-17 04:26:17 EDT; 10s ago
  Process: 1806 ExecStart=/bin/bash -c exec /sbin/ipvsadm-restore < /etc/sysconfig/ipvsadm (code=exited, status=1/F>
 Main PID: 1806 (code=exited, status=1/FAILURE)

May 17 04:26:17 localhost.localdomain systemd[1]: Starting Initialise the Linux Virtual Server...
May 17 04:26:17 localhost.localdomain bash[1806]: /bin/bash: /etc/sysconfig/ipvsadm: No such file or directory
May 17 04:26:17 localhost.localdomain systemd[1]: ipvsadm.service: Main process exited, code=exited, status=1/FAILU>
May 17 04:26:17 localhost.localdomain systemd[1]: ipvsadm.service: Failed with result 'exit-code'.
May 17 04:26:17 localhost.localdomain systemd[1]: Failed to start Initialise the Linux Virtual Server.

3、执行以下命令

ipvsadm --save > /etc/sysconfig/ipvsadm

4、重启服务即可

systemctl restart ipvsadm.service 

 

posted @ 2021-05-17 16:37  Alex-Lzy  阅读(647)  评论(0编辑  收藏  举报