无法建立与 http://controller:9696/v2.0/networks 的连接
Unable to establish connection to http://controller:9696/v2.0/networks
我正在设置由控制器和计算节点组成的 openstack 基础设施。
我按照USSURI版本设置子服务的流程:keystone,glance,placement。参见 article
当我开始使用 neutron 服务时,我开始使用选项 1(网络提供商)设置托管在控制器节点中的组件,所以我分别关注了这 3 篇文章:process 1/3 - process 2/3 - process 3/3
当我去创建一个网络时(过程 3/3),我收到这个错误消息:
$openstack network create --project-domain Default --project service --share --external --provider-physical-network provider --provider-network-type flat --enable provider
Unable to establish connection to http://controller:9696/v2.0/networks: HTTPConnectionPool(host='controller', port=9696): Max retries exceeded with url: /v2.0/networks (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fd0a7c13630>: Failed to establish a new connection: [Errno 111] Connection refused',))
请等待帮助。
如果问题有帮助,请投赞成票。提前致谢。
我录制了这些命令:
# service neutron-server restart
# service neutron-linuxbridge-agent restart
# service neutron-dhcp-agent restart
# service neutron-metadata-agent restart
# service apache2 restart
在使用调试选项传递有问题的 cmd 之前:
$ openstack network create --debug --project-domain Default --project service --share --external --provider-physical-network provider --provider-network-type flat --enable provider
但仍在处理同样的问题:
keystoneauth1.exceptions.connection.ConnectFailure: Unable to establish connection to http://controller:9696/v2.0/networks: HTTPConnectionPool(host='controller', port=9696): Max retries exceeded with url: /v2.0/networks (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1cc735e7f0>: Failed to establish a new connection: [Errno 111] Connection refused',))
我还可以看到这一行作为调试输出:
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='controller', port=9696): Max retries exceeded with url: /v2.0/networks (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1cc735e7f0>: Failed to establish a new connection: [Errno 111] Connection refused',))
此外,我将此部分添加到我的 conf 文件 (/etc/neutron/neutron.conf):
[keystone_authtoken]
# ...
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = XXXXXXXXXXXX
我得到了答案...
控制器节点 Neutron 设置过程应该在过程 2/3 停止,我们不能继续前进,因为这个必要的命令还没有通过:
su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
它同步 Neutron 数据库并为 Neutron keystone 身份验证创建必要的 table。
我正在设置由控制器和计算节点组成的 openstack 基础设施。
我按照USSURI版本设置子服务的流程:keystone,glance,placement。参见 article
当我开始使用 neutron 服务时,我开始使用选项 1(网络提供商)设置托管在控制器节点中的组件,所以我分别关注了这 3 篇文章:process 1/3 - process 2/3 - process 3/3
当我去创建一个网络时(过程 3/3),我收到这个错误消息:
$openstack network create --project-domain Default --project service --share --external --provider-physical-network provider --provider-network-type flat --enable provider
Unable to establish connection to http://controller:9696/v2.0/networks: HTTPConnectionPool(host='controller', port=9696): Max retries exceeded with url: /v2.0/networks (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fd0a7c13630>: Failed to establish a new connection: [Errno 111] Connection refused',))
请等待帮助。
如果问题有帮助,请投赞成票。提前致谢。
我录制了这些命令:
# service neutron-server restart
# service neutron-linuxbridge-agent restart
# service neutron-dhcp-agent restart
# service neutron-metadata-agent restart
# service apache2 restart
在使用调试选项传递有问题的 cmd 之前:
$ openstack network create --debug --project-domain Default --project service --share --external --provider-physical-network provider --provider-network-type flat --enable provider
但仍在处理同样的问题:
keystoneauth1.exceptions.connection.ConnectFailure: Unable to establish connection to http://controller:9696/v2.0/networks: HTTPConnectionPool(host='controller', port=9696): Max retries exceeded with url: /v2.0/networks (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1cc735e7f0>: Failed to establish a new connection: [Errno 111] Connection refused',))
我还可以看到这一行作为调试输出:
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='controller', port=9696): Max retries exceeded with url: /v2.0/networks (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1cc735e7f0>: Failed to establish a new connection: [Errno 111] Connection refused',))
此外,我将此部分添加到我的 conf 文件 (/etc/neutron/neutron.conf):
[keystone_authtoken]
# ...
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = XXXXXXXXXXXX
我得到了答案...
控制器节点 Neutron 设置过程应该在过程 2/3 停止,我们不能继续前进,因为这个必要的命令还没有通过:
su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
它同步 Neutron 数据库并为 Neutron keystone 身份验证创建必要的 table。