【问题标题】:Cant find interface eth0 for vrrp_instance VI_1找不到 vrrp_instance VI_1 的接口 eth0
【发布时间】:2018-11-17 12:57:41
【问题描述】:

目前,我正在尝试在我的机器上使用 NGINX 运行 KEEPALIVED。我的用例包括监控 NGINX 服务器的故障转移行为,因为任何一个实例都可能出现故障,我需要让其他实例处于活动状态来处理传入请求。

下面是我的keepalived.conf文件,

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 51
    priority 100
     track_script {
            chk_http_port
        }
    virtual_ipaddress {
        10.100.160.143
    }
}

vrrp_script chk_http_port {
        script "pidof nginx"
        interval 2

}

以下是我在位置 /var/logs/messages 遇到的错误

Keepalived_vrrp[33045]: Cant find interface eth0 for vrrp_instance VI_1 !!!
Keepalived_vrrp[33045]:     chk_http_port no match, ignoring...
Keepalived_vrrp[33045]: Default interface eth0 does not exist and no interface specified. Skipping static address 10.100.160.143.
Keepalived_vrrp[33045]: WARNING - default user 'keepalived_script' for script execution does not exist - please create.
Keepalived_vrrp[33045]: VRRP_Instance(VI_1) Unknown interface !
Keepalived_vrrp[33045]: Stopped
Keepalived[33042]: Keepalived_vrrp exited with permanent error CONFIG. Terminating
Keepalived[33042]: Stopping
Keepalived_healthcheckers[33044]: Stopped
Keepalived[33042]: Stopped Keepalived v1.3.5 (03/19,2017), git commit v1.3.5-6-g6fa32f2

【问题讨论】:

    标签: node.js nginx load-balancing nginx-location nginx-status


    【解决方案1】:

    您可能需要检查网络接口的名称。使用 ifconfig 列出所有网络接口,然后查找“eth0”。如果你的机器上不存在“eth0”,那么你需要在你的keepalived.conf中指定一个现有接口的名称

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-06
      • 2017-05-04
      • 1970-01-01
      • 2017-10-09
      • 1970-01-01
      • 2019-11-14
      相关资源
      最近更新 更多