Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Swift S3 error: No module named s3_token

Hi Experts,

I have managed to get the Swift installation working correctly with the Swift API's using Keystone. But I am currently having issues when starting the Proxy after adding the Swift3 setup into the Proxy config and I was hoping someone could point me in the right direction.

I am receiving the following error when restarting the proxy service using "swift-init proxy restart"

root@proxy:~# swift-init proxy restart Signal proxy-server pid: 1707 signal: 15 No proxy-server running Starting proxy-server...(/etc/swift/proxy-server.conf) Traceback (most recent call last): File "/usr/bin/swift-proxy-server", line 22, in <module> run_wsgi(conf_file, 'proxy-server', default_port=8080, *options) File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 119, in run_wsgi init_request_processor(conf_file, app_section, *args, *kwargs) File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 246, in init_request_processor app = loadapp('config:%s' % conf_file, global_conf={'log_name': log_name}) File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp return loadobj(APP, uri, name=name, **kw) File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 271, in loadobj 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/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 562, in _pipeline_app_context for name in pipeline[:-1]] File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 458, in get_context section) File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 517, in _context_from_explicit value = import_string(found_expr) File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 22, in import_string return pkg_resources.EntryPoint.parse("x=" + s).load(False) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) ImportError: No module named s3_token

My current setup is as follows:

Controller(keystone): 10.0.0.151 proxy server: 10.0.0.154 Storage node: 10.0.0.155

Proxy-server.conf : [DEFAULT] bind_port = 8080 user = swift

[pipeline:main] pipeline = catch_errors healthcheck cache swift3 s3token authtoken keystoneauth proxy-server

[app:proxy-server] use = egg:swift#proxy allow_account_management = true account_autocreate = true

[filter:keystoneauth] use = egg:swift#keystoneauth operator_roles = Member,admin,swiftoperator

[filter:authtoken] paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory

Delaying the auth decision is required to support token-less

usage for anonymous referrers ('.r:*').

delay_auth_decision = true

cache directory for signing certificate

signing_dir = /home/swift/keystone-signing

auth_* settings refer to the Keystone server

auth_protocol = http auth_host = 10.0.0.151 auth_port = 35357

the same admin_token as provided in keystone.conf

admin_token = ADMIN

the service tenant and swift userid and password created in Keystone

admin_tenant_name = service admin_user = swift admin_password = swift

[filter:cache] use = egg:swift#memcache memcache_servers=10.0.0.154 [filter:catch_errors] use = egg:swift#catch_errors

[filter:healthcheck] use = egg:swift#healthcheck

[filter:swift3] use = egg:swift3#swift3

[filter:s3token] paste.filter_factory = keystoneclient.middleware.s3_token:filter_factory auth_port = 35357 auth_host = 10.0.0.151 auth_protocol = http

Please suggest - thanks

Swift S3 error: No module named s3_token

Hi Experts,

I have managed to get the Swift installation working correctly with the Swift API's using Keystone. But I am currently having issues when starting the Proxy after adding the Swift3 setup into the Proxy config and I was hoping someone could point me in the right direction.

I am receiving the following error when restarting the proxy service using "swift-init proxy restart"

root@proxy:~# swift-init proxy restart
Signal proxy-server  pid: 1707  signal: 15
No proxy-server running
Starting proxy-server...(/etc/swift/proxy-server.conf)
Traceback (most recent call last):
  File "/usr/bin/swift-proxy-server", line 22, in <module>
    run_wsgi(conf_file, 'proxy-server', default_port=8080, *options)
**options)
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 119, in run_wsgi
    init_request_processor(conf_file, app_section, *args, *kwargs)
**kwargs)
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 246, in init_request_processor
    app = loadapp('config:%s' % conf_file, global_conf={'log_name': log_name})
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 271, in loadobj
    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/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 562, in _pipeline_app_context
    for name in pipeline[:-1]]
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 458, in get_context
    section)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 517, in _context_from_explicit
    value = import_string(found_expr)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 22, in import_string
    return pkg_resources.EntryPoint.parse("x=" + s).load(False)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
ImportError: No module named s3_token

s3_token

My current setup is as follows:

Controller(keystone): 10.0.0.151
proxy server: 10.0.0.154
Storage node: 10.0.0.155

10.0.0.155 Proxy-server.conf : [DEFAULT] bind_port = 8080 user = swift

swift [pipeline:main] pipeline = catch_errors healthcheck cache swift3 s3token authtoken keystoneauth proxy-server

proxy-server [app:proxy-server] use = egg:swift#proxy allow_account_management = true account_autocreate = true

true [filter:keystoneauth] use = egg:swift#keystoneauth operator_roles = Member,admin,swiftoperator

Member,admin,swiftoperator [filter:authtoken] paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory

keystoneclient.middleware.auth_token:filter_factory # Delaying the auth decision is required to support token-less

token-less # usage for anonymous referrers ('.r:*').

('.r:*'). delay_auth_decision = true

true # cache directory for signing certificate

certificate signing_dir = /home/swift/keystone-signing

/home/swift/keystone-signing # auth_* settings refer to the Keystone server

server auth_protocol = http auth_host = 10.0.0.151 auth_port = 35357

35357 # the same admin_token as provided in keystone.conf

keystone.conf admin_token = ADMIN

ADMIN # the service tenant and swift userid and password created in Keystone

Keystone admin_tenant_name = service admin_user = swift admin_password = swift

swift [filter:cache] use = egg:swift#memcache memcache_servers=10.0.0.154 [filter:catch_errors] use = egg:swift#catch_errors

egg:swift#catch_errors [filter:healthcheck] use = egg:swift#healthcheck

egg:swift#healthcheck [filter:swift3] use = egg:swift3#swift3

egg:swift3#swift3 [filter:s3token] paste.filter_factory = keystoneclient.middleware.s3_token:filter_factory auth_port = 35357 auth_host = 10.0.0.151 auth_protocol = http

http

Please suggest - thanks

Swift S3 error: No module named s3_token

Hi Experts,

I have managed to get the Swift installation working correctly with the Swift API's using Keystone. But I am currently having issues when starting the Proxy after adding the Swift3 setup into the Proxy config and I was hoping someone could point me in the right direction.

I am receiving the following error when restarting the proxy service using "swift-init proxy restart"

root@proxy:~# swift-init proxy restart
Signal proxy-server  pid: 1707  signal: 15
No proxy-server running
Starting proxy-server...(/etc/swift/proxy-server.conf)
Traceback (most recent call last):
  File "/usr/bin/swift-proxy-server", line 22, in <module>
    run_wsgi(conf_file, 'proxy-server', default_port=8080, **options)
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 119, in run_wsgi
    init_request_processor(conf_file, app_section, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 246, in init_request_processor
    app = loadapp('config:%s' % conf_file, global_conf={'log_name': log_name})
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 271, in loadobj
    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/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 562, in _pipeline_app_context
    for name in pipeline[:-1]]
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 458, in get_context
    section)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 517, in _context_from_explicit
    value = import_string(found_expr)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 22, in import_string
    return pkg_resources.EntryPoint.parse("x=" + s).load(False)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
ImportError: No module named s3_token

My current setup is as follows:

Controller(keystone): 10.0.0.151
proxy server: 10.0.0.154
Storage node: 10.0.0.155

Proxy-server.conf :
[DEFAULT]
bind_port = 8080
user = swift

[pipeline:main]
pipeline = catch_errors healthcheck cache swift3 s3token  authtoken keystoneauth proxy-server

[app:proxy-server]
use = egg:swift#proxy
allow_account_management = true
account_autocreate = true

[filter:keystoneauth]
use = egg:swift#keystoneauth
operator_roles = Member,admin,swiftoperator

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory

# Delaying the auth decision is required to support token-less
# usage for anonymous referrers ('.r:*').
delay_auth_decision = true

# cache directory for signing certificate
signing_dir = /home/swift/keystone-signing

# auth_* settings refer to the Keystone server
auth_protocol = http
auth_host = 10.0.0.151
auth_port = 35357

# the same admin_token as provided in keystone.conf
admin_token = ADMIN

# the service tenant and swift userid and password created in Keystone
admin_tenant_name = service
admin_user = swift
admin_password = swift

[filter:cache]
use = egg:swift#memcache
memcache_servers=10.0.0.154
[filter:catch_errors]
use = egg:swift#catch_errors

[filter:healthcheck]
use = egg:swift#healthcheck

[filter:swift3]
use = egg:swift3#swift3

[filter:s3token]
paste.filter_factory = keystoneclient.middleware.s3_token:filter_factory
auth_port = 35357
auth_host = 10.0.0.151
auth_protocol = http

I have used the following link to install Swift: http://docs.openstack.org/trunk/openstack-object-storage/admin/content/configuring-openstack-object-storage-with-s3_api.html Firstly, I tried installing by apt-get install swift-python-s3, but it didn't installed and gave unable to locate package. then I installed by following these commands: git clone https://github.com/fujita/swift3.git cd swift3; git checkout v1.7 python setup.py install After that I configured the proxy server and got the error message while starting the proxy services.

Please suggest - thanks

Swift S3 error: No module named s3_token

Hi Experts,

I have managed to get the Swift installation working correctly with the Swift API's using Keystone. But I am currently having issues when starting the Proxy after adding the Swift3 setup into the Proxy config and I was hoping someone could point me in the right direction.

I am receiving the following error when restarting the proxy service using "swift-init proxy restart"

root@proxy:~# swift-init proxy restart
Signal proxy-server  pid: 1707  signal: 15
No proxy-server running
Starting proxy-server...(/etc/swift/proxy-server.conf)
Traceback (most recent call last):
  File "/usr/bin/swift-proxy-server", line 22, in <module>
    run_wsgi(conf_file, 'proxy-server', default_port=8080, **options)
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 119, in run_wsgi
    init_request_processor(conf_file, app_section, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 246, in init_request_processor
    app = loadapp('config:%s' % conf_file, global_conf={'log_name': log_name})
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 271, in loadobj
    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/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 562, in _pipeline_app_context
    for name in pipeline[:-1]]
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 458, in get_context
    section)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 517, in _context_from_explicit
    value = import_string(found_expr)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 22, in import_string
    return pkg_resources.EntryPoint.parse("x=" + s).load(False)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
ImportError: No module named s3_token

My current setup is as follows:

Controller(keystone): 10.0.0.151
proxy server: 10.0.0.154
Storage node: 10.0.0.155

Proxy-server.conf :
[DEFAULT]
bind_port = 8080
user = swift

[pipeline:main]
pipeline = catch_errors healthcheck cache swift3 s3token  authtoken keystoneauth proxy-server

[app:proxy-server]
use = egg:swift#proxy
allow_account_management = true
account_autocreate = true

[filter:keystoneauth]
use = egg:swift#keystoneauth
operator_roles = Member,admin,swiftoperator

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory

# Delaying the auth decision is required to support token-less
# usage for anonymous referrers ('.r:*').
delay_auth_decision = true

# cache directory for signing certificate
signing_dir = /home/swift/keystone-signing

# auth_* settings refer to the Keystone server
auth_protocol = http
auth_host = 10.0.0.151
auth_port = 35357

# the same admin_token as provided in keystone.conf
admin_token = ADMIN

# the service tenant and swift userid and password created in Keystone
admin_tenant_name = service
admin_user = swift
admin_password = swift

[filter:cache]
use = egg:swift#memcache
memcache_servers=10.0.0.154
[filter:catch_errors]
use = egg:swift#catch_errors

[filter:healthcheck]
use = egg:swift#healthcheck

[filter:swift3]
use = egg:swift3#swift3

[filter:s3token]
paste.filter_factory = keystoneclient.middleware.s3_token:filter_factory
auth_port = 35357
auth_host = 10.0.0.151
auth_protocol = http

I have used the following link to install Swift: http://docs.openstack.org/trunk/openstack-object-storage/admin/content/configuring-openstack-object-storage-with-s3_api.html Firstly, I tried installing by apt-get install swift-python-s3, but it didn't installed and gave unable to locate package. then I installed by following these commands: git clone https://github.com/fujita/swift3.git cd swift3; git checkout v1.7 python setup.py install After that I configured the proxy server and got the error message while starting the proxy services.

Another thing - we are using "keystoneclient.middleware.s3_token:filter_factory" but when I see the folder location then i cant see s3_token.py: root@proxy:/usr/lib/python2.7/dist-packages/keystoneclient/middleware# ls auth_token.py __init__.py memcache_crypt.py test.py auth_token.pyc __init__.pyc memcache_crypt.pyc test.pyc root@proxy:/usr/lib/python2.7/dist-packages/keystoneclient/middleware# Does keystoneclient support s3_token? why s3_token.py is missing and can it be the cause for the error message?

Please suggest - thanks

Swift S3 error: No module named s3_token

Hi Experts,

I have managed to get the Swift installation working correctly with the Swift API's using Keystone. But I am currently having issues when starting the Proxy after adding the Swift3 setup into the Proxy config and I was hoping someone could point me in the right direction.

I am receiving the following error when restarting the proxy service using "swift-init proxy restart"

root@proxy:~# swift-init proxy restart
Signal proxy-server  pid: 1707  signal: 15
No proxy-server running
Starting proxy-server...(/etc/swift/proxy-server.conf)
Traceback (most recent call last):
  File "/usr/bin/swift-proxy-server", line 22, in <module>
    run_wsgi(conf_file, 'proxy-server', default_port=8080, **options)
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 119, in run_wsgi
    init_request_processor(conf_file, app_section, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/swift/common/wsgi.py", line 246, in init_request_processor
    app = loadapp('config:%s' % conf_file, global_conf={'log_name': log_name})
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 271, in loadobj
    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/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 562, in _pipeline_app_context
    for name in pipeline[:-1]]
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 458, in get_context
    section)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 517, in _context_from_explicit
    value = import_string(found_expr)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 22, in import_string
    return pkg_resources.EntryPoint.parse("x=" + s).load(False)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
ImportError: No module named s3_token

My current setup is as follows:

Controller(keystone): 10.0.0.151
proxy server: 10.0.0.154
Storage node: 10.0.0.155

Proxy-server.conf :
[DEFAULT]
bind_port = 8080
user = swift

[pipeline:main]
pipeline = catch_errors healthcheck cache swift3 s3token  authtoken keystoneauth proxy-server

[app:proxy-server]
use = egg:swift#proxy
allow_account_management = true
account_autocreate = true

[filter:keystoneauth]
use = egg:swift#keystoneauth
operator_roles = Member,admin,swiftoperator

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory

# Delaying the auth decision is required to support token-less
# usage for anonymous referrers ('.r:*').
delay_auth_decision = true

# cache directory for signing certificate
signing_dir = /home/swift/keystone-signing

# auth_* settings refer to the Keystone server
auth_protocol = http
auth_host = 10.0.0.151
auth_port = 35357

# the same admin_token as provided in keystone.conf
admin_token = ADMIN

# the service tenant and swift userid and password created in Keystone
admin_tenant_name = service
admin_user = swift
admin_password = swift

[filter:cache]
use = egg:swift#memcache
memcache_servers=10.0.0.154
[filter:catch_errors]
use = egg:swift#catch_errors

[filter:healthcheck]
use = egg:swift#healthcheck

[filter:swift3]
use = egg:swift3#swift3

[filter:s3token]
paste.filter_factory = keystoneclient.middleware.s3_token:filter_factory
auth_port = 35357
auth_host = 10.0.0.151
auth_protocol = http

I have used the following link to install Swift: http://docs.openstack.org/trunk/openstack-object-storage/admin/content/configuring-openstack-object-storage-with-s3_api.html Swift:

Firstly, I tried installing by apt-get install swift-python-s3, but it didn't installed and gave unable to locate package. then I installed by following these commands:

 git clone https://github.com/fujita/swift3.git  cd swift3; swift3
 git checkout v1.7  python setup.py install install

After that I configured the proxy server and got the error message while starting the proxy services.

Another thing - we are using "keystoneclient.middleware.s3_token:filter_factory" but when I see the folder location then i cant see s3_token.py:

root@proxy:/usr/lib/python2.7/dist-packages/keystoneclient/middleware# ls 
auth_token.py __init__.py memcache_crypt.py test.py auth_token.pyc __init__.pyc memcache_crypt.pyc test.pyc root@proxy:/usr/lib/python2.7/dist-packages/keystoneclient/middleware# 
test.pyc

Does keystoneclient support s3_token? why s3_token.py is missing and can it be the cause for the error message?

Please suggest - thanks