【时间】2014年2月25日

【平台】ubuntu 12.04.3

    openstack havana  with nova-network in multi-host

【日志】实例启动时输出的日志内容如下:

...

...- util.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [/120s]: url error [[Errno ] Connection refused]

... - DataSourceEc2.py[CRITICAL]: giving up on md after  seconds

...

【情景】multi-host模式下,由nova-network提供网络服务。当使用官方提供的ubuntu12.04镜像启用新的实例时,无法获得实例的用户名,也无法注入ssh秘钥。

最后发现实例启动时输出的日志有多行WARNING信息,提示获取metadata数据失败。

【分析】因为本人的nova相关模块部署的时间较早,版本较低,且官方安装文档提到:

nova-api-metadata service. Accepts metadata requests from instances. The nova-api-metadata service is generally only used when you run in multi-host mode with nova-network installations.

On Debian systems, it is included in the nova-api package, and can be selected through debconf.

所以根据早期版本的官方安装文档,compute节点没有安装nova-api-metadata模块。然而,根据新的官方安装文档:

So that the nova-network service can forward metadata requests on each compute node, each compute node must install the nova-api-metadata service, as follows:

# apt-get install nova-network nova-api-metadata

在multi-host模式下,metadata服务请求由nova-network来转发,故每个compute节点上都需要安装nova-api-metadata模块。

【解决】

在compute节点上:

#apt-get install nova-api-metadata

#service nova-compute restart;service nova-network restart;service nova-api-metadata restart

在controller节点上:

#service nova-scheduler restart;service nova-api restart;service nova-cert restart;service nova-conductor restart;service nova-novncproxy restart;service nova-consoleauth restart

注意:如果很久前部署的openstack平台,那么安装nova-api-metadata模块之后,可能出现版本兼容问题。详见另一博文。

【参考】

http://docs.openstack.org/havana/install-guide/install/apt/content/compute-service.html

http://docs.openstack.org/havana/install-guide/install/apt/content/nova-network.html

http://openstack.redhat.com/forum/discussion/282/how-to-fix-sshping-to-vms-metadata-api-issue/p1

http://www.vpsee.com/2011/11/how-to-solve-datasourceec2-pywarning-http169-254-169-254-failed-url-error-problem/

https://answers.launchpad.net/nova/+question/159317

http://docs.openstack.org/admin-guide-cloud/content/section_metadata-service.html

http://www.chenshake.com/http169-254-169-2542009-04-04meta-datainstance-id-failed-url-error-errno-111-connection-refused/

http://blog.csdn.net/lynn_kong/article/details/9115033

http://blog.csdn.net/lynn_kong/article/details/9146397

http://blog.csdn.net/gtt116/article/details/17997053

https://bugs.launchpad.net/neutron/+bug/1174657

【openstack报错】【metadata问题】‘http://169.254.169.254/2009-04-04/meta-data/instance-id’ failed : url error [[Errno 111] Connection refused]的更多相关文章

  1. python pip install 报错TypeError: unsupported operand type(s) for -=: 'Retry' and 'int' Command "python setup.py egg_info" failed with error code 1 in

    pip install http://download.pytorch.org/whl/cu80/torch-0.2.0.post3-cp27-cp27mu-manylinux1_x86_64.whl ...

  2. Xcode7 beta 网络请求报错:The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.

    Xcode7 beta 网络请求报错:The resource could not be loaded because the App Transport Xcode7 beta 网络请求报错:The ...

  3. codis3.2安装报错dashboard.go:369: [PANIC] call rpc create-proxy to dashboard 127.0.0.1:18080 failed的处理

    codis3.2安装报错dashboard.go:369: [PANIC] call rpc create-proxy to dashboard 127.0.0.1:18080 failed的处理 执 ...

  4. nginx 报错 connect() failed (111: Connection refused) while connecting to upstream

    公司网站搬迁到新服务器后,发现站点访问不了,network里面提示502,查看相关的server配置,感觉没有什么问题,经过测试发现txt.html.等非php文件能够直接访问,也就是php访问不了, ...

  5. salt '*' state.highstate 报错找不到文件,环境如下No Top file or master_tops data matches found.

    salt '*' state.highstate 报错找不到文件,环境如下No Top file or master_tops data matches found. file_roots:    b ...

  6. Nginx报错 connect() failed (111: Connection refused) while connecting to upstream 的解决方法

    今天访问公司的网站突然报错,抛出一些英文,提示看一下Nginx的error.log日志: cd  /usr/local/nginx/logs/  看到了error.log ,下一步 tail -n 2 ...

  7. nginx报错111: Connection refused

    最近遇到了nginx疯狂抛错,access.log一天一共5W多条,但error.log中有大概9K多条,基本都是111: Connection refused,这到底是为什么呢? 从日志看起 我们还 ...

  8. OpenStack报错:MessagingTimeout: Timed out waiting for a reply to message ID

    L3.agent中出现大量消息超时错误,对网络的操作各种异常. 报错如下: -- :: ERROR neutron.agent.l3.agent [req-db9207e6--4f23-8c19-0d ...

  9. 解决kylin sync table报错:MetaException(message:java.lang.ClassNotFoundException Class org.apache.hive.hcatalog.data.JsonSerDe not found

    在kylin-gui中sync表default.customer_visit时报错: -- ::, ERROR [http-bio--exec-] controller.BasicController ...

随机推荐

  1. SGU 186

    总是拆最短的链子  连接长的链子   贪心.... #include <cstdio> #include <cstring> #include <cmath> #i ...

  2. saltstack远程操作WINDOWS的POWERSHELL脚本

    这个东东,花了两天来查找资料和测试,终于算是搞定.作记录: 直接在MASTER上执行的命令: salt '*' cmd.script salt://scripts/windows_task.ps1 a ...

  3. [模拟]ZOJ3485 Identification Number

    题意:给了一串15位或18位的身份证号码,求 在改变最少位数的情况下, 输出正确合法的身份证号 合法的身份证 是按照以下规则: 前6位以及“Order code”三位  一定合法 其中X是根据前17位 ...

  4. 【转】notepad++ 应用学习 -- 列模式,十六进制模式

      Notepad++ 顾名思义,是一个比notepad(Windows下叫记事本)的功能更强的编辑器. 总以为notepad++小巧轻盈,而且开源,要比UE(UltraEdit)好用.因为她支持的视 ...

  5. ANDROID_MARS学习笔记_S01_005CheckBox

    一. 1.checkbox_layout.xml <?xml version="1.0" encoding="utf-8"?> <Linear ...

  6. nyist 510昂贵的聘礼

    /* 好好的图论题啊,最短路的应用,dijkstra算法 */ #include <iostream> using namespace std; const int INF=100000; ...

  7. ActiveMQ可靠性机制

    消息的签收(Acknowledgment): 客户端成功接收一条消息的标志是这条消息被签收. 成功接收一条消息一般包括如下三个阶段: (1) 客户端接收消息  (2) 客户端处理消息   (3) 消息 ...

  8. python学习笔记八--动态类型

    一.变量,对象,引用: 1. 变量: 2. 对象:均包含了一个头部信息,有以下两部分内容 a.对象的数据类型, b.引用计数器:纪录当前引用货指向该对象的数量,一旦计数器被清零,该对象的内存空间就会被 ...

  9. 关于Firefox浏览器如何支持ActiveX控件,一个小的Hellow World

    今天尝试开发一个Firefox的插件.虽然比较简单,网上也有很多教程,但是感觉一些教程写的比较麻烦,在初步的开发过程中并没有用到那些东西,于是自己把开发过程记录下来.我是根据Mozilla官方教程开发 ...

  10. DOCTYPE, HTML和XHTML, Strict DTD和Transitional DTD, Quirks Mode和Standard Mode

    在HTML里面声明DOCTYPE一般会有以下几种: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ...