?創(chuàng)建openstack鏡像的時候報錯。HTTP 500 Internal Server Error: The server has either erred or is incapable of performing the requested operation
查看?cat /var/log/glance/api.log日志顯示如下。
2022-02-13 11:18:53.201 5691 ERROR glance.common.wsgi six.reraise(type(de_ref), de_ref)
2022-02-13 11:18:53.201 5691 ERROR glance.common.wsgi File "<string>", line 3, in reraise
2022-02-13 11:18:53.201 5691 ERROR glance.common.wsgi DBConnectionError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'controller' ([Errno 111] ECONNREFUSED)") (Background on this error at: http://sqlalche.me/e/e3q8)
2022-02-13 11:18:53.201 5691 ERROR glance.common.wsgi
2022-02-13 11:18:53.204 5691 INFO eventlet.wsgi.server [req-2e8e6857-0668-4897-93ea-575cf7e17411 d2ba72d0f04a46b19901e84c6700f0ce 7e7143f292c34f1789773405af525239 - default default] 10.10.10.10 - - [13/Feb/2022 11:18:53] "POST /v2/images HTTP/1.1" 500 454 100.407488
2022-02-13 11:18:53.201 5691 ERROR glance.common.wsgi ? ? six.reraise(type(de_ref), de_ref)
2022-02-13 11:18:53.201 5691 ERROR glance.common.wsgi ? File "<string>", line 3, in reraise
2022-02-13 11:18:53.201 5691 ERROR glance.common.wsgi DBConnectionError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'controller' ([Errno 111] ECONNREFUSED)") (Background on this error at: http://sqlalche.me/e/e3q8)
2022-02-13 11:18:53.201 5691 ERROR glance.common.wsgi
2022-02-13 11:18:53.204 5691 INFO eventlet.wsgi.server [req-2e8e6857-0668-4897-93ea-575cf7e17411 d2ba72d0f04a46b19901e84c6700f0ce 7e7143f292c34f1789773405af525239 - default default] 10.10.10.10 - - [13/Feb/2022 11:18:53] "POST /v2/images HTTP/1.1" 500 454 100.407488
嘗試過
(1)重新配置glance-api.conf 和glance-registry.conf文件,
(2)同步數(shù)據(jù)庫?su -s /bin/sh -c "glance-manage db_sync" glance
(3)用root用戶更新權(quán)限,flush priviledegs
(4)配置cat /etc/httpd/conf.d/wsgi-keystone.conf文件,監(jiān)聽35357和5000端口
(5)重啟環(huán)境變量admin.sh admin-openrc等
還有其他一些嘗試,都不行。
最后我在錯誤日志里看到主機名和ip,我想會不會是因為公私網(wǎng)的ip順序不對。
2003, "Can't connect to MySQL server on 'controller' ([Errno 111] ECONNREFUSED)") (Background on this error at: http://sqlalche.me/e/e3q8)
2022-02-13 11:18:53.201 5691 ERROR glance.common.wsgi
2022-02-13 11:18:53.204 5691 INFO eventlet.wsgi.server [req-2e8e6857-0668-4897-93ea-575cf7e17411 d2ba72d0f04a46b19901e84c6700f0ce 7e7143f292c34f1789773405af525239 - default default] 10.10.10.10
我打開/etc/hosts文件
是這樣的
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.10.10.10 controller
10.10.10.12 compute
192.168.100.101 controller
192.168.100.102 compute
我把順序調(diào)整一下之后。
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.100.101 controller
192.168.100.102 compute
10.10.10.10 controller
10.10.10.12 compute
運行
openstack image create "cirros" --file cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --public
?成功文章來源:http://www.zghlxwxcb.cn/news/detail-784881.html
[root@controller ~]# openstack image create "cirros" --file cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --publi
+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field ? ? ? ? ? ?| Value ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|
+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| checksum ? ? ? ?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? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
| min_disk ? ? ? ? | 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|
| min_ram ? ? ? ? ?| 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|
| name ? ? ? ? ? ? | cirros ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
| owner ? ? ? ? ? ?| 7e7143f292c34f1789773405af525239 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
| properties ? ? ? | os_hash_algo='sha512', os_hash_value='1b03ca1bc3fafe448b90583c12f367949f8b0e665685979d95b004e48574b953316799e23240f4f739d1b5eb4c4ca24d38fdc6f4f9d8247a2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? ? | 2022-02-13T03:21:35Z ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
| virtual_size ? ? | None ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
| visibility ? ? ? | public ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? |
+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
?文章來源地址http://www.zghlxwxcb.cn/news/detail-784881.html
到了這里,關(guān)于HTTP 500 Internal Server Error: 錯誤的解決方法的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!