Keepalived 启动报错 PID file /var/run/keepalived.pid not readable (yet?) after start.

转贴自:  https://blog.csdn.net/yieryi_/article/details/80798973

 

安装 Keepalived 后,启动时发现报错,使用命令 journalctl -xe 查看日志,有这样一行:
PID file /var/run/keepalived.pid not readable (yet?) after start.


这是由于没有按照 Keepalived 默认的路径配置造成的,解决方法:

    cp keepalived-1.3.5/keepalived/etc/init.d/keepalived /etc/init.d/
    mkdir /etc/keepalived
    cp /usr/local/keepalived/etc/keepalived/keepalived.conf /etc/keepalived/
    cp keepalived-1.3.5/keepalived/etc/sysconfig/keepalived /etc/sysconfig/
    cp /usr/local/keepalived/sbin/keepalived /usr/local/sbin/
    另外 keepalived.service 文件中的 pid 保存路径还需要改正。用 vi 打开 keepalived.service 文件,将 pid 保存路径 修改为默认的路径 /var/run/keepalived.pid 即可。

你可能感兴趣的:(linux)