====环境==

openstack :kilo

CentOS : 7

====问题===

在没有关vm的情况下,重启了controller。

问题一:

在使用nova service-list 或者openstack-status的时候或者其他认证需求的时候出现以下错误

ERROR: openstack Unable to establish connection to http://controller:35357/v3/auth/tokens

ConnectionRefused: Unable to establish connection to http://controller:35357/v3/auth/tokens

Authorization Failed: Unable to establish connection to http://controller:35357/v3/tokens

 == Keystone users ==
/usr/lib/python2./site-packages/keystoneclient/shell.py:: DeprecationWarning: The keystone CLI is deprecated in favor of python-openstackclient. For a Python library, continue using python-keystoneclient.
'python-keystoneclient.', DeprecationWarning)
Authorization Failed: Unable to establish connection to http://controller:35357/v3/tokens
== Glance images ==
Unable to establish connection to http://controller:35357/v3/auth/tokens
== Nova managed services ==
No handlers could be found for logger "keystoneclient.auth.identity.generic.base"
ERROR (ConnectionRefused): Unable to establish connection to http://controller:35357/v3/auth/tokens
== Nova networks ==
No handlers could be found for logger "keystoneclient.auth.identity.generic.base"
ERROR (ConnectionRefused): Unable to establish connection to http://controller:35357/v3/auth/tokens
== Nova instance flavors ==
No handlers could be found for logger "keystoneclient.auth.identity.generic.base"
ERROR (ConnectionRefused): Unable to establish connection to http://controller:35357/v3/auth/tokens
== Nova instances ==
No handlers could be found for logger "keystoneclient.auth.identity.generic.base"
ERROR (ConnectionRefused): Unable to establish connection to http://controller:35357/v3/auth/tokens

  

问题二:

解决问题一之后发现dashboard无法正常启动了:

ImportError: Could not import settings 'openstack_dashboard.settings' (Is it on sys.path? Is there an import error in the settings file?): No module named main

 [root@controller system]# systemctl status httpd.service
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─openstack-dashboard.conf
Active: failed (Result: exit-code) since Tue -- :: CST; 15min ago
Process: ExecStartPre=/usr/bin/python /usr/share/openstack-dashboard/manage.py collectstatic --noinput --clear (code=e Dec :: controller python[]: File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line , in __getat
Dec :: controller python[]: self._setup(name)
Dec :: controller python[]: File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line , in _setup
Dec :: controller python[]: self._wrapped = Settings(settings_module)
Dec :: controller python[]: File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line , in __init
Dec :: controller python[]: % (self.SETTINGS_MODULE, e)
Dec :: controller python[]: ImportError: Could not import settings 'openstack_dashboard.settings' (Is it on sys.
Dec :: controller systemd[]: httpd.service: control process exited, code=exited status=
Dec :: controller systemd[]: Failed to start The Apache HTTP Server.
Dec :: controller systemd[]: Unit httpd.service entered failed state.

openstack-dashboard也出现了变化

[root@controller httpd.service.d]# openstack-status
== Nova services ==
openstack-nova-api: active
openstack-nova-cert: active
openstack-nova-compute: active
openstack-nova-network: inactive (disabled on boot)
openstack-nova-scheduler: active
openstack-nova-conductor: active
== Glance services ==
openstack-glance-api: active
openstack-glance-registry: active
== Keystone service ==
openstack-keystone: active
== Horizon service ==
openstack-dashboard: uncontactable
== neutron services ==
neutron-server: active

问题三:

使用nova boot 创建vm的时候出现错误:

 ERROR (ClientException): The server has either erred or is incapable of performing the requested operation. (HTTP ) (Request-ID: req-2f5571f4-aa54-4d45-a096-cb8797c5ff7a)

 ConnectionRefused: Unable to establish connection to http://controller:9696/v2.0/ports.json?tenant_id=

  ]# neutron agent-list
  Unable to establish connection to http://controller:9696/v2.0/agents.json

 

  

=======解决方案===

问题一的解决方案:

 ]# netstat -anp|grep         //使用命令查看是否有这个服务端口

 如果没有35357 端口
]# vim /etc/keystone/keystone.conf admin_port = //取消注释 重启keystone服务
在kilo中 keystone 服务名称为openstack-keystone.service
]# systemctl enable openstack-keystone.service && systemctl restart openstack-keystone.service ---------验证---------------
[root@controller ~]# netstat -anp |grep tcp 0.0.0.0: 0.0.0.0:* LISTEN /python [root@controller ~]# nova service-list
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+
| | nova-console | controller | internal | enabled | up | --27T08::16.000000 | - |
| | nova-cert | controller | internal | enabled | up | --27T08::16.000000 | - |
| | nova-conductor | controller | internal | enabled | up | --27T08::16.000000 | - |
| | nova-scheduler | controller | internal | enabled | up | --27T08::17.000000 | - |
| | nova-compute | controller | nova | enabled | up | --27T08::12.000000 | - |
| | nova-consoleauth | controller | internal | enabled | up | --27T08::16.000000 | - |
| | nova-compute | compute1 | nova | enabled | up | --27T08::20.000000 | - |
+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+ 问题一解决

  

问题二的解决方案:

I have resolved the "openstack service create" problem following this steps :

HTTP and KEYSTONE service sharing the same port, so stop httpd and start openstack-keystone.service. Edit /etc/keystone/keystone.conf and replace "hostname or ip" to "localhost":

connection = mysql://keystone:openstack@localhost/keystone

Remember to stop service httpd and enable start service keystone: - systemctl stop httpd.service - systemctl enable openstack-keystone.service => systemctl start openstack-keystone.service

And finally, exec "openstack service create --name keystone --description "OpenStack Identity" identity" command.

Most important to remember, the dashboard horizon use apache so that keystone and apache service must be running. Into keystone.conf and wsgi-keystone.conf occur bind a single interface on ports  and  instead of all interface "*" or "0.0.0.0":

edit /etc/keystone/keystone.conf => set admin_bind_host = <ip_mgmt> => set public_bind_host = <ip_mgmt>
edit /etc/httpd/conf.d/wsgi-keystone.conf => set Listen 127.0.0.1: => Listen 127.0.0.1: => same for VirtualHost 127.0.0.1: &
After service openstack-keystone.service and httpd.service restart, both process will be running in the same time. 参考源网址:
https://ask.openstack.org/en/question/66833/kilo-on-centos7-keystone-throws-http-500-except-when-using-os_token/

问题三的解决方案:

 查看9696端口:

 ]# netstat -anp|grep 

 如果没有端口开启,查看下面配置文件

 ]# vim /etc/neutron/neutron.conf
bind_port = 重启neutron服务 ]# systemctl restart neutron-server neutron-dhcp-agent neutron-l3-agent neutron-metadata-agent neutron-openvswitch-agent ]# netstat -anp|grep
tcp 0.0.0.0: 0.0.0.0:* LISTEN /python2 ============验证======= [root@controller etc]# neutron agent-list
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+
| id | agent_type | host | alive | admin_state_up | binary |
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+
| 2c0d7171-ae4d-467f-8a24-14d0c683aefb | Open vSwitch agent | controller | :-)| True | neutron-openvswitch-agent |
| 32eb2441-daf9-4f48-8cf6-2a11c3140426 | Metadata agent | controller | :-) | True | neutron-metadata-agent |
| 54c7a92d-2ceb--939f-31a55b34952c | DHCP agent | controller | :-) | True | neutron-dhcp-agent |
| aca60f17-955a-41fc--1387efa6574e | L3 agent | controller | :-) | True | neutron-l3-agent |
| ba6ebc7d-b15f-44d2-a515-17efdd5e3472 | Open vSwitch agent | compute1 | :-) | True | neutron-openvswitch-agent |
+--------------------------------------+--------------------+------------+-------+----------------+---------------------------+

[原]openstack-kilo--issue(十)ERROR: openstack Unable to establish connection to http://controller:35357/v3/auth/tokens的更多相关文章

  1. openstack compute service list Unable to establish connection to http://controller:8774/v2.1/os-services: ('Connection aborted.', BadStatusLine("''",))

    8774是nova的端口号,所以我就逐一查看nova的日志文件. tail -f /var/log/nova/nova-conductor.log 2019-06-13 08:24:53.559 44 ...

  2. Unable to establish connection to tokens

    安装openstack后遇到的第一个问题. 执行命令nova list得到如下结果: [root@localhost ~(keystone_admin)]# nova list No handlers ...

  3. Openstack(Kilo)安装系列之Keystone(五)

    Create OpenStack client environment scripts To create the scripts Create client environment scripts ...

  4. [译] OpenStack Kilo 版本中 Neutron 的新变化

    OpenStack Kilo 版本,OpenStack 这个开源项目的第11个版本,已经于2015年4月正式发布了.现在是个合适的时间来看看这个版本中Neutron到底发生了哪些变化了,以及引入了哪些 ...

  5. OpenStack Kilo版加CEPH部署手册

    OpenStack Kilo版加CEPH部署手册 作者: yz联系方式: QQ: 949587200日期: 2015-7-13版本: Kilo 转载地址: http://mp.weixin.qq.co ...

  6. openstack kilo部署-基础环境

    公司也想搞个私有云玩玩,于是展开了一系列的调研,部署测试,openstack 有几个版本真是坑爹!!,如果喜欢被虐有兄弟,你就试试 openstack 的 juno , icehouse等版本,用不了 ...

  7. (转)OpenStack Kilo 版本中 Neutron 的新变化

    OpenStack Kilo 版本,OpenStack 这个开源项目的第11个版本,已经于2015年4月正式发布了.现在是个合适的时间来看看这个版本中Neutron到底发生了哪些变化了,以及引入了哪些 ...

  8. [转] OpenStack Kilo 更新日志

    OpenStack 2015.1.0 (Kilo)更新日志 原文: https://wiki.openstack.org/wiki/ReleaseNotes/Kilo/zh-hans 目录  [隐藏] ...

  9. OpenStack kilo版(1) 部署环境

    硬件 VMware workstation虚拟机 Ubuntu14.04操作系统 虚拟机网络规划 管理网络: eth0, 桥接模式 10.0.0.0/24 外部网络: eth1, nat模式(需要关闭 ...

随机推荐

  1. Java代码质量改进之:使用ThreadLocal维护线程内部变量

    在上文中,<Java代码质量改进之:同步对象的选择>,我们提出了一个场景:火车站有3个售票窗口,同时在售一趟列车的100个座位.我们通过锁定一个靠谱的同步对象,完成了上面的功能. 现在,让 ...

  2. 启明星系统安装教程(如何在windows2012里配置IIS)

    (1)安装IIS 因为在windows2012里,安装数据库,IIS部分组件都需要.NET3.5,而默认windows2012安装时,并不会把此组件复制到电脑里 导致,后期要安装.NET3.5还需要安 ...

  3. vs2010编译错误(报错:LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏)

    报错:LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏 1> 这段时间忙于看文献,没用过VS了. 今天用着用着就报错了: LINK : fat ...

  4. centos7安装postgres-10

    目录 安装 下载yum repo 安装server和客户端 初始化db 启动Postgres 设置开机启动 修改data目录 停止服务 迁移data目录 重启 连接测试 修改允许远程其他IP连接 前一 ...

  5. art.template 循环里面分组。

    后台提供给我们一个数组,我们要用模版实现上面的格式输出怎么版呢? 下面就是解决方案: <h2>循环4个一组</h2> <script type="text/ht ...

  6. Shell脚本编程基础笔记一

    转载请注明原文地址:http://www.cnblogs.com/ygj0930/p/8176137.html 一:脚本文件的创建.格式.运行 1:创建shell脚本 首先,要创建一个文件 touch ...

  7. VTK拾取网格模型上的可见点

    消隐与Z-Buffer 使用缓冲器记录物体表面在屏幕上投影所覆盖范围内的全部像素的深度值,依次访问屏幕范围内物体表面所覆盖的每一像素,用深度小(深度用z值表示,z值小表示离视点近)的像素点颜色替代深度 ...

  8. 阿里云k8s应用最新日志采集不到的问题

    问题描述: 阿里云k8s应用日志之前一直都是可以正常的采集, 先出现一问题, 通过kibana 和阿里云的日志服务都没法展示最新的k8s应用的日志, 部分应用的最新日志有被采集到,但大部分应用日志没有 ...

  9. CPP Note

    hello.cpp -> 编译代码g++ hello.cpp -o a -> a.out 区分大小写的编程语言 内置类型 一些基本类型可以使用一个或多个类型修饰符进行修饰: signed: ...

  10. C++ 重载运算符和重载函数

    C++ 重载运算符和重载函数 C++ 允许在同一作用域中的某个函数和运算符指定多个定义,分别称为函数重载和运算符重载. 重载声明是指一个与之前已经在该作用域内声明过的函数或方法具有相同名称的声明,但是 ...