linux - Redhat 集群客户围栏失败

标签 linux redhat high-availability

我已经为 fencing 创建了一个空的 shell 脚本,如下所示

#!/bin/bash
echo "success: myfence $2"
exit 0

我已将其添加到 cluster.conf 中,但是当我测试以太网时出现以下错误。

Feb 10 07:58:36 node2 fenced[2006]: fenced 3.0.12.1 started
Feb 10 07:58:36 node2 fenced[2006]: failed to get dbus connection
Feb 10 08:06:52 node2 fenced[1982]: fenced 3.0.12.1 started
Feb 10 08:06:52 node2 fenced[1982]: failed to get dbus connection
Feb 10 08:11:38 node2 fenced[1928]: fenced 3.0.12.1 started
Feb 10 08:11:38 node2 fenced[1928]: failed to get dbus connection
Feb 10 08:20:07 node2 fenced[1928]: fencing node node1.example.com
Feb 10 08:20:07 node2 fenced[1928]: fence node1.example.com dev 0.0 agent none result: error no method
Feb 10 08:20:07 node2 fenced[1928]: fence node1.example.com failed
Feb 10 08:20:10 node2 fenced[1928]: fencing node node1.example.com
Feb 10 08:20:10 node2 fenced[1928]: fence node1.example.com dev 0.0 agent none result: error no method
Feb 10 08:20:10 node2 fenced[1928]: fence node1.example.com failed
Feb 10 08:20:13 node2 fenced[1928]: fencing node node1.example.com
Feb 10 08:20:13 node2 fenced[1928]: fence node1.example.com dev 0.0 agent none result: error no method
Feb 10 08:20:13 node2 fenced[1928]: fence node1.example.com failed

它不起作用!我的集群在这个阶段挂着用于围栏..但是当我运行fence_ack_manual时它就可以工作了!

最佳答案

我自己已经解决了。在 cluster.conf 和繁荣中添加了以下几行!!!

<clusternodes>
                <clusternode name="CentOS1" nodeid="1" votes="1">
                         <fence>
                                <method name="1">
                                        <device nodename="CentOS1" name="myfence"/>
                                </method>
                        </fence>
                </clusternode>

                <clusternode name="CentOS2" nodeid="2" votes="1">
                        <fence>
                                <method name="2">
                                        <device nodename="CentOS2" name="myfence"/>
                                </method>
                        </fence>
                </clusternode>
        </clusternodes>

关于linux - Redhat 集群客户围栏失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14799869/

相关文章:

php 从 linux 终端获取文本并回显

regex - 从 RedHat Linux 7 中的文件输出特定字符串 - 可能是正则表达式

architecture - 如何从我的应用程序架构中消除这个单点故障?

linux - Linux + NGinx + Kohana + php 上的 URL 区分大小写问题

php - 从 php 脚本向 shell 命令提供登录密码

regex - 使用 Perl 执行系统命令

Linux 中的 Java - root 用户和非 root 用户的不同外观类

java - 如何修复 Kafka Producer 示例的 NoClassDefFoundError?

java - 上次运行的 tomcat 类仍然存在

Redis PUB/SUB 和高可用性