启动CloudStack管理服务时遇到的一个奇怪的问题

笔记本有一套简单的CloudStack环境,用来做一些简单的测试,装在VMware的workstation里。

管理节点有两个网卡,用作内外网,eth0用作内网:192.168.0.2,eth1用作外网:172.16.1.2。经常装来装去的有时候也很烦,昨天索性吧eth1关闭,用命令:

#ifdown eth1

在UI上配了几个全局设置后,重启CloudStack服务,发现服务无法启动,明明刚才还可以用。就检查了一下log,显示为:

写道
2014-04-28 09:04:45,980 INFO [c.c.u.DatabaseIntegrityChecker] (main:null) Grabbing lock to check for database integrity.
2014-04-28 09:04:45,982 INFO [c.c.u.DatabaseIntegrityChecker] (main:null) Performing database integrity check
2014-04-28 09:04:45,986 DEBUG [c.c.u.DatabaseIntegrityChecker] (main:null) No duplicate hosts with the same local storage found in database
2014-04-28 09:04:45,986 DEBUG [c.c.u.d.VersionDaoImpl] (main:null) Checking to see if the database is at a version before it was the version table is created
2014-04-28 09:04:45,991 INFO [o.a.c.s.l.CloudStackExtendedLifeCycle] (main:null) Configuring CloudStack Components
2014-04-28 09:04:46,611 ERROR [n.s.e.d.MulticastRMICacheManagerPeerProvider] (main:null) Error starting heartbeat. Error was: No such device
java.net.SocketException: No such device
at java.net.PlainDatagramSocketImpl.join(Native Method)
at java.net.AbstractPlainDatagramSocketImpl.join(AbstractPlainDatagramSocketImpl.java:168)
at java.net.MulticastSocket.joinGroup(MulticastSocket.java:300)

 从网上搜了一下解决方法,有建议是重新初始化,那好,我就执行了一遍:

cloudstack-setup-databases cloud:password@localhost --deploy-as=root

cloudstack-setup-management

熟悉cloudstack安装的都知道,这样执行下去,所有的配置以及数据库就都重置为默认信息了。等服务重启发现,仍然报相同的错误,很奇怪。搜索这个问题都跑到日文网站去了,看到一个好像类似网关路由一类的词语,突然让我想到eth1关闭的这个操作,所以怀疑与此有关,所以重新打开eth1

# ifup eth1

再次重启cloudstack服务,一切正常。

深入研究,怀疑可能与cloudstack需要默认网关有关。

检查静态路由如下:

写道
关闭eth1的状态
[root@ccp43 ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 1002 0 0 eth0

开启eth1的状态
[root@ccp43 ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.1.0 * 255.255.255.0 U 0 0 0 eth1
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 1002 0 0 eth0
link-local * 255.255.0.0 U 1003 0 0 eth1
default 172.16.1.254 0.0.0.0 UG 0 0 0 eth1

 所以,个人认为这与cloudstack在启动时还会检查默认路由,如果没有,则会报错,没有此设备,这种情况是非常偶尔的操作下才会出现吧。

有空再看看代码里怎么写吧。

猜你喜欢

转载自tanthalas.iteye.com/blog/2111915
今日推荐