欢迎来到 黑吧安全网 聚焦网络安全前沿资讯,精华内容,交流技术心得!

搭建heartbeat运行后发现nginx及VIP不能正常启动

来源:本站整理 作者:佚名 时间:2015-06-17 TAG: 我要投稿

问题简介
     搭建heartbeat运行后发现nginx及VIP不能正常启动,在查看日志后发现nginx已经启动了但是随后有停止了,通过错误日志上的错误我想了半天在重启nginx时发现80端口被占用,随后查看进程发现tomcat占用了80端口,在停止掉tomcat后并重启heartbeat服务后发现问题解决,通过这件事要学习到今后学习及工作中一定要细心,不要因为低级的错误导致工作效率的降低!同时也说明了自己的经验不足,所以在以后的日子还要努力学习!
 
[root@webserver ha.d]# /etc/init.d/heartbeat restartStopping High-Availability services: Done.Waiting to allow resource takeover to complete:Done.Starting High-Availability services: INFO:  Resource is stoppedDone.[root@webserver ha.d]# ps aux |grep nginx  //发现nginx没有启动root     13813  0.0  0.0   5980   748 pts/1    S+   22:47   0:00 grep nginx
[root@webserver ha.d]# ifconfig   //流动IP也没有出现eth0      Link encap:Ethernet  HWaddr 00:0C:29:E6:9E:DF            inet addr:192.168.1.111  Bcast:192.168.1.255  Mask:255.255.255.0          inet6 addr: fe80::20c:29ff:fee6:9edf/64 Scope:Link          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:3960 errors:0 dropped:0 overruns:0 frame:0          TX packets:3154 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000           RX bytes:361574 (353.0 KiB)  TX bytes:1111055 (1.0 MiB)          Interrupt:19 Base address:0x2000 eth1      Link encap:Ethernet  HWaddr 00:0C:29:E6:9E:E9            inet addr:192.168.217.111  Bcast:192.168.217.255  Mask:255.255.255.0          inet6 addr: fe80::20c:29ff:fee6:9ee9/64 Scope:Link          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:14294 errors:0 dropped:0 overruns:0 frame:0          TX packets:15011 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000           RX bytes:2645965 (2.5 MiB)  TX bytes:2728129 (2.6 MiB)          Interrupt:19 Base address:0x2080 lo        Link encap:Local Loopback            inet addr:127.0.0.1  Mask:255.0.0.0          inet6 addr: ::1/128 Scope:Host          UP LOOPBACK RUNNING  MTU:65536  Metric:1          RX packets:601 errors:0 dropped:0 overruns:0 frame:0          TX packets:601 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:0           RX bytes:155375 (151.7 KiB)  TX bytes:155375 (151.7 KiB)
[root@webserver ~]# less  /var/log/ha-log   //查看日志发现nginx服务启动了又停止了
ResourceManager(default)[14554]:        2015/06/08_23:09:43 info: Running /etc/ha.d/resource.d/IPaddr 192.168.1.110/24/eth1:0 start
IPaddr(IPaddr_192.168.1.110)[14710]:    2015/06/08_23:09:43 INFO: Adding inet address 192.168.1.110/24 to device eth1 (with label eth1:0)
IPaddr(IPaddr_192.168.1.110)[14710]:    2015/06/08_23:09:43 INFO: Bringing device eth1 up
IPaddr(IPaddr_192.168.1.110)[14710]:    2015/06/08_23:09:43 INFO: /usr/libexec/heartbeat/send_arp -i 200 -r 5 -p /var/run/resource-agents/send_arp-192.168.1.110 eth1 192.168.1.110 auto not_used not_used
/usr/lib/ocf/resource.d//heartbeat/IPaddr(IPaddr_192.168.1.110)[14684]: 2015/06/08_23:09:43 INFO:  Success
ResourceManager(default)[14554]:        2015/06/08_23:09:43 info: Running /etc/init.d/nginx  start
ResourceManager(default)[14554]:        2015/06/08_23:09:46 ERROR: Return code 1 from /etc/init.d/nginx
ResourceManager(default)[14554]:        2015/06/08_23:09:46 CRIT: Giving up resources due to failure of nginx
ResourceManager(default)[14554]:        2015/06/08_23:09:46 info: Releasing resource group: webserver 192.168.1.110/24/eth1:0 nginx

[1] [2]  下一页

【声明】:黑吧安全网(http://www.myhack58.com)登载此文出于传递更多信息之目的,并不代表本站赞同其观点和对其真实性负责,仅适于网络安全技术爱好者学习研究使用,学习中请遵循国家相关法律法规。如有问题请联系我们,联系邮箱admin@myhack58.com,我们会在最短的时间内进行处理。
  • 最新更新
    • 相关阅读
      • 本类热门
        • 最近下载