配置swift报错503

原先的swift不用了,更换为新主机,配置后,在控制节点验证时报错

Sep 27 02:57:04 controller proxy-server: Auth Token confirmed use of None apis
Sep 27 02:57:04 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda4 re: Trying to HEAD /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx1f433d3167494f5a8b1e6-005d8db2c0) (client_ip: 192.168.0.101)
Sep 27 02:57:04 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda7 re: Trying to HEAD /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx1f433d3167494f5a8b1e6-005d8db2c0) (client_ip: 192.168.0.101)
Sep 27 02:57:04 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda5 re: Trying to HEAD /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx1f433d3167494f5a8b1e6-005d8db2c0) (client_ip: 192.168.0.101)
Sep 27 02:57:04 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda6 re: Trying to HEAD /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx1f433d3167494f5a8b1e6-005d8db2c0) (client_ip: 192.168.0.101)
Sep 27 02:57:04 controller proxy-server: Account HEAD returning 503 for [] (txn: tx1f433d3167494f5a8b1e6-005d8db2c0) (client_ip: 192.168.0.101)
Sep 27 02:57:04 controller proxy-server: 192.168.0.101 192.168.0.101 27/Sep/2019/06/57/04 HEAD /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef HTTP/1.0 503 - python-swiftclient-2.6.0 28cf7a4fc5d147f0... - - - tx1f433d3167494f5a8b1e6-005d8db2c0 - 0.1169 - - 1569567424.278646946 1569567424.395510912 -
Sep 27 02:57:04 controller proxy-server: Auth Token confirmed use of None apis
Sep 27 02:57:04 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda4 re: Trying to HEAD /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx5e4261a5720844fcb5037-005d8db2c0) (client_ip: 192.168.0.101)
Sep 27 02:57:04 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda7 re: Trying to HEAD /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx5e4261a5720844fcb5037-005d8db2c0) (client_ip: 192.168.0.101)
Sep 27 02:57:04 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda5 re: Trying to HEAD /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx5e4261a5720844fcb5037-005d8db2c0) (client_ip: 192.168.0.101)
Sep 27 02:57:04 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda6 re: Trying to HEAD /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx5e4261a5720844fcb5037-005d8db2c0) (client_ip: 192.168.0.101)
Sep 27 02:57:04 controller proxy-server: Account HEAD returning 503 for [] (txn: tx5e4261a5720844fcb5037-005d8db2c0) (client_ip: 192.168.0.101)
Sep 27 02:57:04 controller proxy-server: 192.168.0.101 192.168.0.101 27/Sep/2019/06/57/04 HEAD /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef HTTP/1.0 503 - python-swiftclient-2.6.0 28cf7a4fc5d147f0... - - - tx5e4261a5720844fcb5037-005d8db2c0 - 0.1174 - - 1569567424.487860918 1569567424.605252028 -
Sep 27 02:57:05 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda7 re: Trying to GET /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx229fd3a27bab49f481dbf-005d8db2c1) (client_ip: 192.168.0.101)
Sep 27 02:57:05 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda5 re: Trying to GET /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx229fd3a27bab49f481dbf-005d8db2c1) (client_ip: 192.168.0.101)
Sep 27 02:57:05 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda4 re: Trying to GET /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx229fd3a27bab49f481dbf-005d8db2c1) (client_ip: 192.168.0.101)
Sep 27 02:57:05 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda6 re: Trying to GET /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx229fd3a27bab49f481dbf-005d8db2c1) (client_ip: 192.168.0.101)
Sep 27 02:57:05 controller proxy-server: Account GET returning 503 for [] (txn: tx229fd3a27bab49f481dbf-005d8db2c1) (client_ip: 192.168.0.101)
Sep 27 02:57:05 controller proxy-server: 192.168.0.101 192.168.0.101 27/Sep/2019/06/57/05 GET /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef%3Fformat%3Djson HTTP/1.0 503 - python-swiftclient-2.6.0 28cf7a4fc5d147f0... - 118 - tx229fd3a27bab49f481dbf-005d8db2c1 - 0.0432 - - 1569567425.122399092 1569567425.165566921 -
Sep 27 02:57:05 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda4 re: Trying to HEAD /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx87264f312e8f4bfc80204-005d8db2c1) (client_ip: 192.168.0.101)
Sep 27 02:57:05 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda5 re: Trying to HEAD /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx87264f312e8f4bfc80204-005d8db2c1) (client_ip: 192.168.0.101)
Sep 27 02:57:05 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda7 re: Trying to HEAD /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx87264f312e8f4bfc80204-005d8db2c1) (client_ip: 192.168.0.101)
Sep 27 02:57:05 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda6 re: Trying to HEAD /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx87264f312e8f4bfc80204-005d8db2c1) (client_ip: 192.168.0.101)
Sep 27 02:57:05 controller proxy-server: Account HEAD returning 503 for [] (txn: tx87264f312e8f4bfc80204-005d8db2c1) (client_ip: 192.168.0.101)
Sep 27 02:57:05 controller proxy-server: 192.168.0.101 192.168.0.101 27/Sep/2019/06/57/05 HEAD /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef HTTP/1.0 503 - python-swiftclient-2.6.0 28cf7a4fc5d147f0... - - - tx87264f312e8f4bfc80204-005d8db2c1 - 0.0056 - - 1569567425.260286093 1569567425.265904903 -
Sep 27 02:57:05 controller proxy-server: Auth Token confirmed use of None apis
Sep 27 02:57:05 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda4 re: Trying to GET /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx04bd4d67dc004488a90f2-005d8db2c1) (client_ip: 192.168.0.101)
Sep 27 02:57:05 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda7 re: Trying to GET /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx04bd4d67dc004488a90f2-005d8db2c1) (client_ip: 192.168.0.101)
Sep 27 02:57:05 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda5 re: Trying to GET /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx04bd4d67dc004488a90f2-005d8db2c1) (client_ip: 192.168.0.101)
Sep 27 02:57:05 controller proxy-server: ERROR with Account server 192.168.0.102:6002/sda6 re: Trying to GET /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef: Connection refused (txn: tx04bd4d67dc004488a90f2-005d8db2c1) (client_ip: 192.168.0.101)
Sep 27 02:57:05 controller proxy-server: Account GET returning 503 for [] (txn: tx04bd4d67dc004488a90f2-005d8db2c1) (client_ip: 192.168.0.101)
Sep 27 02:57:05 controller proxy-server: 192.168.0.101 192.168.0.101 27/Sep/2019/06/57/05 GET /v1/AUTH_46890a3c5f1b45a39dc872d4601de7ef%3Fformat%3Djson HTTP/1.0 503 - python-swiftclient-2.6.0 28cf7a4fc5d147f0... - 118 - tx04bd4d67dc004488a90f2-005d8db2c1 - 0.1144 - - 1569567425.274853945 1569567425.389211893 -

查阅了很多资料,当然也给了很多思路,比如配置写错了,IP 端口写错了,这个我以前也遇到过,但是今天死活弄不好,最后想想觉得还是配置文件的问题,因为我的openstack是16年的Liberty版,现在早已是19年的S版,控制节点的配置文件确实是L版的,但是存储节点原先的下载链接早已失效,下下来是S版,其实就是几个选项不同,但是我又难得去仔细看,最后换回原来L版的配置文件,果然是对了,我把L版的配置文件粘贴上来:

[[email protected] swift]# cat account-server.conf 
[DEFAULT] 
bind_ip = 192.168.0.102
bind_port = 6002
user = swift
swift_dir = /etc/swift
devices = /srv/node
mount_check = true
[pipeline:main]
pipeline = healthcheck recon account-server
[filter:recon]
use = egg:swift#recon
recon_cache_path = /var/cache/swift
[app:account-server]
use = egg:swift#account
[filter:healthcheck]
use = egg:swift#healthcheck
[[email protected] swift]# 

[[email protected] swift]# cat container-server.conf 
[DEFAULT]
bind_ip = 192.168.0.102
bind_port = 6001
user = swift
swift_dir = /etc/swift
devices = /srv/node
mount_check = true
[pipeline:main]
pipeline = healthcheck recon container-server
[filter:recon]
use = egg:swift#recon
recon_cache_path = /var/cache/swift
[app:container-server]
use = egg:swift#container
[filter:healthcheck]
use = egg:swift#healthcheck
[[email protected] swift]# 


[[email protected] swift]# cat object-server.conf 
[DEFAULT]
bind_ip = 192.168.0.102
bind_port = 6000
user = swift
swift_dir = /etc/swift
devices = /srv/node
mount_check = true
[pipeline:main]
pipeline = healthcheck recon object-server
[filter:recon] 
use = egg:swift#recon
recon_cache_path = /var/cache/swift
recon_lock_path = /var/lock
[app:object-server]
use = egg:swift#object
[filter:healthcheck]
use = egg:swift#healthcheck
[object-auditor]
[object-replicator]
[object-updater]
[[email protected] swift]#

当然,说白了,还是自己对swift的选项不了解,不熟悉

配完之后,重启服务,

存储节点:

systemctl restart openstack-swift-account.service openstack-swift-account-auditor.service openstack-swift-account-reaper.service openstack-swift-account-replicator.service openstack-swift-container.service openstack-swift-container-auditor.service openstack-swift-container-replicator.service openstack-swift-container-updater.service openstack-swift-object.service openstack-swift-object-auditor.service openstack-swift-object-replicator.service openstack-swift-object-updater.service

控制节点:

systemctl restart openstack-swift-proxy.service memcached.service

最后去控制节点验证一下:

[[email protected] ~]# swift stat
/usr/lib/python2.7/site-packages/keystoneclient/service_catalog.py:196: UserWarning: Providing attr without filter_value to get_urls() is deprecated as of the 1.7.0 release and may be removed in the 2.0.0 release. Either both should be provided or neither should be provided.
'Providing attr without filter_value to get_urls() is '
Account: AUTH_833fe12cb0f741bbbf520c15578e180f
Containers: 1
Objects: 0
Bytes: 0
Containers in policy "policy-0": 1
Objects in policy "policy-0": 0
Bytes in policy "policy-0": 0
X-Account-Project-Domain-Id: default
X-Timestamp: 1569567780.84655
X-Trans-Id: txdbac7f9af0e54b35847ac-005d8dba97
Content-Type: text/plain; charset=utf-8
Accept-Ranges: bytes
[[email protected] ~]#

测试正常了

SWIFT的配置文件都是去GITHUB上面去拉:

https://opendev.org/openstack/swift/src/branch/master/etc

此条目发表在OpenStack分类目录,贴了, 标签。将固定链接加入收藏夹。

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注