unable to create containers

Asked by Muhammad Raheel Arshad

Dear All,

I installed a Swift on Ubuntu 12.04 using this guide:
http://docs.openstack.org/developer/swift/development_saio.html

Everything worked fine upto this document. I am able to authenticate and list containers but was unable to create containers using both curl and swift client.

Here is the errors I get when I try to create containers:
----------------------------------------------------------------------------------------------------------------------------------------------
swift -A https://10.0.0.200/auth/v1.0 -U test:tester -K testing post newcontainer

Container PUT failed: https://10.0.0.200:443/v1/AUTH_test/newcontainer 404 Not Found [first 60 chars of response] <html><h1>Not Found</h1><p>The resource could not be found.<
--------------------------------------------------------------------------------------------------------------------------------------------
curl -k -X PUT -H 'X-Auth-Token: AUTH_tk096c7d1f579e4f2ba6b7623c6b06aae8' https://10.0.0.200/v1.0/AUTH_test/myfolder

<html><h1>Not Found</h1><p>The resource could not be found.</p></html>
--------------------------------------------------------------------------------------------------------------------------------------------
I tried alot but no use. Anyone can help me on this?

Regards,
Raheel

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
clayg
Solved:
Last query:
Last reply:
Revision history for this message
Best clayg (clay-gerrard) said :
#1

A 404 on a PUT means the "group of things" above the request failed the existence check. So if you get a 404 on object PUT it's because the proxy failed the container existence check. If you get a 404 on a container PUT it's because the proxy failed the account existence check.

Check the following:

1) are you running account_autocreate? You should, it is normally on by default [1]
2) are you running with 0 recheck_account_existence? 'cause that's broken [2]

I'm curious if when you list/stat the account does it have any containers in it? Swift will lazy provision authorized accounts, and that code has been worked on in the last development cycle. If you have containers/objects in then the account definitely has a real physical data file and then it definitely exists - but if there's no data in the account it can mean different things from a troubleshooting perspective. There may be some backend error talking to the account servers - if you're unable to resolve the issue thoroughly examine any ERROR lines from /var/log/syslog for messages relating to problems connecting to account servers.

1. http://docs.openstack.org/developer/swift/deployment_guide.html#proxy-server-configuration
2. see: https://bugs.launchpad.net/swift/+bug/1224734

Revision history for this message
Muhammad Raheel Arshad (raheel-com88) said :
#4

Thanks clayg, that solved my question.

Revision history for this message
clayg (clay-gerrard) said :
#5

Wait what solved your issue? Was the account autocreate failing and you didn't get a server error - cause that may be a bug?

Revision history for this message
Muhammad Raheel Arshad (raheel-com88) said :
#6

Actually account autocreate is not failing. Problem is with permission on /srv/[1-4]/. I corrected the permission and it's solved now.

Revision history for this message
clayg (clay-gerrard) said :
#7

well, I think the whole thing would have been better if your container create returned a server error instead of 404 trying to make it sound like it was the clients fault - but I'm glad you got it figured out.

https://bugs.launchpad.net/swift/+bug/1229382

Revision history for this message
Kashyap Kopparam (kashyapk) said :
#9

I am getting the same error. I am running the account_autocreate on proxy_server. I have checked the permissions on /srv/node/ too. But I'm still getting the error. Here is my /etc/log/messages. I have had no luck solving this.

May 20 16:20:21 controller account-server: 10.4.3.34 - - [20/May/2014:10:50:21 +0000] "HEAD /sdb1/88/AUTH_e4ebbd74dec746cd9a7aa89e9d30cc55" 204 - "tx4c8e0b179d1f406d90381-00537b336d" "HEAD http://controller:8080/v1/AUTH_e4ebbd74dec746cd9a7aa89e9d30cc55" "proxy-server 26756" 0.0027 ""
May 20 16:20:21 controller account-server: 10.4.3.34 - - [20/May/2014:10:50:21 +0000] "PUT /sdb1/214/AUTH_e4ebbd74dec746cd9a7aa89e9d30cc55/c1" 404 - "tx4c8e0b179d1f406d90381-00537b336d" "PUT http://controller:8080/v1/AUTH_e4ebbd74dec746cd9a7aa89e9d30cc55/c1" "proxy-server 26756" 0.0002 ""
May 20 16:20:21 controller account-server: 10.4.3.34 - - [20/May/2014:10:50:21 +0000] "HEAD /sdb1/214/AUTH_e4ebbd74dec746cd9a7aa89e9d30cc55/c1" 400 64 "tx1a9f0faac2e047ba8085e-00537b336d" "HEAD http://controller:8080/v1/AUTH_e4ebbd74dec746cd9a7aa89e9d30cc55/c1" "proxy-server 26760" 0.0008 ""
May 20 16:20:21 controller account-server: 10.4.3.34 - - [20/May/2014:10:50:21 +0000] "HEAD /sdb1/57/AUTH_e4ebbd74dec746cd9a7aa89e9d30cc55/c1/test.txt" 400 72 "tx1a9f0faac2e047ba8085e-00537b336d" "HEAD http://controller:8080/v1/AUTH_e4ebbd74dec746cd9a7aa89e9d30cc55/c1/test.txt" "proxy-server 26760" 0.0003 ""

Revision history for this message
wangolo (wangoloj) said :
#10

I used to get the same error but the second point from "clagy worked for me "
2) are you running with 0 recheck_account_existence? 'cause that's broken [2] i set it up to a higher number and now i can create
containers