swift error 400 Bad Request

Asked by jarcas on 2013-10-02

Hi!
I'm trying to display container information, but it appears an error when I run the following command:
curl -v -X GET -H 'X-Auth-Token: AUTH_tk63c1aba472b24426a972ae33450f047a' http://46.165.255.5:443/v1/AUTH_test -k

* About to connect() to 46.165.255.5 port 443 (#0)
* Trying 46.165.255.5... connected
> GET /v1/AUTH_test HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: 46.165.252.5:443
> Accept: */*
> X-Auth-Token: AUTH_tk63c1aba472b24426a972ae33450f047a
>
< HTTP/1.1 400 Bad Request
< Content-Length: 38
< Content-Type: text/html; charset=UTF-8
< X-Trans-Id: tx70d345bc483944dbb2de5ae336eab03d
< Date: Wed, 02 Oct 2013 10:26:50 GMT
<
* Connection #0 to host 46.165.255.5 left intact
* Closing connection #0

I attach the .conf files and logs. As you can see, I use a mounted directory: /mnt/node0, because I can't make a partition.

thanks!

---
remakerings.sh
rm -f *.builder *.ring.gz backups/*.builder backups/*.ring.gz

swift-ring-builder object.builder create 10 3 1
swift-ring-builder object.builder add z1-46.165.255.5:6010/mnt/node0 1
swift-ring-builder object.builder rebalance
swift-ring-builder container.builder create 10 3 1
swift-ring-builder container.builder add z1-46.165.255.5:6011/mnt/node0 1
swift-ring-builder container.builder rebalance
swift-ring-builder account.builder create 10 3 1
swift-ring-builder account.builder add z1-46.165.255.5:6012/mnt/node0 1
swift-ring-builder account.builder rebalance

-----
account-server.conf

[DEFAULT]
devices = /mnt/node0
mount_check = false
bind_port = 6012
user = root
log_facility = LOG_LOCAL2

[pipeline:main]
pipeline = account-server

[app:account-server]
use = egg:gluster_swift_ufo#account

[account-replicator]
vm_test_mode = yes

[account-auditor]

[account-reaper]

------
object-server.conf

[DEFAULT]
devices = /mnt/node0
mount_check = true
bind_port = 6010
user = root
log_facility = LOG_LOCAL2

[pipeline:main]
pipeline = object-server

[app:object-server]
use = egg:gluster_swift_ufo#object

[object-replicator]
vm_test_mode = yes

[object-updater]

[object-auditor]

-------
container-server.conf

DEFAULT]
devices = /mnt/node0
mount_check = false
bind_port = 6011
user = root
log_facility = LOG_LOCAL2

[pipeline:main]
pipeline = container-server

[app:container-server]
use = egg:gluster_swift_ufo#container

[container-replicator]
vm_test_mode = yes

[container-updater]

[container-auditor]

[container-sync]

-----
syslog:

12:30:26 NCSL007 account-replicator Beginning replication run
Oct 2 12:30:26 NCSL007 account-replicator Replication run OVER
Oct 2 12:30:26 NCSL007 account-replicator Attempted to replicate 0 dbs in 0.00083 seconds (0.00000/s)
Oct 2 12:30:26 NCSL007 account-replicator Removed 0 dbs
Oct 2 12:30:26 NCSL007 account-replicator 0 successes, 0 failures
Oct 2 12:30:26 NCSL007 account-replicator no_change:0 ts_repl:0 diff:0 rsync:0 diff_capped:0 hashmatch:0 empty:0
Oct 2 12:30:36 NCSL007 account-server 46.165.252.5 - - [02/Oct/2013:10:30:36 +0000] "GET /mnt/node0/221/AUTH_test" 400 38 "txc03a534cf7484d66934010109d3d05d1" "-" "curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3" 0.0002 ""
Oct 2 12:30:36 NCSL007 proxy-server 46.165.236.183 46.165.236.183 02/Oct/2013/10/30/36 GET /v1/AUTH_test HTTP/1.0 400 - curl/7.22.0%20%28x86_64-pc-linux-gnu%29%20libcurl/7.22.0%20OpenSSL/1.0.1%20zlib/1.2.3.4%20libidn/1.23%20librtmp/2.3 test%2CAUTH_tk63c1aba472b24426a972ae33450f047a - 38 - txc03a534cf7484d66934010109d3d05d1 - 0.0037 -
Oct 2 12:30:42 NCSL007 container-replicator Beginning replication run
Oct 2 12:30:42 NCSL007 container-replicator Replication run OVER
Oct 2 12:30:42 NCSL007 container-replicator Attempted to replicate 0 dbs in 0.00078 seconds (0.00000/s)
Oct 2 12:30:42 NCSL007 container-replicator Removed 0 dbs
Oct 2 12:30:42 NCSL007 container-replicator 0 successes, 0 failures
Oct 2 12:30:42 NCSL007 container-replicator no_change:0 ts_repl:0 diff:0 rsync:0 diff_capped:0 hashmatch:0 empty:0
Oct 2 12:30:46 NCSL007 account-replicator Beginning replication run
Oct 2 12:30:46 NCSL007 account-replicator Replication run OVER
Oct 2 12:30:46 NCSL007 account-replicator Attempted to replicate 0 dbs in 0.00077 seconds (0.00000/s)
Oct 2 12:30:46 NCSL007 account-replicator Removed 0 dbs
Oct 2 12:30:46 NCSL007 account-replicator 0 successes, 0 failures
Oct 2 12:30:46 NCSL007 account-replicator no_change:0 ts_repl:0 diff:0 rsync:0 diff_capped:0 hashmatch:0 empty:0
Oct 2 12:30:52 NCSL007 object-replicator Starting object replication pass.
Oct 2 12:30:52 NCSL007 object-replicator mnt/node0 is not mounted
Oct 2 12:30:52 NCSL007 object-replicator Nothing replicated for 0.000529050827026 seconds.
Oct 2 12:30:52 NCSL007 object-replicator Object replication complete. (0.00 minutes)

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Last query:
2013-10-02
Last reply:
2013-10-02
Samuel Merritt (torgomatic) said : #1

Okay, a few things:

First: you posted what looks like a real auth token and a real IP address. I'm not going to go poking around in your Swift cluster, but you really ought to restart memcached to invalidate that token (now!), and redact tokens in the future. This is a public forum.

Second: you've omitted some information here. In the response, curl showed a header "Content-Length: 38", but the response body isn't in what you pasted here. Those 38 bytes would be an excellent clue as to what's going on.

Third: your rings are wonky. The device name in the ring is the thing under the mount point. You either want "devices = /mnt" and "node0" in the ring, or you want to keep "devices = /mnt/node0" and put the directory in /mnt/node0 in the ring.

Can you help with this problem?

Provide an answer of your own, or ask jarcas for more information if necessary.

To post a message you must log in.