免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3672 | 回复: 6
打印 上一主题 下一主题

[高级应用] HA异常,如何干掉这2个进程. [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-10-15 15:49 |只看该作者 |倒序浏览
使用Graceful方式停掉cluster后,状态异常.应用停了,vg也varyoff了,业务IP也release了,但节点状态还是up..

Cluster: boss_cluster   (1251577123)
Thu Oct 15 09:40:48 2009
                State: UP               Nodes: 2
                SubState: UNSTABLE


        Node: NPDTV1            State: UP
           Interface: NPDTV1_boot (1)           Address: 192.168.10.101
                                                State:   DOWN
           Interface: NPDTV1_stb (1)            Address: 192.168.11.101
                                                State:   DOWN
           Interface: npdtv1 (0)                Address: 0.0.0.0
                                                State:   DOWN
           Interface: NPDTV1_svcip (1)          Address: 172.16.10.103
                                                State:   DOWN
           Resource Group: app_res                      State:  Error

        Node: NPDTV2            State: UP
           Interface: NPDTV2_boot (1)           Address: 192.168.10.102
                                                State:   UP
           Interface: NPDTV2_stb (1)            Address: 192.168.11.102
                                                State:   UP
           Interface: npdtv2 (0)                Address: 0.0.0.0
                                                State:   UP
           Interface: NPDTV2_svcip (1)          Address: 172.16.10.104
                                                State:   UP
           Resource Group: app_res                      State:  Unmanaged
           Resource Group: db_res                       State:  On line

ps -ef |cluster发现进程如下:

# ps -ef |grep cluster
    root 463098 180458   0 16:21:40      -  0:37 /usr/es/sbin/cluster/clstrmgr
    root 467172 180458   0 16:21:39      -  0:12 /usr/es/sbin/cluster/clcomd -d
    root 516162 180458   0 17:01:15      -  0:00 haemd HACMP 1 boss_cluster SECNOSUPPORT
    root 544874 692224   1 09:45:44      -  0:00 /bin/ksh /usr/es/sbin/cluster/events/config_too_long 360 TE_FAIL_NODE
    root 557278      1   0 09:59:38      -  0:00 /bin/ksh /usr/es/sbin/cluster/utilities/clstop -N -g
    root 626786 180458   0 17:01:16      -  0:00 harmad -t HACMP -n boss_cluster
    root 692224 463098   0 09:45:44      -  0:00 /usr/es/sbin/cluster/clstrmgr
    root 745582 401616   0 10:02:55  pts/1  0:00 grep cluster
    root 762108      1   0 09:39:44      -  0:00 /bin/ksh /usr/es/sbin/cluster/utilities/clstop -N -g


重新启动cluster..报错:
Verifying Cluster Configuration Prior to Starting Cluster Services.

WARNING: Node(s):  NPDTV1 requested to start cluster services.
These nodes are already running cluster services and will not be started.

现在cluster是停也停不了,启动也启动不了..请问下大家,如何结束harmad -t HACMP -n boss_cluster  和harmad -t HACMP -n boss_cluster这个进程.

论坛徽章:
0
2 [报告]
发表于 2009-10-15 21:16 |只看该作者
重启机子应该能解决一时之急
不过还是看看hacmp.out的错误信息先

论坛徽章:
0
3 [报告]
发表于 2009-10-16 08:44 |只看该作者
反正应用也停了,最快速的办法就是重启机器。

HA可能是有问题了,然后再慢慢查原因吧。

论坛徽章:
0
4 [报告]
发表于 2009-10-16 10:51 |只看该作者
呵呵,重启的确能解决问题.不过我想不用重新启动就解决最好了..

关于停双机失败,我仔细检查了下,是应用的起停脚本有问题,停应用失败,导致双机停止失败,挂在那里了.
重新检查修改了应用的起停脚本,2边检查确认一致后,双机切换和停止都正常..


                clstat - HACMP Cluster Status Monitor
                -------------------------------------

Cluster: boss_cluster   (1251577123)
Fri Oct 16 10:36:34 CDT 2009
                State: UP               Nodes: 2
                SubState: STABLE

        Node: NPDTV1            State: DOWN
           Interface: NPDTV1_boot (1)           Address: 192.168.10.101
                                                State:   DOWN
           Interface: NPDTV1_stb (1)            Address: 192.168.11.101
                                                State:   DOWN
           Interface: npdtv1 (0)                Address: 0.0.0.0
                                                State:   DOWN
           Interface: NPDTV1_svcip (1)          Address: 172.16.10.103
                                                State:   DOWN

        Node: NPDTV2            State: UP
           Interface: NPDTV2_boot (1)           Address: 192.168.10.102
                                                State:   UP
           Interface: NPDTV2_stb (1)            Address: 192.168.11.102
                                                State:   UP
           Interface: npdtv2 (0)                Address: 0.0.0.0
                                                State:   UP
           Interface: NPDTV2_svcip (1)          Address: 172.16.10.104
                                                State:   UP
           Resource Group: db_res                       State:  On line

这里,写下自己的一点心得,希望对大家有点小小的帮助.

1 在配置双机后,双机同步时必须要做的,并且不能有报错,这样可以保证双机配置的一致性.避免在以后的切换中出现问题.

2 关于数据库和应用的启停脚本,2边一定要保持一致.并且启停脚本要进行验证,确认直接在shell下运行脚本的时候能够启动和停止数据库和应用.如果直接运行脚本就报错的话,那么在双机切换过程中,调用脚本肯定也会报错,导致双机切换失败.另外,别忘了给脚本加上可执行权限.

3 使用clstop停止双机的时候,节点最后的状态应该是down的,比如Node: NPDTV1            State: DOWN .如果资源组和网卡接口都是down状态,而节点状态为up,那么肯定有问题,需要检查HACMP.OUT日志查出问题原因.其实大部分原因应该还是双机的配置问题或者起停脚本的问题.

4 配置完双机后,一定要模拟不同的情形进行切换测试,比如halt机器,拔网卡,停应用,停数据库等等保证系统在以后出现这些问题的时候能够正常切换.

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
5 [报告]
发表于 2009-10-16 10:55 |只看该作者
如果graceful没有正常停下来HA的进程,可以用force听呀,然后找到问题,解决问题

论坛徽章:
0
6 [报告]
发表于 2009-10-16 11:01 |只看该作者
原帖由 RS9000 于 2009-10-16 10:55 发表
如果graceful没有正常停下来HA的进程,可以用force听呀,然后找到问题,解决问题


2种方式停好像都有问题的...

最后检查HACMP.OUT发现是应用的启停脚本有问题..

论坛徽章:
0
7 [报告]
发表于 2009-10-16 13:49 |只看该作者
有时config_too_long?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP