Unable to add account (swauth-add-account hangs)

Asked by Bob

Hi,

swauth-prep -K XXXXXXXXXXXX -A https://XXXXXX:8080/auth/

Seems to work (or at least it returns quickly)

But when trying :

swauth-add-account -K XXXXXXXXX -A https://XXXXXXXXXX:8080/auth/ demo
or
swauth-add-user -K XXXXXXXXXXXX -A https://XXXXXXXXXXXX:8080/auth/ -a demo me XXXXXXXXX

both just hang.

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
gholt
Solved:
Last query:
Last reply:
Revision history for this message
Anne Gentle (annegentle) said :
#1

Hi Bob -
A couple of things to check.

For https, possibly the port should be 443 instead of 8080.

Also, put /v1.0 after /auth in the URL for the swauth-add-account and swauth-add-user commands.

Let us know if that works. I've struggled with it myself and I'm working to make the doc more clear as well. Thanks for trying it out!
Anne

Revision history for this message
Bob (rclocal) said :
#2

Hi Anne,

Thanks for the reply.

In relation to adding /v1.0.... I get "Account creation failed: 400 Bad Request" or "User creation failed: 400 Bad Request".

443 yields...
Traceback (most recent call last):
  File "/usr/bin/swauth-add-user", line 76, in <module>
    ssl=(parsed.scheme == 'https'))
  File "/usr/lib/pymodules/python2.7/swift/common/bufferedhttp.py", line 168, in http_connect_raw
    conn.endheaders()
  File "/usr/lib/python2.7/httplib.py", line 951, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 811, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 773, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 1154, in connect
    self.timeout, self.source_address)
  File "/usr/lib/pymodules/python2.7/eventlet/green/socket.py", line 59, in create_connection
    raise error, msg
socket.error: [Errno 111] ECONNREFUSED

So I guess 8080 is right.

Revision history for this message
Best gholt (gholt) said :
#3

With all the swauth commands the v1.0 should not be there, just trailing off with /auth/

Many times the problem is the default_swift_cluster setting, if that's not set properly when Swauth goes to make the actual storage account it can hang trying to connect. It defaults to http://127.0.0.1:8080/v1 and you probably want to use https:

[filter:swauth]
default_swift_cluster = local#https://127.0.0.1:8080/v1

Revision history for this message
Bob (rclocal) said :
#4

Awesome ! Thanks gholt.

Big thumbs down to the documentation ! ;-(

Revision history for this message
Bob (rclocal) said :
#5

Thanks gholt, that solved my question.

Revision history for this message
gholt (gholt) said :
#6

Aw man, you both complemented and chastised me. :)

Seriously, though, if you've found problems with the docs please leave comments on the docs themselves or pop a quick bug report on the specifics if you could.

Revision history for this message
Bob (rclocal) said :
#7

Hi,

Have commented the docs already, but I'll file a bug too as I guess it's easier for you guys to track it than trawling through comments in the docs !

Keep up the good work.

Revision history for this message
gholt (gholt) said :
#8

Cool. Thanks for the reports, Bob!

Revision history for this message
Anne Gentle (annegentle) said :
#9

Aw and I thought I was being super responsive, changing the docs within an hour of your comment. :) I'll fix the next item on the list and also address the remaining issue with the https remaining in the filter:swauth section. Thanks Bob for the details.