Ask Your Question
0

error: swift cache could not be found in env!

asked 2013-12-29 11:45:21 -0500

fitros16 gravatar image

After installing everything under the instructions at openstack swift in my VM everything was going good until i typed the following 2 commands as the instructions said at http://docs.openstack.org/developer/swift/development_saio.html#partition-section (http://docs.openstack.org/developer/s...) The first was : curl -v -H 'X-Storage-User: test:tester' -H 'X-Storage-Pass: testing' http://127.0.0.1:8080/auth/v1.0 witch went good and the second: curl -v -H 'X-Auth-Token: ' and then i got 503 internal server error and at the syslog i got the error: proxyserver STDOUT: Error:root:Error: swift.cache could not be found in env! (txn: tx85b3cb5152984fa0b211e-0052c00503) (client_ip: 127.0.0.1) Any ideas why is this happening?

Thanks

edit retag flag offensive close merge delete

17 answers

Sort by » oldest newest most voted
0

answered 2014-01-11 00:53:00 -0500

Nice catch. I moved 'ratelimit' after cache in the pipeline and I no longer have any errors.

Thank you for following up to clarify that...

edit flag offensive delete link more
0

answered 2014-01-10 20:44:29 -0500

torgomatic gravatar image

Those warnings are coming from the ratelimit middleware; it also has to come after cache in the pipeline. Ratelimit won't break the proxy in this case, but it also won't do any limiting.

edit flag offensive delete link more
0

answered 2014-01-10 20:23:56 -0500

Yes, I have cache in the pipeline before the auth middlewares.

I have fixed an issue with my auth middleware, so my 'UnboundLocalError' has been fixed.

I am still getting the following two errors in the proxy.error log, but everything is working: Jan 10 15:17:34 willswift proxy-server: STDOUT: ERROR:root:ERROR: swift.cache could not be found in env! (txn: tx2d94b78541344672bab6d-0052d0555e) Jan 10 15:17:34 willswift proxy-server: Warning: Cannot ratelimit without a memcached client (txn: tx2d94b78541344672bab6d-0052d0555e)

I have verified that memcache is actually working because my auth system in successfully saving and pulling identities from the 'memcache_client' (as defined here: "memcache_client = cache_from_env(env)"). So everything is working, but the errors are still being reported.

I am on Swift 1.11. A co-worker has Swift 1.13 installed and running in dev and he is not seeing these errors, so maybe this issue has been found and solved already.

Thanks for following up. This is not blocking me...

edit flag offensive delete link more
0

answered 2014-01-10 20:09:21 -0500

torgomatic gravatar image

Also, don't forget to make sure "cache" occurs in your pipeline before tempauth, like so:

pipeline = catch_errors proxy-logging cache ...others... tempauth proxy-logging proxy-server

edit flag offensive delete link more
0

answered 2014-01-09 21:54:32 -0500

fitros16 gravatar image

I can't help on these cause i am not at the dev team hehe :) No problems, i hope you can figure it out shortly.

edit flag offensive delete link more
0

answered 2014-01-09 21:49:00 -0500

Ok thank you...

I am able to get tempauth to work, but I am not sure if that means that memcached is working because I get these two errors in my proxy.error file all the time:

Jan 9 16:45:13 willswift proxy-server: STDOUT: ERROR:root:ERROR: swift.cache could not be found in env! (txn: txc75a7ce83d454b479b8c3-0052cf1869) Jan 9 16:45:13 willswift proxy-server: Warning: Cannot ratelimit without a memcached client (txn: txc75a7ce83d454b479b8c3-0052cf1869)

I also have another error, but it might be associated with the auth middleware I wrote. Unfortunately I am not able to see the real error because of the MAXLINES truncation of syslog. :(

memcache_client.set('mauth_creds/%s/%s' % (auth_user, auth_key), (expires, identity), time=env.get('HTTP_X_AUTH_TTL', self.cache_timeout))#012UnboundLocalError: lo

I will see what I can figure out... Thanks for posting back...

edit flag offensive delete link more
0

answered 2014-01-09 21:38:04 -0500

fitros16 gravatar image

Hi, Well this problem still happens on my syslog but now i dont have any problems. The thing that was going wrong with mine server is that when i used startmain to start all the servers the output i got was that all started but they didnt. I started them manually. I used: service swift-proxy restart (or start) service swift-account restart service swift-container restart service swift-object restart

The memcached error is still there.. nothing worked that could remove it.

edit flag offensive delete link more
0

answered 2014-01-09 21:30:21 -0500

Can you please post the final config you used. I am also stuck on this problem and I have tried everything I can think of to get the memcached server and proxy-server to play nice together.

Thanks...

edit flag offensive delete link more
0

answered 2014-01-06 16:07:35 -0500

fitros16 gravatar image

Thanks Mehmet Hacısalihoğlu, that solved my question.

edit flag offensive delete link more
0

answered 2014-01-03 09:47:26 -0500

fitros16 gravatar image

After following the instructions you gave me the same error still pops up in syslog and i get 503 server internal error. Any more ideas? Thanks

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-12-29 11:45:21 -0500

Seen: 130 times

Last updated: Jan 11 '14