• ERROR Failed to discover available identity versions when contacting http://ct:5000/v3.


    问题说明

    在部署open stack的NOVA组件时,注册API端口到placement的service中,出现如下错误

    1 [root@ct ~]# openstack endpoint create --region RegionOne placement public http://ct:8778
    2 Failed to discover available identity versions when contacting http://ct:5000/v3. Attempti                            ng to parse version from URL.
    3 Unable to establish connection to http://ct:5000/v3/auth/tokens: HTTPConnectionPool(host='                            ct', port=5000): Max retries exceeded with url: /v3/auth/tokens (Caused by NewConnectionEr                            ror('<urllib3.connection.HTTPConnection object at 0x7fa784987c10>: Failed to establish a n                            ew connection: [Errno 111] xe6x8bx92xe7xbbx9dxe8xbfx9exe6x8exa5',))

    解决方案

    使用curl,查看报错返回的地址

    1 [root@ct ~]# curl http://ct:5000/v3
    2 curl: (7) Failed connect to ct:5000; 拒绝连接

    监听5000端口,发现并没有返回信息,原来是之前重启ct导致apache没有开启(但我记得之前设置了开机自启的)

    1 [root@ct ~]# netstat -anpt | grep 5000

    重启apache服务即可解决

     1 [root@ct ~]# systemctl start httpd
     2 [root@ct ~]# systemctl status httpd
     3 ● httpd.service - The Apache HTTP Server
     4    Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
     5    Active: active (running) since 一 2020-12-28 14:55:25 CST; 2s ago
     6      Docs: man:httpd(8)
     7            man:apachectl(8)
     8  Main PID: 5797 (httpd)
     9    Status: "Processing requests..."
    10    CGroup: /system.slice/httpd.service
    11            ├─5797 /usr/sbin/httpd -DFOREGROUND
    12            ├─5804 /usr/sbin/httpd -DFOREGROUND
    13            ├─5805 /usr/sbin/httpd -DFOREGROUND
    14            ├─5806 /usr/sbin/httpd -DFOREGROUND
    15            ├─5807 (wsgi:keystone- -DFOREGROUND
    16            ├─5808 (wsgi:keystone- -DFOREGROUND
    17            ├─5809 (wsgi:keystone- -DFOREGROUND
    18            ├─5810 (wsgi:keystone- -DFOREGROUND
    19            ├─5811 (wsgi:keystone- -DFOREGROUND
    20            ├─5812 /usr/sbin/httpd -DFOREGROUND
    21            ├─5813 /usr/sbin/httpd -DFOREGROUND
    22            ├─5814 /usr/sbin/httpd -DFOREGROUND
    23            ├─5815 /usr/sbin/httpd -DFOREGROUND
    24            └─5816 /usr/sbin/httpd -DFOREGROUND
    25 
    26 12月 28 14:55:25 ct systemd[1]: Starting The Apache HTTP Server...
    27 12月 28 14:55:25 ct systemd[1]: Started The Apache HTTP Server.
    28 [root@ct ~]# curl http://ct:5000/v3
    29 {"version": {"status": "stable", "updated": "2019-07-19T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.13", "links": [{"href": "http://ct:5000/v3/", "rel": "self"}]}}
  • 相关阅读:
    小学语文好书
    Request对象池和线程绑定关系
    英文单词总结 20220728
    幂等方案
    WebSocket实例
    好的ppt素材网站
    Springboot启动,无需连接数据库
    Netty实例
    系统架构图类型和应用场景
    零拷贝原理讲解
  • 原文地址:https://www.cnblogs.com/xuhao0705/p/14233103.html
Copyright © 2020-2023  润新知