registry_host in glance-api.conf need equal bind_host in glance-registry.conf, otherwise glance-api will raise Exception ClientConnectionError.
[root@controller ~]# grep registry_host /etc/glance/glance-api.conf #registry_host = 0.0.0.0 registry_host = 10.6.1.108 [root@controller ~]# grep bind_host /etc/glance/glance-registry.conf #bind_host = 0.0.0.0 bind_host = 127.0.0.1 [root@controller ~]#
./openstack-common/attributes/default.rb:default['openstack']['endpoints']['image-registry-bind']['host'] = node['openstack']['endpoints']['bind-host'] ./openstack-common/attributes/default.rb:default['openstack']['endpoints']['image-registry']['host'] = node['openstack']['endpoints']['host']
-----------------------error [root@controller glance]# netstat -anp | grep 9191 tcp 0 0 127.0.0.1:9191 0.0.0.0:* LISTEN 31170/python [root@controller glance]# ps -ef | grep 31170 glance 31170 1 0 11:57 ? 00:00:04 /usr/bin/python /usr/bin/glance-registry --config-file /etc/glance/glance-registry.conf --log-file /var/log/glance/registry.log glance 31189 31170 0 11:58 ? 00:00:00 /usr/bin/python /usr/bin/glance-registry --config-file /etc/glance/glance-registry.conf --log-file /var/log/glance/registry.log glance 31190 31170 0 11:58 ? 00:00:00 /usr/bin/python /usr/bin/glance-registry --config-file /etc/glance/glance-registry.conf --log-file /var/log/glance/registry.log root 32199 26536 0 12:05 pts/1 00:00:00 grep --color=auto 31170 [root@controller glance]#
[root@controller glance]# wget http://10.6.1.108:9191/images/detail --2015-05-07 12:04:25-- http://10.6.1.108:9191/images/detail Connecting to 10.6.1.108:9191... failed: Connection refused. [root@controller glance]# wget http://127.0.0.1:9191/images/detail --2015-05-07 12:04:36-- http://127.0.0.1:9191/images/detail Connecting to 127.0.0.1:9191... connected. HTTP request sent, awaiting response... 401 Unauthorized Authorization failed. [root@controller glance]#
2015-05-07 12:00:39.177 31573 DEBUG glance.common.client [req-fed3038e-7d56-4f3a-8cb7-2ae3191374f9 a40f86695f5e4787b64c6565f4a22682 a15ca35b95b0486d9832743bc2d5a3f0 - - -] GL-A8EF472 Constructed URL: http://10.6.1.108:9191/images/detail?is_public=none&limit=500 _construct_url /usr/lib/python2.7/site-packages/glance/common/client.py:401 2015-05-07 12:00:39.182 31573 ERROR glance.registry.client.v1.client [req-fed3038e-7d56-4f3a-8cb7-2ae3191374f9 a40f86695f5e4787b64c6565f4a22682 a15ca35b95b0486d9832743bc2d5a3f0 - - -] Registry client request GET /images/detail raised ClientConnectionError 2015-05-07 12:00:39.182 31573 TRACE glance.registry.client.v1.client Traceback (most recent call last): 2015-05-07 12:00:39.182 31573 TRACE glance.registry.client.v1.client File "/usr/lib/python2.7/site-packages/glance/registry/client/v1/client.py", line 117, in do_request 2015-05-07 12:00:39.182 31573 TRACE glance.registry.client.v1.client **kwargs) 2015-05-07 12:00:39.182 31573 TRACE glance.registry.client.v1.client File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 71, in wrapped 2015-05-07 12:00:39.182 31573 TRACE glance.registry.client.v1.client return func(self, *args, **kwargs) 2015-05-07 12:00:39.182 31573 TRACE glance.registry.client.v1.client File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 376, in do_request 2015-05-07 12:00:39.182 31573 TRACE glance.registry.client.v1.client headers=copy.deepcopy(headers)) 2015-05-07 12:00:39.182 31573 TRACE glance.registry.client.v1.client File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 88, in wrapped 2015-05-07 12:00:39.182 31573 TRACE glance.registry.client.v1.client return func(self, method, url, body, headers) 2015-05-07 12:00:39.182 31573 TRACE glance.registry.client.v1.client File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 542, in _do_request 2015-05-07 12:00:39.182 31573 TRACE glance.registry.client.v1.client raise exception.ClientConnectionError(e) 2015-05-07 12:00:39.182 31573 TRACE glance.registry.client.v1.client ClientConnectionError: [Errno 111] ECONNREFUSED 2015-05-07 12:00:39.182 31573 TRACE glance.registry.client.v1.client 2
registry_host in glance-api.conf need equal bind_host in glance- registry. conf, otherwise glance-api will raise Exception ClientConnectio nError.
[root@controller ~]# grep registry_host /etc/glance/ glance- api.conf glance- registry. conf
#registry_host = 0.0.0.0
registry_host = 10.6.1.108
[root@controller ~]# grep bind_host /etc/glance/
#bind_host = 0.0.0.0
bind_host = 127.0.0.1
[root@controller ~]#
./openstack- common/ attributes/ default. rb:default[ 'openstack' ]['endpoints' ]['image- registry- bind'][ 'host'] = node['openstack ']['endpoints' ]['bind- host'] common/ attributes/ default. rb:default[ 'openstack' ]['endpoints' ]['image- registry' ]['host' ] = node['openstack ']['endpoints' ]['host' ]
./openstack-
------- ------- ------- --error glance- registry --config-file /etc/glance/ glance- registry. conf --log-file /var/log/ glance/ registry. log glance- registry --config-file /etc/glance/ glance- registry. conf --log-file /var/log/ glance/ registry. log glance- registry --config-file /etc/glance/ glance- registry. conf --log-file /var/log/ glance/ registry. log
[root@controller glance]# netstat -anp | grep 9191
tcp 0 0 127.0.0.1:9191 0.0.0.0:* LISTEN 31170/python
[root@controller glance]# ps -ef | grep 31170
glance 31170 1 0 11:57 ? 00:00:04 /usr/bin/python /usr/bin/
glance 31189 31170 0 11:58 ? 00:00:00 /usr/bin/python /usr/bin/
glance 31190 31170 0 11:58 ? 00:00:00 /usr/bin/python /usr/bin/
root 32199 26536 0 12:05 pts/1 00:00:00 grep --color=auto 31170
[root@controller glance]#
[root@controller glance]# wget http:// 10.6.1. 108:9191/ images/ detail 10.6.1. 108:9191/ images/ detail 127.0.0. 1:9191/ images/ detail 127.0.0. 1:9191/ images/ detail
--2015-05-07 12:04:25-- http://
Connecting to 10.6.1.108:9191... failed: Connection refused.
[root@controller glance]# wget http://
--2015-05-07 12:04:36-- http://
Connecting to 127.0.0.1:9191... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Authorization failed.
[root@controller glance]#
2015-05-07 12:00:39.177 31573 DEBUG glance. common. client [req-fed3038e- 7d56-4f3a- 8cb7-2ae3191374 f9 a40f86695f5e478 7b64c6565f4a226 82 a15ca35b95b0486 d9832743bc2d5a3 f0 - - -] GL-A8EF472 Constructed URL: http:// 10.6.1. 108:9191/ images/ detail? is_public= none&limit= 500 _construct_url /usr/lib/ python2. 7/site- packages/ glance/ common/ client. py:401 registry. client. v1.client [req-fed3038e- 7d56-4f3a- 8cb7-2ae3191374 f9 a40f86695f5e478 7b64c6565f4a226 82 a15ca35b95b0486 d9832743bc2d5a3 f0 - - -] Registry client request GET /images/detail raised ClientConnectio nError registry. client. v1.client Traceback (most recent call last): registry. client. v1.client File "/usr/lib/ python2. 7/site- packages/ glance/ registry/ client/ v1/client. py", line 117, in do_request registry. client. v1.client **kwargs) registry. client. v1.client File "/usr/lib/ python2. 7/site- packages/ glance/ common/ client. py", line 71, in wrapped registry. client. v1.client return func(self, *args, **kwargs) registry. client. v1.client File "/usr/lib/ python2. 7/site- packages/ glance/ common/ client. py", line 376, in do_request registry. client. v1.client headers= copy.deepcopy( headers) ) registry. client. v1.client File "/usr/lib/ python2. 7/site- packages/ glance/ common/ client. py", line 88, in wrapped registry. client. v1.client return func(self, method, url, body, headers) registry. client. v1.client File "/usr/lib/ python2. 7/site- packages/ glance/ common/ client. py", line 542, in _do_request registry. client. v1.client raise exception. ClientConnectio nError( e) registry. client. v1.client ClientConnectio nError: [Errno 111] ECONNREFUSED registry. client. v1.client
2015-05-07 12:00:39.182 31573 ERROR glance.
2015-05-07 12:00:39.182 31573 TRACE glance.
2015-05-07 12:00:39.182 31573 TRACE glance.
2015-05-07 12:00:39.182 31573 TRACE glance.
2015-05-07 12:00:39.182 31573 TRACE glance.
2015-05-07 12:00:39.182 31573 TRACE glance.
2015-05-07 12:00:39.182 31573 TRACE glance.
2015-05-07 12:00:39.182 31573 TRACE glance.
2015-05-07 12:00:39.182 31573 TRACE glance.
2015-05-07 12:00:39.182 31573 TRACE glance.
2015-05-07 12:00:39.182 31573 TRACE glance.
2015-05-07 12:00:39.182 31573 TRACE glance.
2015-05-07 12:00:39.182 31573 TRACE glance.
2015-05-07 12:00:39.182 31573 TRACE glance.
2