Erro | 记一次yum安装keepalived后启动报错的问题

  1. 安装方式 :yum安装
  2. 应用场景 :keepalived 构建vip
  3. 报错场景 :开始时启动 keepalived 服务无问题,重启服务器后不可用
  4. 报错信息 :

通过 systemctl status keepalived.service 查看

[root@NFS1 ~]# systemctl status keepalived -l
● keepalived.service - LVS and VRRP High Availability Monitor
   Loaded: loaded (/usr/lib/systemd/system/keepalived.service; disabled; vendor preset: disabled)
   Active: failed (Result: resources) since 五 2020-03-13 19:49:57 CST; 59s ago
  Process: 2876 ExecStart=/usr/sbin/keepalived $KEEPALIVED_OPTIONS (code=exited, status=0/SUCCESS)

3月 13 19:49:57 NFS1 systemd[1]: Starting LVS and VRRP High Availability Monitor...
3月 13 19:49:57 NFS1 systemd[1]: PID file /var/run/keepalived.pid not readable (yet?) after start.
3月 13 19:49:57 NFS1 systemd[1]: Failed to start LVS and VRRP High Availability Monitor.
3月 13 19:49:57 NFS1 systemd[1]: Unit keepalived.service entered failed state.
3月 13 19:49:57 NFS1 systemd[1]: keepalived.service failed.

Erro | 记一次yum安装keepalived后启动报错的问题_第1张图片

通过 journalctl -xe 查看

3月 13 19:57:53 NFS1 polkitd[714]: Registered Authentication Agent for unix-process:3162:61492 (system bu
3月 13 19:57:53 NFS1 systemd[1]: Starting LVS and VRRP High Availability Monitor...
-- Subject: Unit keepalived.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit keepalived.service has begun starting up.
3月 13 19:57:53 NFS1 Keepalived[3169]: Starting Keepalived v1.3.5 (03/19,2017), git commit v1.3.5-6-g6fa3
3月 13 19:57:53 NFS1 Keepalived[3169]: Configuration file '/etc/keepalived/keepalived.conf' is not a regu
3月 13 19:57:53 NFS1 Keepalived[3169]: Stopped Keepalived v1.3.5 (03/19,2017), git commit v1.3.5-6-g6fa32
3月 13 19:57:53 NFS1 systemd[1]: PID file /var/run/keepalived.pid not readable (yet?) after start.
3月 13 19:57:53 NFS1 systemd[1]: Failed to start LVS and VRRP High Availability Monitor.
-- Subject: Unit keepalived.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit keepalived.service has failed.
-- 
-- The result is failed.

Erro | 记一次yum安装keepalived后启动报错的问题_第2张图片

  1. 解决思路:得知是pid文件出错,由于是yum安装,短时间未找到pid配置文件
  2. 解决办法:重新安装(两条命令)
 yum remove keepalived
 yum install -y keepalived
  1. 注意事项:重新安装后,原 /etc/keepalived/keepalived.conf 被重命名 keepalived.conf.rpmsave ,删除新的 keepalived.conf 文件,将原配置文件改为 keepalived.conf
  2. 启动、查看
    Erro | 记一次yum安装keepalived后启动报错的问题_第3张图片

你可能感兴趣的:(Erro)