Ask Your Question
0

Swift S3 error: No module named s3_token

asked 2013-08-07 09:16:35 -0600

rohitgupta80 gravatar image

Hi Experts,

I have used the following docs to deploy multi-node staging environment for openstack:

https://github.com/mseknibilel/OpenStack-Grizzly-Install-Guide/blob/OVS_MultiNode/OpenStack_Grizzly_Install_Guide.rst (https://github.com/mseknibilel/OpenSt...) http://docs.openstack.org/grizzly/openstack-object-storage/admin/content/ (http://docs.openstack.org/grizzly/ope...)

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" Swift S3 error: No module named s3_token

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 ... (more)

edit retag flag offensive close merge delete

5 answers

Sort by » oldest newest most voted
0

answered 2017-08-07 11:43:05 -0600

C0nstantin gravatar image

I think up, https://github.com/openstack/keystonemiddleware/blob/master/keystonemiddleware/s3_token.py (https://github.com/openstack/keystone...) and working now change paste.filter_factory = keystoneclient.middleware.s3_token:filter_factory

to

paste.filter_factory = keystonemiddleware.s3_token:filter_factory

edit flag offensive delete link more
0

answered 2013-08-07 15:42:22 -0600

clay-gerrard gravatar image

in the s3token section, change

paste.filter_factory = keystoneclient.middleware.s3_token:filter_factory

to

paste.filter_factory = keystone.middleware.s3_token:filter_factory

according to:

https://github.com/fujita/swift3#install

... You'll need to first install keystone:

https://github.com/openstack/keystone/blob/master/keystone/middleware/s3_token.py (https://github.com/openstack/keystone...)

edit flag offensive delete link more
0

answered 2013-08-07 15:49:37 -0600

rohitgupta80 gravatar image

Thanks clayg, that solved my question.

edit flag offensive delete link more
0

answered 2013-08-07 15:54:49 -0600

rohitgupta80 gravatar image

Hi Clayg,

I already followed your suggestions and made it work. now my issue is how can I test using boto. I have installed the boto using the following command "git clone https://github.com/boto/boto.g.. . cd boto; sudo python setup.py install".

Now when i am entering the following command : "connection = boto.connect_s3(aws_access_key_id='service:swift', aws_secret_access_key='swift', port=8080, host='10.0.0.154',is_secure=False, calling_format=boto.s3.connection.OrdinaryCallingFormat())" - i am receiving the following error message:

bash: syntax error near unexpected token '(

Please suggest!!

Besides, I have downloaded cloudberry explorer and created s3 compatible account but I am confused as what should be entered into service account field? when I enter the ip address of the keystone server along with the tenant:user + password details then I can connect but the moment I try creating the bucket it throws the following error in tha application -

2013-08-07 16:53:25,891 [UI] [1] INFO - Show "Retrieving data..." on left panel 2013-08-07 16:53:25,899 [UI] [15] INFO - Browse folder // (swift s3) 2013-08-07 16:53:25,899 [UI] [15] INFO - Received 0 elements from // 2013-08-07 16:53:30,821 [S3] [1] INFO - CreateBucket start, bucket: ccc location: US 2013-08-07 16:53:30,824 [Base] [1] ERROR - Internal do request error. Retry failed: attempts left 2 System.Net.WebException The remote name could not be resolved: 'ccc.192.168.4.43' at dV.A(HttpWebRequest , HttpWebResponse , WebException , Boolean , Action1 , fN ) at dV.A(dw , Action1 , HttpWebRequest , Ep ) at dV.A(Ee ) at dV.dv.A(Ee )

2013-08-07 16:53:31,633 [Base] [1] ERROR - Internal do request error. Retry failed: attempts left 1 System.Net.WebException The remote name could not be resolved: 'ccc.192.168.4.43' at dV.A(HttpWebRequest , HttpWebResponse , WebException , Boolean , Action1 , fN ) at dV.A(dw , Action1 , HttpWebRequest , Ep ) at dV.A(Ee ) at dV.dv.A(Ee )

2013-08-07 16:53:33,242 [Base] [1] ERROR - Internal do request error. Retry failed: attempts left 0 System.Net.WebException The remote name could not be resolved: 'ccc.192.168.4.43' at dV.A(HttpWebRequest , HttpWebResponse , WebException , Boolean , Action1 , fN ) at dV.A(dw , Action1 , HttpWebRequest , Ep ) at dV.A(Ee ) at dV.dv.A(Ee )

2013-08-07 16:53:33,250 [S3] [1] INFO - CreateBucket ready: bucket: ccc, location: US, status: -1 2013-08-07 16:53:33,250 [S3] [1] ERROR - Http response status: -1: No more retry attempts 2013-08-07 16:53:33,257 [S3] [1] ERROR - The remote name could not be resolved: 'ccc.192.168.4.43' 2013-08-07 16:53:33,264 [S3] [1] ERROR - CreateBucket failed for bucket: ccc, location: US CloudBerryLab.Base.Exceptions.ClientLibException The remote name could not be resolved: 'ccc.192.168.4.43'

System.Net.WebException The remote name could not be resolved: 'ccc.192.168.4.43' at dV.A(HttpWebRequest , HttpWebResponse , WebException , Boolean , Action1 , fN ) at dV.A(dw , Action1 , HttpWebRequest , Ep ) at dV.A(Ee ... (more)

edit flag offensive delete link more
0

answered 2013-08-07 16:05:29 -0600

clay-gerrard gravatar image

It sounds like you entered that python code into a bash prompt.

I've never used cloudberry explorer.

Launchpad questions is not a good place for an interactive discussion. If you have solved your original issue please mark this question as answered. If you have additional questions, you can often find quick support for swift related issues in #openstack-swift on Freenode. Hope to see you there!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-08-07 09:16:35 -0600

Seen: 365 times

Last updated: Aug 07 '17