Openstack swift-proxy 服务总是在启动时失败

Openstack swift-proxy 服务总是在启动时失败

我在 ubuntu 20.04 上使用 openstack yoga 尝试创建一个私有云,当我启动 swift 代理服务时,我在控制器节点上遇到了问题,它总是失败,这使我无法启动 swift 节点! 这是错误:

root@controller:/home/oussema# 服务 swift-proxy 状态 ●

swift-proxy.service - OpenStack Swift proxy server
     Loaded: loaded (/lib/systemd/system/swift-proxy.service; enabl>
     Active: failed (Result: exit-code) since Mon 2023-12-18 06:38:>
       Docs: man:swift-proxy-server(1)
    Process: 44973 ExecStart=/usr/bin/swift-proxy-server /etc/swift>
   Main PID: 44973 (code=exited, status=1/FAILURE)

Dec 18 06:38:01 controller systemd[1]: swift-proxy.service: Schedul>
Dec 18 06:38:01 controller systemd[1]: Stopped OpenStack Swift prox>
Dec 18 06:38:01 controller systemd[1]: swift-proxy.service: Start r>
Dec 18 06:38:01 controller systemd[1]: swift-proxy.service: Failed >
Dec 18 06:38:01 controller systemd[1]: Failed to start OpenStack Sw>
lines 1-12/12 (END)

这是 swift-proxy.conf 文件:

[DEFAULT]
bind_port = 8080
user = swift
swift_dir = /etc/swift
expose_info = true
[pipeline:main]
pipeline = catch_errors gatekeeper healthcheck proxy-logging cache container_sync bulk ratelimit authtoken keystoneauth container-quotas account-quotas slo dlo versioned_writes proxy-logging proxy-server
[app:proxy-server]
account_autocreate = True
[filter:tempauth]
user_admin_admin = admin .admin .reseller_admin
user_admin_auditor = admin_ro .reseller_reader
user_test_tester = testing .admin
user_test_tester2 = testing2 .admin
user_test_tester3 = testing3
user_test2_tester2 = testing2 .admin
user_test5_tester5 = testing5 service
[filter:authtoken]
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
www_authenticate_uri = http://10.0.0.11:5000
auth_url = http://10.0.0.11:5000
memcached_servers = 10.0.0.11:11211
auth_type = password
project_domain_id = default
user_domain_id = default
project_name = service
username = swift
password = root
delay_auth_decision = True
[filter:keystoneauth]
operator_roles = admin,user
[filter:s3token]
reseller_prefix = AUTH_
delay_auth_decision = False
auth_uri = http://keystonehost:5000/v3
http_timeout = 10.0

[filter:cache]
memcache_servers = 10.0.0.11:11211

[filter:keymaster]

meta_version_to_write = 2

encryption_root_secret = changeme

当我尝试从对象存储节点运行 swift-init all start 时,我得到了以下输出:

account-replicator running (3459 - /etc/swift/account-server.conf)
account-replicator already started...
Unable to locate config for container-reconciler
object-reconstructor running (3461 - /etc/swift/object-server.conf)
object-reconstructor already started...
Starting container-server...(/etc/swift/container-server.conf)
Starting account-server...(/etc/swift/account-server.conf)
account-auditor running (3456 - /etc/swift/account-server.conf)
account-auditor already started...
account-reaper running (3460 - /etc/swift/account-server.conf)
account-reaper already started...
container-auditor running (3457 - /etc/swift/container-server.conf)
container-auditor already started...
container-updater running (3454 - /etc/swift/container-server.conf)
container-updater already started...
container-replicator running (3463 - /etc/swift/container-server.conf)
container-replicator already started...
container-sharder running (3464 - /etc/swift/container-server.conf)
container-sharder already started...
object-auditor running (3453 - /etc/swift/object-server.conf)
object-auditor already started...
Starting object-server...(/etc/swift/object-server.conf)
object-updater running (3455 - /etc/swift/object-server.conf)
object-updater already started...
container-sync running (3462 - /etc/swift/container-server.conf)
container-sync already started...
object-replicator running (3458 - /etc/swift/object-server.conf)
object-replicator already started...
Traceback (most recent call last):
  File "/usr/bin/swift-container-server", line 23, in <module>
    sys.exit(run_wsgi(conf_file, 'container-server', **options))
  File "/usr/lib/python3/dist-packages/swift/common/wsgi.py", line 864, in run_wsgi
    for sock, sock_info in strategy.new_worker_socks():
  File "/usr/lib/python3/dist-packages/swift/common/wsgi.py", line 565, in new_worker_socks
    yield get_socket(self.conf), None
  File "/usr/lib/python3/dist-packages/swift/common/wsgi.py", line 206, in get_socket
    raise Exception(_('Could not bind to %(addr)s:%(port)s '
Exception: Could not bind to 10.0.0.42:6201 after trying for 30 seconds

Traceback (most recent call last):
  File "/usr/bin/swift-account-server", line 23, in <module>
    sys.exit(run_wsgi(conf_file, 'account-server', **options))
  File "/usr/lib/python3/dist-packages/swift/common/wsgi.py", line 864, in run_wsgi
    for sock, sock_info in strategy.new_worker_socks():
  File "/usr/lib/python3/dist-packages/swift/common/wsgi.py", line 565, in new_worker_socks
    yield get_socket(self.conf), None
  File "/usr/lib/python3/dist-packages/swift/common/wsgi.py", line 206, in get_socket
    raise Exception(_('Could not bind to %(addr)s:%(port)s '
Exception: Could not bind to 10.0.0.42:6202 after trying for 30 seconds

Traceback (most recent call last):
  File "/usr/bin/swift-object-server", line 25, in <module>
    sys.exit(run_wsgi(conf_file, 'object-server',
  File "/usr/lib/python3/dist-packages/swift/common/wsgi.py", line 864, in run_wsgi
    for sock, sock_info in strategy.new_worker_socks():
  File "/usr/lib/python3/dist-packages/swift/common/wsgi.py", line 565, in new_worker_socks
    yield get_socket(self.conf), None
  File "/usr/lib/python3/dist-packages/swift/common/wsgi.py", line 206, in get_socket
    raise Exception(_('Could not bind to %(addr)s:%(port)s '
Exception: Could not bind to 10.0.0.42:6200 after trying for 30 seconds

这是我的 swift.conf 文件:

[swift-hash]
swift_hash_path_suffix = Secretprefix
swift_hash_path_prefix = Secretsuffix


[storage-policy:0]
name = Policy-0
default = yes
aliases = yellow, orange

我按照文档完成了所有这些步骤。如果您还有任何问题我将非常感激,我真的需要帮助:)。

相关内容