ERROR Failed to discover available identity versions when contacting http://ct:5000/v3.
阿新 • • 發佈:2020-12-29
Plancement
問題
在部署open stack的NOVA元件時,註冊API埠到placement的service中,出現如下錯誤
[[email protected] ~]# openstack endpoint create --region RegionOne placement public http://ct:8778
Failed to discover available identity versions when contacting http://ct:5000/v3. Attempti ng to parse version from URL.
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] \xe6\x8b\x92\xe7\xbb\x9d\xe8\xbf\x9e\xe6\x8e\xa5' ,))
解決方案
使用curl,檢視報錯返回的地址
[[email protected] ~]# curl http://ct:5000/v3
curl: (7) Failed connect to ct:5000; 拒絕連線
監聽5000埠,發現並沒有返回資訊,原來是之前重啟ct倒至apache沒有開啟
[[email protected] ~]# netstat -anpt | grep 5000
重啟apache服務即可解決
[[email protected] ~]# systemctl start httpd
[[email protected] ~]# systemctl status httpd
● httpd. service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since 一 2020-12-28 14:55:25 CST; 2s ago
Docs: man:httpd(8)
man:apachectl(8)
Main PID: 5797 (httpd)
Status: "Processing requests..."
CGroup: /system.slice/httpd.service
├─5797 /usr/sbin/httpd -DFOREGROUND
├─5804 /usr/sbin/httpd -DFOREGROUND
├─5805 /usr/sbin/httpd -DFOREGROUND
├─5806 /usr/sbin/httpd -DFOREGROUND
├─5807 (wsgi:keystone- -DFOREGROUND
├─5808 (wsgi:keystone- -DFOREGROUND
├─5809 (wsgi:keystone- -DFOREGROUND
├─5810 (wsgi:keystone- -DFOREGROUND
├─5811 (wsgi:keystone- -DFOREGROUND
├─5812 /usr/sbin/httpd -DFOREGROUND
├─5813 /usr/sbin/httpd -DFOREGROUND
├─5814 /usr/sbin/httpd -DFOREGROUND
├─5815 /usr/sbin/httpd -DFOREGROUND
└─5816 /usr/sbin/httpd -DFOREGROUND
12月 28 14:55:25 ct systemd[1]: Starting The Apache HTTP Server...
12月 28 14:55:25 ct systemd[1]: Started The Apache HTTP Server.
[[email protected] ~]# curl http://ct:5000/v3
{"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"}]}}