我目前看起来很快,而且我坚持运行代理。下面是我在运行'swift-init proxy restart'时遇到的错误。
Traceback (most recent call last):
File "/usr/local/bin/swift-proxy-server", line 23, in <module>
sys.exit(run_wsgi(conf_file, 'proxy-server', default_port=8080, **options))
File "/usr/local/lib/python2.7/dist-packages/swift/common/wsgi.py", line 386, in run_wsgi
loadapp(conf_path, global_conf=global_conf)
File "/usr/local/lib/python2.7/dist-packages/swift/common/wsgi.py", line 313, in loadapp
ctx = loadcontext(loadwsgi.APP, conf_file, global_conf=global_conf)
File "/usr/local/lib/python2.7/dist-packages/swift/common/wsgi.py", line 305, in loadcontext
global_conf=global_conf)
File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
global_conf=global_conf)
File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 320, in _loadconfig
return loader.get_context(object_type, name, global_conf)
File "/usr/local/lib/python2.7/dist-packages/swift/common/wsgi.py", line 59, in get_context
object_type, name=name, global_conf=global_conf)
File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 450, in get_context
global_additions=global_additions)
File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 559, in _pipeline_app_context
APP, pipeline[-1], global_conf)
File "/usr/local/lib/python2.7/dist-packages/swift/common/wsgi.py", line 59, in get_context
object_type, name=name, global_conf=global_conf)
File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 454, in get_context
section)
File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 476, in _context_from_use
object_type, name=use, global_conf=global_conf)
File "/usr/local/lib/python2.7/dist-packages/swift/common/wsgi.py", line 59, in get_context
object_type, name=name, global_conf=global_conf)
File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 406, in get_context
global_conf=global_conf)
File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
global_conf=global_conf)
File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 328, in _loadegg
return loader.get_context(object_type, name, global_conf)
File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 620, in get_context
object_type, name=name)
File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 659, in find_egg_entry_point
for prot in protocol_options] or '(no entry points)'))))
LookupError: Entry point 'tempurl' not found in egg 'swift' (dir: /usr/local/lib/python2.7/dist-packages; protocols: paste.app_factory, paste.composite_factory, paste.composit_factory; entry_points: )
所以我查看了dist-packages中存在的egg-info和源文件。
/usr/local/lib/python2.7/dist-packages/swift-1.12.0.113.g076634e.egg-info/entry_points.txt
[paste.filter_factory]
formpost = swift.common.middleware.formpost:filter_factory
gatekeeper = swift.common.middleware.gatekeeper:filter_factory
container_quotas = swift.common.middleware.container_quotas:filter_factory
container_sync = swift.common.middleware.container_sync:filter_factory
catch_errors = swift.common.middleware.catch_errors:filter_factory
ratelimit = swift.common.middleware.ratelimit:filter_factory
keystoneauth = swift.common.middleware.keystoneauth:filter_factory
tempauth = swift.common.middleware.tempauth:filter_factory
list_endpoints = swift.common.middleware.list_endpoints:filter_factory
dlo = swift.common.middleware.dlo:filter_factory
name_check = swift.common.middleware.name_check:filter_factory
domain_remap = swift.common.middleware.domain_remap:filter_factory
proxy_logging = swift.common.middleware.proxy_logging:filter_factory
crossdomain = swift.common.middleware.crossdomain:filter_factory
healthcheck = swift.common.middleware.healthcheck:filter_factory
tempurl = swift.common.middleware.tempurl:filter_factory
bulk = swift.common.middleware.bulk:filter_factory
memcache = swift.common.middleware.memcache:filter_factory
account_quotas = swift.common.middleware.account_quotas:filter_factory
staticweb = swift.common.middleware.staticweb:filter_factory
cname_lookup = swift.common.middleware.cname_lookup:filter_factory
recon = swift.common.middleware.recon:filter_factory
slo = swift.common.middleware.slo:filter_factory
如上所示,行'tempurl = swift.common.middleware.tempurl:filter_factory'确实存在(我不熟悉鸡蛋结构,所以我不确定这些行是否足以运行。)在确认这些行之后,我发现tempurl.py实际上存在于/usr/local/lib/python2.7/dist-packages/swift/common/middleware/tempurl.py。看起来一切都足以加载tempurl.py。我应该去哪里解决这个问题。 在此先感谢任何帮助。
PS。 我读到的每个文档都使用proxy [server.conf]的'[filter:tempurl]'。但是我在下面遇到了错误,所以我改为'[app:tempurl]'。我遇到了第二个问题。第一个问题也来自'loadwsgi'。所以我假设第一个问题也与这个加载鸡蛋问题有关。
....
object_type, name=name)
File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 587, in find_config_section
self.filename))
LookupError: No section 'tempurl' (prefixed by 'app' or 'application' or 'composite' or 'composit' or 'pipeline' or 'filter-app') found in config /etc/swift/proxy-server.conf
答案 0 :(得分:0)
我已经取出以下几行:
#[filter:authtoken]
#use = egg:swift#proxy
#allow_account_management = true
#account_autocreate = true
在修复之前我的错误输出。对于科学!!!
[root@controller005 swift]# systemctl status openstack-swift-proxy.service -l
● openstack-swift-proxy.service - OpenStack Object Storage (swift) - Proxy Server
Loaded: loaded (/usr/lib/systemd/system/openstack-swift-proxy.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2016-02-26 19:27:07 WET; 3min 10s ago
Process: 20405 ExecStart=/usr/bin/swift-proxy-server /etc/swift/proxy-server.conf (code=exited, status=1/FAILURE)
Main PID: 20405 (code=exited, status=1/FAILURE)
Feb 26 19:27:07 controller005.company.domain.xxx.domain.net swift-proxy-server[20405]: File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 328, in _loadegg
Feb 26 19:27:07 controller005.company.domain.xxx.domain.net swift-proxy-server[20405]: return loader.get_context(object_type, name, global_conf)
Feb 26 19:27:07 controller005.company.domain.xxx.domain.net swift-proxy-server[20405]: File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 620, in get_context
Feb 26 19:27:07 controller005.company.domain.xxx.domain.net swift-proxy-server[20405]: object_type, name=name)
Feb 26 19:27:07 controller005.company.domain.xxx.domain.net swift-proxy-server[20405]: File "/usr/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 659, in find_egg_entry_point
Feb 26 19:27:07 controller005.company.domain.xxx.domain.net swift-proxy-server[20405]: for prot in protocol_options] or '(no entry points)'))))
Feb 26 19:27:07 controller005.company.domain.xxx.domain.net swift-proxy-server[20405]: LookupError: Entry point 'proxy' not found in egg 'swift' (dir: /usr/lib/python2.7/site-packages; protocols: paste.filter_factory, paste.filter_app_factory; entry_points: )
Feb 26 19:27:07 controller005.company.domain.xxx.domain.net systemd[1]: openstack-swift-proxy.service: main process exited, code=exited, status=1/FAILURE
Feb 26 19:27:07 controller005.company.domain.xxx.domain.net systemd[1]: Unit openstack-swift-proxy.service entered failed state.
Feb 26 19:27:07 controller005.company.domain.xxx.domain.net systemd[1]: openstack-swift-proxy.service failed.
[root@controller005 swift]# cat /usr/lib/python2.7/site-packages/swift-2.3.0-py2.7.egg-info/entry_points.txt
[paste.app_factory]
mem_object = swift.obj.mem_server:app_factory
account = swift.account.server:app_factory
object = swift.obj.server:app_factory
container = swift.container.server:app_factory
proxy = swift.proxy.server:app_factory
[paste.filter_factory]
formpost = swift.common.middleware.formpost:filter_factory
gatekeeper = swift.common.middleware.gatekeeper:filter_factory
container_quotas = swift.common.middleware.container_quotas:filter_factory
container_sync = swift.common.middleware.container_sync:filter_factory
catch_errors = swift.common.middleware.catch_errors:filter_factory
ratelimit = swift.common.middleware.ratelimit:filter_factory
xprofile = swift.common.middleware.xprofile:filter_factory
keystoneauth = swift.common.middleware.keystoneauth:filter_factory
tempauth = swift.common.middleware.tempauth:filter_factory
list_endpoints = swift.common.middleware.list_endpoints:filter_factory
dlo = swift.common.middleware.dlo:filter_factory
name_check = swift.common.middleware.name_check:filter_factory
domain_remap = swift.common.middleware.domain_remap:filter_factory
proxy_logging = swift.common.middleware.proxy_logging:filter_factory
crossdomain = swift.common.middleware.crossdomain:filter_factory
healthcheck = swift.common.middleware.healthcheck:filter_factory
tempurl = swift.common.middleware.tempurl:filter_factory
bulk = swift.common.middleware.bulk:filter_factory
memcache = swift.common.middleware.memcache:filter_factory
account_quotas = swift.common.middleware.account_quotas:filter_factory
staticweb = swift.common.middleware.staticweb:filter_factory
cname_lookup = swift.common.middleware.cname_lookup:filter_factory
recon = swift.common.middleware.recon:filter_factory
slo = swift.common.middleware.slo:filter_factory
[root@controller005 swift]#