最近总玩CloudStack + KVM,发现在重启CloudStack服务后,host(kvm)的状态老是为alert。日志里出现如下错误提示:

ERROR [agent.manager.AgentManagerImpl] (AgentManager-Handler-7:) Monitor ClusteredVirtualMachineManagerImpl$$EnhancerByCGLIB$$121cf44e says there is an error in the connect process for 1 due to null
java.lang.NullPointerException
        at com.cloud.vm.VirtualMachineManagerImpl.fullHostSync(VirtualMachineManagerImpl.java:1643)
        at com.cloud.vm.VirtualMachineManagerImpl.processConnect(VirtualMachineManagerImpl.java:2289)
        at com.cloud.agent.manager.AgentManagerImpl.notifyMonitorsOfConnection(AgentManagerImpl.java:605)
        at com.cloud.agent.manager.AgentManagerImpl.handleConnectedAgent(AgentManagerImpl.java:1157)
        at com.cloud.agent.manager.AgentManagerImpl.access$100(AgentManagerImpl.java:142)
        at com.cloud.agent.manager.AgentManagerImpl$AgentHandler.processRequest(AgentManagerImpl.java:1235)
        at com.cloud.agent.manager.AgentManagerImpl$AgentHandler.doTask(AgentManagerImpl.java:1374)
        at com.cloud.agent.manager.ClusteredAgentManagerImpl$ClusteredAgentHandler.doTask(ClusteredAgentManagerImpl.java:618)
        at com.cloud.utils.nio.Task.run(Task.java:83)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:679)

agent日志出现提示:

2013-08-09 11:27:18,746 INFO  [cloud.agent.Agent] (Agent-Handler-3:null) Reconnecting...
2013-08-09 11:27:18,747 INFO  [utils.nio.NioClient] (Agent-Selector:null) Connecting to 20.1.134.190:8250
2013-08-09 11:27:18,855 INFO  [utils.nio.NioClient] (Agent-Selector:null) SSL: Handshake done
2013-08-09 11:27:19,422 INFO  [cloud.agent.Agent] (Agent-Handler-2:null) Proccess agent startup answer, agent id = 1
2013-08-09 11:27:19,422 INFO  [cloud.agent.Agent] (Agent-Handler-2:null) Set agent id 1
2013-08-09 11:27:19,423 INFO  [cloud.agent.Agent] (Agent-Handler-2:null) Startup Response Received: agent id = 1
2013-08-09 11:27:19,539 WARN  [cloud.agent.Agent] (UgentTask-5:null) Unable to send request: null
2013-08-09 11:27:23,856 INFO  [cloud.agent.Agent] (Agent-Handler-3:null) Connected to the server
2013-08-09 11:27:24,481 INFO  [cloud.agent.Agent] (Agent-Handler-3:null) Lost connection to the server. Dealing with the remaining commands...
2013-08-09 11:27:29,483 INFO  [cloud.agent.Agent] (Agent-Handler-3:null) Reconnecting...
2013-08-09 11:27:29,484 INFO  [utils.nio.NioClient] (Agent-Selector:null) Connecting to 20.1.134.190:8250
2013-08-09 11:27:29,580 INFO  [utils.nio.NioClient] (Agent-Selector:null) SSL: Handshake done
2013-08-09 11:27:30,223 INFO  [cloud.agent.Agent] (Agent-Handler-2:null) Proccess agent startup answer, agent id = 1
2013-08-09 11:27:30,224 INFO  [cloud.agent.Agent] (Agent-Handler-2:null) Set agent id 1
2013-08-09 11:27:30,225 INFO  [cloud.agent.Agent] (Agent-Handler-2:null) Startup Response Received: agent id = 1
2013-08-09 11:27:30,350 WARN  [cloud.agent.Agent] (UgentTask-5:null) Unable to send request: null
2013-08-09 11:27:34,581 INFO  [cloud.agent.Agent] (Agent-Handler-3:null) Connected to the server
2013-08-09 11:27:35,310 INFO  [cloud.agent.Agent] (Agent-Handler-3:null) Lost connection to the server. Dealing with the remaining commands...

重启agent、libvirtd服务,异常依然。重启host,问题还是一样。

从日志中能看出,异常是management-server在连接上cloud-agent后,刷新vm状态时问题导致的。而此时,除了vRouter,所有vm的状态均为Stoped。vRouter的状态缺为Running,就此找到问题所在。不知何故,在host上使用virsh list并不能看到vRouter,而management-server却认为他是Running状态,需要刷新一下状态,导致在management-server查询不到vRouter,所以抛出异常。这应该是一个bug,需要修复。

解决方案,删除vRoute(需要先在数据库将状态置为Stopped,执行sql   “update vm_instance set state = 'Stopped' where vm_type = 'DomainRouter';”)。

CloudStack 4.0.2 vRouter导致重启后状态不正常的更多相关文章

  1. 给虚拟机添加新硬盘并分区,fdisk查看分区,分区,重新读取分区表信息partprobe,格式化,挂载,查看分区挂载信息,自动挂载文件/etc/fstab,/etc/fstab文件错误导致重启崩溃后的修复

    1.虚拟机关机断电 2.添加硬盘 2.开机 3.fdisk -l查看刚才新添加的硬盘 [root@localhost ~]# fdisk -l 磁盘 /dev/sda:21.5 GB, 2147483 ...

  2. AndroidStudio意外崩溃,电脑重启,导致重启打开Androidstudio后所有的import都出错

    解决方案: File -> Invalidate Cashes / Restart 重新编译的时候可能会碰到下面的问题: 解决方案: 关闭Android Studio,删掉工程下的.gradle ...

  3. Hadoop0.20.203.0在关机重启后,namenode启动报错(/dfs/name is in an inconsistent state)

    Hadoop0.20.203.0在关机重启后,namenode启动报错: 2011-10-21 05:22:20,504 INFO org.apache.hadoop.hdfs.server.comm ...

  4. Weblogic console控制台密码更改后导致重启服务失败

    weblogic版本10.3.3.0 更改控制台密码后,服务重启失败,报错如下: ----------------------------------------------------------- ...

  5. 使用ehcache持久化数据到磁盘 并且在应用服务器重启后不丢失数据

    使用ehcache时如何持久化数据到磁盘,并且在应用服务器重启后不丢失数据1.如何持久化到磁盘使用cache.flush(),每次写入到cache后调用cache.flush() ,这样ehcache ...

  6. DBCP连接Oracle,数据库重启后现OALL8 is in an inconsistent state异常

    最近,DBCP连接Oracle,数据库重启后现OALL8 is in an inconsistent state异常. 版本说明 commons-dbcp-1.4.jar commons-pool-1 ...

  7. 如何解决 kubernetes 重启后,启来不来的问题

    参考了 https://blog.csdn.net/nklinsirui/article/details/80855415 最近在调研 kubeneter ,准备把线上的服务器架构再调整下,然后模拟各 ...

  8. 解决ubuntu下,QQ重启后出现个人文件夹已被占用的问题

    首先,是wine QQ的安转教程:Wine安装最新版QQ(8.9.2)的简单教程 - Powered by Discuz! 里面作者也提到了关于重启后出现个人文件夹被占用的情况. 如下: 这里,如果不 ...

  9. redis集群节点重启后恢复

    服务器重启后,集群报错: [root@SHH-HQ-NHS11S nhsuser]# redis-cli -c -h ip -p 7000ip:7000> set cc dd(error) CL ...

随机推荐

  1. mysql数据库和oracle数据库之间互相导入备份

    把从Oracle数据库导出的数据导入到MySql数据库中1. 使用默认的结束符号导入到MySql数据库中:    LOAD DATA LOCAL INFILE 'd:/oracle.txt' IGNO ...

  2. 解决wordpress无法发送邮件的问题|配置好WP-Mail-SMTP的前提

    我的WordPress主机是万网的,配置WP-Mail-SMTP时一直无法发送邮件,导致设置失败.经过多次询问度娘才找到了解决wordpress无法发送邮件的方法,在这里把这个wordpress技巧分 ...

  3. 前端代码编辑器ace 语法验证

    本文主要是介绍实际项目中如何加入语法检测功能.官方文档链接https://github.com/ajaxorg/ace/wiki/Syntax-validation 代码编辑器ace,使用webwor ...

  4. Mybatis异常处理之MySQL Connector Java] will not be managed by Spring

    很长时间没写后台代码有点生疏了,这不今天又出点小插曲,写个文章记录下. 由于要上传点数据到后台,顺手整了个mybatis+springmvc.在保存数据时出现了异常. Creating a new S ...

  5. bzoj 1816 二分

    思路:二分答案,然后我们贪心地先不填最小的一堆,看在最小的一堆消耗完之前能不能填满其他堆. #include<bits/stdc++.h> #define LL long long #de ...

  6. AngularJS Intellisense in Visual Studio 2012

    Recently, a lot of people have asked for Intellisense support for AngularJS in the Visual Studio HTM ...

  7. vue开发关于微信授权登录以及路由mode模式(Hash|History)和手机平台(andriod|IOS)不得不说的故事

    引用链接: https://segmentfault.com/a/1190000010753247?utm_source=tuicool&utm_medium=referral

  8. BZOJ4653 [NOI2016]区间 [线段树,离散化]

    题目传送门 区间 Description 在数轴上有 n个闭区间 [l1,r1],[l2,r2],...,[ln,rn].现在要从中选出 m 个区间,使得这 m个区间共同包含至少一个位置.换句话说,就 ...

  9. python笔记五:IO与文件

    1.python IO:  Python提供了两个内置函数从标准输入读入一行文本,默认的标准输入是键盘:  1)raw_input([prompt]) 函数从标准输入读取一个行,并返回一个字符串  2 ...

  10. Spring框架中ModelAndView、Model、ModelMap区别 (转)

    原文地址:http://www.cnblogs.com/google4y/p/3421017.html SPRING框架中ModelAndView.Model.ModelMap区别   注意:如果方法 ...