AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 773094
Accepted
elliotp
elliotp
Asked: 2016-04-27 11:15:59 +0800 CST2016-04-27 11:15:59 +0800 CST 2016-04-27 11:15:59 +0800 CST

Openstack Neutron - 创建实例时连接被拒绝 - 我没有想法

  • 772

我已经设置了 OpenStack - 我的第一次。我已按照安装指南(在 Ubuntu 14.04 上)进行操作,并且我相信我一切都正确。但是,在尝试创建实例时出现错误:

实例 e948205a-2287-4b0e-9829-f2c6fe3a93eb 的构建中止:无法建立与 http://127.0.0.1:9696/v2.0/extensions.json的连接

我已经断断续续地调试了大约一个星期,我已经用尽了我在谷歌上找到的所有解决方案,而且我能想到的。

Neutron 正在监听端口:

网络统计-ln | grep 9696 tcp 0
0 0.0.0.0:9696 0.0.0.0:*
听

我也可以从命令行连接到 Neutron:

root@controller:/var/log# neutron ext-list
+---------------------------+-----------------------------------------------+
| alias                     | name                                          |
+---------------------------+-----------------------------------------------+
| default-subnetpools       | Default Subnetpools                           |
| network-ip-availability   | Network IP Availability                       |
| network_availability_zone | Network Availability Zone                     |
| auto-allocated-topology   | Auto Allocated Topology Services              |
| ext-gw-mode               | Neutron L3 Configurable external gateway mode |
| binding                   | Port Binding  
...

我可以使用令牌进行身份验证,并使用下面的 curl 测试手动从 Neutron 获得响应,这会响应预期的数据。

curl -i -H'X-Auth-Token: MY_TOKEN' http://controller:9696/v2.0/extensions.json

我的中子 API 端点:

| 440735e5dd8d468e89de9a8077ea9491 | 区域一 | 中子 | 网络 | 真 | 公共 | http://控制器:9696 |

| 5985d944b02b4148a87cafae8df006c8 | 区域一 | 中子 | 网络 | 真 | 内部 | http://控制器:9696 |

我检查了所有的 Nova 和 Neutron 日志,我看不到任何错误,我重新创建了我的 Neutron 端点,我检查并仔细检查了配置。我不知道如何继续调试或解决方案在哪里。

使用更新的信息进行编辑:

root@controller:~# openstack catalog list
+----------+----------+--------------------------------------------------------------------------+
| Name     | Type     | Endpoints                                                                |
+----------+----------+--------------------------------------------------------------------------+
| neutron  | network  | RegionOne                                                                |
|          |          |   admin: http://controller:9696                                          |
|          |          | RegionOne                                                                |
|          |          |   internal: http://controller:9696                                       |
|          |          | RegionOne                                                                |
|          |          |   public: http://controller:9696                                         |
|          |          |                                                                          |
| nova     | compute  | RegionOne                                                                |
|          |          |   admin: http://controller:8774/v2.1/225f1282f5034949937f5ef71c503dd0    |
|          |          | RegionOne                                                                |
|          |          |   internal: http://controller:8774/v2.1/225f1282f5034949937f5ef71c503dd0 |
|          |          | RegionOne                                                                |
|          |          |   public: http://controller:8774/v2.1/225f1282f5034949937f5ef71c503dd0   |
|          |          |                                                                          |
| keystone | identity | RegionOne                                                                |
|          |          |   admin: http://controller:35357/v3                                      |
|          |          | RegionOne                                                                |
|          |          |   public: http://controller:5000/v3                                      |
|          |          | RegionOne                                                                |
|          |          |   internal: http://controller:5000/v3                                    |
|          |          |                                                                          |
| glance   | image    | RegionOne                                                                |
|          |          |   admin: http://controller:9292                                          |
|          |          | RegionOne                                                                |
|          |          |   public: http://controller:9292                                         |
|          |          | RegionOne                                                                |
|          |          |   internal: http://controller:9292                                       |
|          |          |                                                                          |
+----------+----------+--------------------------------------------------------------------------+

我通过 Horizo​​n 和 cli 创建的中子网络

root@controller:~# neutron net-list
+--------------------------------------+------------------+--------------------------------------------------+
| id                                   | name             | subnets                                          |
+--------------------------------------+------------------+--------------------------------------------------+
| 8a50aef6-b687-483d-ab49-f43460eebdd6 | My Admin Network | d4f840cc-31b9-4d32-963d-3a2110ae5765 10.0.0.0/24 |
| 8bb223ef-828d-4c9a-aa16-15ac13d244f6 | ext-net          |                                                  |
| 98a2606a-3017-48fb-8b60-e18c4a4f1083 | My Network       | b76352ac-dc61-4d75-ba7a-b5b4d76705d0 10.0.0.0/24 |
+--------------------------------------+------------------+--------------------------------------------------+

我的 Neutron Ext 列表如下:

root@controller:~# neutron ext-list
+---------------------------+-----------------------------------------------+
| alias                     | name                                          |
+---------------------------+-----------------------------------------------+
| default-subnetpools       | Default Subnetpools                           |
| network-ip-availability   | Network IP Availability                       |
| network_availability_zone | Network Availability Zone                     |
| auto-allocated-topology   | Auto Allocated Topology Services              |
| ext-gw-mode               | Neutron L3 Configurable external gateway mode |
| binding                   | Port Binding                                  |
| agent                     | agent                                         |
| subnet_allocation         | Subnet Allocation                             |
| l3_agent_scheduler        | L3 Agent Scheduler                            |
| tag                       | Tag support                                   |
| external-net              | Neutron external network                      |
| net-mtu                   | Network MTU                                   |
| availability_zone         | Availability Zone                             |
| quotas                    | Quota management support                      |
| l3-ha                     | HA Router extension                           |
| provider                  | Provider Network                              |
| multi-provider            | Multi Provider Network                        |
| address-scope             | Address scope                                 |
| extraroute                | Neutron Extra Route                           |
| timestamp_core            | Time Stamp Fields addition for core resources |
| router                    | Neutron L3 Router                             |
| extra_dhcp_opt            | Neutron Extra DHCP opts                       |
| dns-integration           | DNS Integration                               |
| security-group            | security-group                                |
| dhcp_agent_scheduler      | DHCP Agent Scheduler                          |
| router_availability_zone  | Router Availability Zone                      |
| rbac-policies             | RBAC Policies                                 |
| standard-attr-description | standard-attr-description                     |
| port-security             | Port Security                                 |
| allowed-address-pairs     | Allowed Address Pairs                         |
| dvr                       | Distributed Virtual Router                    |
+---------------------------+-----------------------------------------------+

使用带有调试的创建命令,我现在在实际错误中获得了一些进一步的信息(最好将其复制并粘贴出来以阅读它):

{u'message': u'Build of instance 3e2f5678-6a4a-478b-8953-d10db929d367 aborted: Unable to establish connection to http://127.0.0.1:9696/v2.0/extensions.json', u'code': 500, u'details': u'  File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1926, in _do_build_and_run_instance\n    filter_properties)\n  File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2083, in _build_and_run_instance\n    \'create.error\', fault=e)\n  File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__\n    self.force_reraise()\n  File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise\n    six.reraise(self.type_, self.value, self.tb)\n  File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2067, in _build_and_run_instance\n    instance=instance)\n  File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__\n    self.gen.throw(type, value, traceback)\n  File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2244, in _build_resources\n    reason=six.text_type(exc))\n', u'created': u'2016-04-29T13:56:55Z'} |
openstack openstack-neutron ubuntu-14.04
  • 1 1 个回答
  • 3112 Views

1 个回答

  • Voted
  1. Best Answer
    Sum1sAdmin
    2016-04-28T09:05:37+08:002016-04-28T09:05:37+08:00

    您可以通过检查 neutron 服务是否已启动并运行并在您的服务目录中正确注册来进行调试。

    看看你的keystone catalog

    它将输出 API 端点

    keystone catalog
    WARNING: unsupported identity-api-version 3, falling back to 2.0
    Service: compute
    +-------------+-------------------------------------------------------------+
    |   Property  |                            Value                            |
    +-------------+-------------------------------------------------------------+
    |   adminURL  | http://172.25.60.2:8774/v2/6cbc4e8a49af4fb1be9a4bf6dda8e373 |
    |      id     |               15f3972a815642118f319301c01eac26              |
    | internalURL | http://172.25.60.2:8774/v2/6cbc4e8a49af4fb1be9a4bf6dda8e373 |
    |  publicURL  |  http://87.x.x.x:8774/v2/6cbc4e8a49af4fb1be9a4bf6dda8e373  |
    |    region   |                          RegionOne                          |
    +-------------+-------------------------------------------------------------+
    Service: network
    +-------------+----------------------------------+
    |   Property  |              Value               |
    +-------------+----------------------------------+
    |   adminURL  |     http://172.25.60.2:9696/     |
    |      id     | 15c3f13c2bd74cd38bbd48bcafe4ccb0 |
    | internalURL |     http://172.25.60.2:9696/     |
    |  publicURL  |      http://87.x.x.x:9696/      |
    |    region   |            RegionOne             |
    +-------------+----------------------------------+
    Service: volumev2
    +-------------+-------------------------------------------------------------+
    |   Property  |                            Value                            |
    +-------------+-------------------------------------------------------------+
    |   adminURL  | http://172.25.60.2:8776/v2/6cbc4e8a49af4fb1be9a4bf6dda8e373 |
    |      id     |               979fd7e2bb7a4fef82b9e975249decf5              |
    | internalURL | http://172.25.60.2:8776/v2/6cbc4e8a49af4fb1be9a4bf6dda8e373 |
    |  publicURL  |  http://87.x.x.x.:8776/v2/6cbc4e8a49af4fb1be9a4bf6dda8e373  |
    |    region   |                          RegionOne                          |
    +-------------+-------------------------------------------------------------+
    

    那么neutron net-list命令的输出是什么

    neutron net-list
    +--------------------------------------+----------------------+-------------------------------------------------------+
    | id                                   | name                 | subnets                                               |
    +--------------------------------------+----------------------+-------------------------------------------------------+
    | 2f97b5e6-e13b-47af-9cb7-f7e33344a788 | default              | f25c7778-33f9-48a7-9696-a19a01fc3e57 192.168.112.0/24 |
    | 34263fbb-f93e-45d3-b65e-ab2afce3c1c9 | ruby-network         | 9360aeb5-2c05-431d-8e79-7052788db198 10.0.14.0/24     |
    | 3650dbcb-b6d7-4220-8e6d-fa7c30914c57 | cloudfoundry-network | 24ed907f-476f-4440-97d4-9a1f2b7bd75d 10.0.26.0/24     |
    

    在你的 neutron.conf 中你绑定到 127.0.0.1 吗?- 您应该绑定到所有 IP

    # Address to bind the API server to
    # bind_host = 0.0.0.0
    bind_host = 0.0.0.0
    
    # Port the bind the API server to
    # bind_port = 9696
    bind_port = 9696
    

    Neutron 使用 api 扩展或“插件”以及 DHCP、安全组和 NAT 的代理——你能继续说你使用的是什么扩展吗?

    可能这将是 openvswitch,因为默认情况下您的插件和网络代理通常是 dnsmaq 和 iptables。

    您可以检查 /etc/ini.d/ 中的 openvswitch 服务,并使用以下 show 命令查看交换机数据库

    ovs-vsctl show : Prints a brief overview of the switch database configuration.
    ovs-vsctl list-br : Prints a list of configured bridges
    ovs-vsctl list-ports <bridge> : Prints a list of ports on a specific bridge.
    ovs-vsctl list interface : Prints a list of interfaces.
    

    此外,为了调试扩展 http 错误,您可以在 neutron conf 中启用调试日志记录或在 cli 上传递 --debug 选项,例如

    nova --debug boot --image imageID --flavor flavorID --nic net-id=nicID
    
    • 1

相关问题

  • 无法在 rhel 7 上安装 devstack

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve