配置cluster,手动开启的服务被cluster停止

发布于 2022-10-15 06:56:53 字数 12194 浏览 23 评论 0

各位,在虚拟机上做cluster的测试,资源和服务列表(cluster.conf)如下:

[root@qt-esa-rh5 ~]# more /etc/cluster/cluster.conf
<?xml version="1.0"?>
<cluster config_version="18" name="mycluster">
        <fence_daemon post_fail_delay="0" post_join_delay="3"/>
        <clusternodes>
                <clusternode name="QT-ESA-rh5.4-A" nodeid="1" votes="1">
                        <fence>
                                <method name="1">
                                        <device name="myfenced" nodename="QT-ESA-rh5.4-A"/>
                                </method>
                        </fence>
                </clusternode>
                <clusternode name="QT-ESA-rh5.4-B" nodeid="2" votes="1">
                        <fence>
                                <method name="1">
                                        <device name="myfenced" nodename="QT-ESA-rh5.4-B"/>
                                </method>
                        </fence>
                </clusternode>
        </clusternodes>
        <cman expected_votes="1" two_node="1"/>
        <fencedevices>
                <fencedevice agent="fence_manual" name="myfenced"/>
        </fencedevices>
        <rm>
                <failoverdomains>
                        <failoverdomain name="myfailoverdomain" ordered="1" restricted="0">
                                <failoverdomainnode name="QT-ESA-rh5.4-B" priority="2"/>
                                <failoverdomainnode name="QT-ESA-rh5.4-A" priority="1"/>
                        </failoverdomain>
                </failoverdomains>
                <resources>
                        <ip address="192.168.122.13" monitor_link="1"/>
                        <netfs export="/sharedata" force_unmount="1" fstype="nfs" host="192.168.122.15" mountpoint="/opt/ultrapower/postgresql/data"
name="newnfs" options=""/>
                        <postgres-8 config_file="/opt/ultrapower/postgresql/data/postgresql.conf" name="mypost" postmaster_options="-D /opt/ultrapowe
r/postgresql/data" postmaster_user="postgres" shutdown_wait="30"/>
                </resources>
                <service autostart="1" domain="myfailoverdomain" name="srv_post" recovery="relocate">
                        <ip ref="192.168.122.13">
                                <netfs ref="newnfs">
                                        <postgres-8 ref="mypost"/>
                                </netfs>
                        </ip>
                </service>
        </rm>
</cluster>
[root@qt-esa-rh5 ~]#

配置好后,在主节点(192.168.122.11)上手动开启nfs和postgresql服务,然后开启cluster服务(cman,rgmanager),结果cluster却将在主节点上手动开启的postgesql服务关闭了,/var/log/messages信息如下:

[root@qt-esa-rh5 ~]# tail -n 50 /var/log/messages
May 15 22:38:17 qt-esa-rh5 openais[9908]: [CLM  ] New Configuration:
May 15 22:38:17 qt-esa-rh5 openais[9908]: [CLM  ]       r(0) ip(192.168.122.11)  
May 15 22:38:17 qt-esa-rh5 openais[9908]: [CLM  ] Members Left:
May 15 22:38:17 qt-esa-rh5 openais[9908]: [CLM  ] Members Joined:
May 15 22:38:17 qt-esa-rh5 openais[9908]: [CLM  ] CLM CONFIGURATION CHANGE
May 15 22:38:17 qt-esa-rh5 openais[9908]: [CLM  ] New Configuration:
May 15 22:38:17 qt-esa-rh5 openais[9908]: [CLM  ]       r(0) ip(192.168.122.11)  
May 15 22:38:17 qt-esa-rh5 openais[9908]: [CLM  ]       r(0) ip(192.168.122.12)  
May 15 22:38:17 qt-esa-rh5 openais[9908]: [CLM  ] Members Left:
May 15 22:38:17 qt-esa-rh5 openais[9908]: [CLM  ] Members Joined:
May 15 22:38:17 qt-esa-rh5 openais[9908]: [CLM  ]       r(0) ip(192.168.122.12)  
May 15 22:38:17 qt-esa-rh5 openais[9908]: [SYNC ] This node is within the primary component and will provide service.
May 15 22:38:17 qt-esa-rh5 openais[9908]: [TOTEM] entering OPERATIONAL state.
May 15 22:38:17 qt-esa-rh5 openais[9908]: [CLM  ] got nodejoin message 192.168.122.11
May 15 22:38:17 qt-esa-rh5 openais[9908]: [CLM  ] got nodejoin message 192.168.122.12
May 15 22:38:17 qt-esa-rh5 openais[9908]: [CPG  ] got joinlist message from node 2
May 15 22:38:17 qt-esa-rh5 ccsd[9902]: Cluster is not quorate.  Refusing connection.
May 15 22:38:17 qt-esa-rh5 ccsd[9902]: Error while processing connect: Connection refused
May 15 22:38:17 qt-esa-rh5 ccsd[9902]: Cluster is not quorate.  Refusing connection.
May 15 22:38:17 qt-esa-rh5 ccsd[9902]: Error while processing connect: Connection refused
May 15 22:38:17 qt-esa-rh5 ccsd[9902]: Cluster is not quorate.  Refusing connection.
May 15 22:38:17 qt-esa-rh5 ccsd[9902]: Error while processing connect: Connection refused
May 15 22:38:17 qt-esa-rh5 ccsd[9902]: Initial status:: Quorate
May 15 22:38:34 qt-esa-rh5 kernel: dlm: Using TCP for communications
May 15 22:38:35 qt-esa-rh5 kernel: dlm: got connection from 2
May 15 22:38:36 qt-esa-rh5 clurgmgrd[9964]: <notice> Resource Group Manager Starting
May 15 22:38:37 qt-esa-rh5 clurgmgrd: [9964]: <notice> Forcefully unmounting /opt/ultrapower/postgresql/data
May 15 22:38:38 qt-esa-rh5 clurgmgrd: [9964]: <warning> killing process 5059 (root bash /opt/ultrapower/postgresql/data)
May 15 22:38:38 qt-esa-rh5 clurgmgrd: [9964]: <warning> killing process 8888 (root bash /opt/ultrapower/postgresql/data)
May 15 22:38:38 qt-esa-rh5 clurgmgrd: [9964]: <warning> killing process 9820 (postgres bash /opt/ultrapower/postgresql/data)
May 15 22:38:38 qt-esa-rh5 clurgmgrd: [9964]: <warning> killing process 9856 (postgres postgres /opt/ultrapower/postgresql/data)
May 15 22:38:38 qt-esa-rh5 clurgmgrd: [9964]: <warning> killing process 9858 (postgres postgres /opt/ultrapower/postgresql/data)
May 15 22:38:38 qt-esa-rh5 clurgmgrd: [9964]: <warning> killing process 9859 (postgres postgres /opt/ultrapower/postgresql/data)
May 15 22:38:38 qt-esa-rh5 clurgmgrd: [9964]: <warning> killing process 9819 (root su /opt/ultrapower/postgresql/data)
May 15 22:38:43 qt-esa-rh5 avahi-daemon[3590]: Invalid legacy unicast query packet.
May 15 22:38:43 qt-esa-rh5 avahi-daemon[3590]: Received response from host 192.168.122.1 with invalid source port 1394 on interface 'eth0.0'
May 15 22:38:43 qt-esa-rh5 avahi-daemon[3590]: Invalid legacy unicast query packet.
May 15 22:38:43 qt-esa-rh5 avahi-daemon[3590]: Invalid legacy unicast query packet.
May 15 22:38:43 qt-esa-rh5 avahi-daemon[3590]: Received response from host 192.168.122.1 with invalid source port 1394 on interface 'eth0.0'
May 15 22:38:44 qt-esa-rh5 last message repeated 2 times
May 15 22:38:54 qt-esa-rh5 clurgmgrd[9964]: <notice> Starting stopped service service:srv_post
May 15 22:38:55 qt-esa-rh5 avahi-daemon[3590]: Registering new address record for 192.168.122.13 on eth0.
May 15 22:38:55 qt-esa-rh5 avahi-daemon[3590]: Invalid legacy unicast query packet.
May 15 22:38:55 qt-esa-rh5 avahi-daemon[3590]: Received response from host 192.168.122.1 with invalid source port 1396 on interface 'eth0.0'
May 15 22:38:55 qt-esa-rh5 avahi-daemon[3590]: Invalid legacy unicast query packet.
May 15 22:38:56 qt-esa-rh5 avahi-daemon[3590]: Invalid legacy unicast query packet.
May 15 22:38:56 qt-esa-rh5 avahi-daemon[3590]: Received response from host 192.168.122.1 with invalid source port 1396 on interface 'eth0.0'
May 15 22:38:56 qt-esa-rh5 avahi-daemon[3590]: Received response from host 192.168.122.1 with invalid source port 1396 on interface 'eth0.0'
May 15 22:38:57 qt-esa-rh5 clurgmgrd[9964]: <notice> Service service:srv_post started
May 15 22:38:57 qt-esa-rh5 avahi-daemon[3590]: Received response from host 192.168.122.1 with invalid source port 1396 on interface 'eth0.0'
[root@qt-esa-rh5 ~]#

好像是说从网关上收到了什么无效的包,从而引起服务关闭。请各位大大给指点一下。

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

她如夕阳 2022-10-22 06:56:53

如果你使用rgmanager,就不要手动启服务。rgmanager启动的时候会先stop服务,然后再start

樱花落人离去 2022-10-22 06:56:53

另外,你可以使用fence_xvm代替manual fence。

梦行七里 2022-10-22 06:56:53

能详细介绍一下fencd_xvm是什么东东吗?对这个东西不太熟悉,谢谢,另:现在测试过程中出现新的提示如下:

May 16 12:49:15 qt-esa-rh5 openais[12521]: [TOTEM] entering OPERATIONAL state.
May 16 12:49:15 qt-esa-rh5 openais[12521]: [CLM  ] got nodejoin message 192.168.122.11
May 16 12:49:15 qt-esa-rh5 openais[12521]: [CLM  ] got nodejoin message 192.168.122.12
May 16 12:51:38 qt-esa-rh5 kernel: dlm: Using TCP for communications
May 16 12:51:38 qt-esa-rh5 kernel: dlm: got connection from 2
May 16 12:51:38 qt-esa-rh5 clurgmgrd[12711]: <notice> Resource Group Manager Starting
May 16 12:51:40 qt-esa-rh5 clurgmgrd: [12711]: <err> Checking Existence Of File /opt/ultrapower/postgresql/data/postgresql.conf [postgres-8:mypost] > Failed - File

Is Not Readable
May 16 12:51:40 qt-esa-rh5 clurgmgrd: [12711]: <err> Verifying Configuration Of postgres-8:mypost > Failed
May 16 12:51:40 qt-esa-rh5 clurgmgrd[12711]: <notice> stop on postgres-8 "mypost" returned 2 (invalid argument(s))
May 16 12:51:48 qt-esa-rh5 clurgmgrd[12711]: <notice> Starting stopped service service:srv_post
May 16 12:51:48 qt-esa-rh5 avahi-daemon[3620]: Registering new address record for 192.168.122.13 on eth0.
May 16 12:51:50 qt-esa-rh5 kernel: FS-Cache: Loaded
May 16 12:51:51 qt-esa-rh5 clurgmgrd[12711]: <notice> Service service:srv_post started
[root@qt-esa-rh5 data]#

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文