免费注册 查看新帖 |

Chinaunix

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

redhat cluster suite与apache配置中关于floating ip的问题? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-09-28 22:01 |只看该作者 |倒序浏览
目前的实验环境为:
node1  10.1.5.161  #cluster  apache
node2  10.1.5.162  #cluster  apache
node3  10.1.5.163  #gnbd_server
floating ip 为10.1.5.169
目前实验的阶段:
ccsd,cman,fenced,clvmd,gfs,rgmanager已经能够正常启动;
cluster.conf的配置如下

  1. <?xml version="1.0" ?>
  2. <cluster config_version="3" name="web_cluster">
  3.         <fence_daemon clean_start="0" post_fail_delay="0" post_join_delay="3"/>
  4.         <clusternodes>
  5.                 <clusternode name="node1" votes="1">
  6.                         <fence>
  7.                                 <method name="1"/>
  8.                         </fence>
  9.                 </clusternode>
  10.                 <clusternode name="node2" votes="1">
  11.                         <fence>
  12.                                 <method name="1"/>
  13.                         </fence>
  14.                 </clusternode>
  15.         </clusternodes>
  16.         <cman expected_votes="1" two_node="1"/>
  17.         <fencedevices>
  18.                 <fencedevice agent="fence_manual" name="httpd"/>
  19.         </fencedevices>
  20.         <rm>
  21.                 <failoverdomains>
  22.                         <failoverdomain name="httpd" ordered="1" restricted="0">                                <failoverdomainnode name="node1" priority="2"/>
  23.                                 <failoverdomainnode name="node2" priority="1"/>
  24.                         </failoverdomain>
  25.                 </failoverdomains>
  26.                 <resources>
  27.                         <clusterfs device="/dev/gnbd/gfs" force_unmount="0" fstype="gfs" mountpoint="/gfs" name="web_content" options="-t gfs"/>
  28.                         <ip address="10.1.5.169" monitor_link="1"/>
  29.                         <script file="/etc/rc.d/init.d/httpd" name="httpd"/>
  30.                 </resources>
  31.                 <service autostart="1" name="httpd">
  32.                         <clusterfs ref="web_content"/>
  33.                         <ip ref="10.1.5.169"/>
  34.                         <script ref="httpd"/>
  35.                 </service>
  36.         </rm>
  37. </cluster>
复制代码


resource中,配置的ip address为floating ip 10.1.5.169; fs resource为,通过gnbd导入的/dev/gnbd/gfs,mount到/gfs。
目前的疑惑为:
1. 在配置 httpd.conf时,listen的配置。目前配置成了10.1.5.169,但是无法正常启动httpd,显示为
  1. Cannot assign requested address: make_sock: could not bind to address 10.1.5.169:80
复制代码

显然和配置成floating ip 有关。请问这一部分该如何去设?

2.目前两台设备通过gnbd的导入来实现GFS文件的访问,但是在system-config-cluster配置工作中,配置fs的resource时,device是已经导入好的/dev/gnbd/gfs。我们知道,在导入时还需要一系列的命令:
modprobe gnbd
gnbd_import -v -i node3

请问这些命令是在什么时候执行合适?

谢谢

论坛徽章:
0
2 [报告]
发表于 2006-09-29 13:11 |只看该作者
帮忙,顶一下

论坛徽章:
0
3 [报告]
发表于 2006-10-09 13:58 |只看该作者
在网上搜了很长时间,但是仍然没有头绪。又重新配了一遍。还是无法正常启动:

  1. Oct  9 13:56:48 node1 clurgmgrd[8696]: <err> #43: Service httpd has failed; can not start.
  2. Oct  9 13:56:49 node1 clurgmgrd[8696]: <crit> #13: Service httpd failed to stop cleanly
复制代码

论坛徽章:
0
4 [报告]
发表于 2006-10-13 13:49 |只看该作者
问题解决了。
造成这种情况的原因是由于:在service中添加resouce时,需要一些特别的注意。有可能在floating ip还没有启动时,就去start httpd的script,当然会报无法启动。因为httpd需要floating ip提前启动为基础。

我从http://unixnotebook.blogspot.com ... uster-4-how-to.html查找到的建议是,只要在向service中添加resource时注意顺序即可——即最底层的服务,让其处在最上边的位置(It appears that the top most layer is the base layer, and the lower layers are the things that rely on the base layer. )。但是我在实验中并没有通过该方法测试成功。

我使用的方法是:
首先添加IP地址的resource,然后在该service上添加。而不是重新添加(见图)



以上注意事项并没有在redhat的文档中找到。

cluster2.JPG (26.31 KB, 下载次数: 25)

cluster2.JPG

cluster1.JPG (5.98 KB, 下载次数: 24)

cluster1.JPG

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
5 [报告]
发表于 2006-10-13 14:34 |只看该作者
感谢分享经验。。。

论坛徽章:
0
6 [报告]
发表于 2006-10-13 16:01 |只看该作者
前前后后搞了一个月,还隔一国庆。

现在的一些调试心得是:
1.如果service 没有启动,首先查看/var/log/message日志。
2.如果日志没有有用信息,采用排除法。在service中删除几个resource试一下,一个resource能启动后,再添加一个。总会定位故障点的。
3.redhat 的cluster cuite 的floating ip,使用ifconfig -a并不能正常看到常规的ethX:1描述,需要去ping floating ip才能确定。

其实在实验过程中,最主要的问题还是文档资源太少。包括/var/log/message日至中提供的信息也不是全。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP