glance 上传镜像报错Error finding address for http://controller:9292/v2/schemas/image: Unable to establish

[root@controller ~] glance image-create --name "Centos7.5" --disk-format qcow2 --container-format bare --progress < /opt/iaas/images/CentOS_7.5_x86_64_XD.qcow2    
Error finding address for http://controller:9292/v2/schemas/image: Unable to establish connection to http://controller:9292/v2/schemas/image: HTTPConnectionPool(host='controller', port=9292): Max retries exceeded with url: /v2/schemas/image (Caused by
NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f146f3e0a90>: Failed to establish a new connection: [Errno 111] Connection refused',))

先使用ss查看端口9292是否被打开

[root@controller ~]# ss -anl | grep 9292
[root@controller ~]# 

可以看见端口并未打开,开始排错,排错先从配置文件开始,一般都是配置文件错误才导致端口没起来

[keystone_authtoken]
auth_uri = http://controller:5000
auth_utl = http://controller:5000  ##可以看见这里错误utl
memcached_servers = controller:11211
auth_type = password
project_domain_name = demo
user_domain_name = demo
project_name = service
username = glance
password = 000000

修改配置文件后可以看见端口打开

[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:5000 
memcached_servers = controller:11211
auth_type = password
project_domain_name = demo
user_domain_name = demo
project_name = service
username = glance
password = 000000

[root@controller ~]# systemctl restart openstack-glance-api openstack-glance-registry
[root@controller ~]# ss -anl | grep 9292                                  tcp    LISTEN     0      128       *:9292                  *:*                  

再次上传镜像成功!!

[root@controller ~]# glance image-create --name "Centos7.5" --disk-format qcow2 --container-format bare --progress < /opt/iaas/images/CentOS_7.5_x86_64_XD.qcow2 
[=============================>] 100%
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | 3d3e9c954351a4b6953fd156f0c29f5c     |
| container_format | bare                                 |
| created_at       | 2021-04-26T14:38:03Z                 |
| disk_format      | qcow2                                |
| id               | 7a39ee7e-656f-4fd6-9a91-d651e70a2aea |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | Centos7.5                            |
| owner            | eb411a00760a4054ac754e2ab3a333bc     |
| protected        | False                                |
| size             | 510459904                            |
| status           | active                               |
| tags             | []                                   |
| updated_at       | 2021-04-26T14:38:07Z                 |
| virtual_size     | None                                 |
| visibility       | shared                               |
+------------------+--------------------------------------+
[root@controller ~]# 
  • 6
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值