swift and Cyberduck

asked 2011-08-24 07:11:58 -0500

chaupv79 gravatar image

Hi everybody

Can someone show me how to make a connection between cyberduck in window to swift storage?

currently i have a situation as below

1) I have swift.1.4.3 installed, I have swauth1.0.2 installed

  • I have already created an admin user:

    swauth-add-user -A http://192.168.0.82:8080/auth/ -K secure_key -a test tester testing

  • And make sure it works:

    swift -A http://192.168.0.82:8080/auth/v1.0 -U test:tester -K testing stat -v

2) I have cyberduck 4.1 installed on window7

=> my problem is: when I make a connection on Swift(Open Stack storage) to my swift on ubuntu 10.04 LTS then it requires user and API Access key

I input as below

username: test.tester API access key: testing

my purpose is to see something like picture or files that stored in ubuntu swift will display in cyberduck,

But...

after a while, cyberduck authenticating as test.tester then, it returns nothing, there is no cyberduck swift connection displaying.

Can anyone help me on this matter?

Thank in advance

edit retag flag offensive close merge delete

30 answers

Sort by ยป oldest newest most voted
0

answered 2011-08-25 06:36:08 -0500

Hi Chau/Marcelo, Cyberduck should be honoring the port specified. We had this issue before see ( http://trac.cyberduck.ch/ticket/5216 ). (However, I think you're correct that ssl is required.)

I'd be curious to know if honoring regressed in Cyberduck. Report findings!

Chau, When you make the request on your ubuntu machine. Does the deployment work with 'https' on the command line?

Do either of these work?

swift -A https://192.168.0.82:8080/auth/v1.0 -U test:tester -K testing stat -v

-or-

curl -k -v -H 'X-Auth-User: test:tester' -H 'X-Auth-Key: testing' https://192.168.0.82:8080/auth/v1.0

-Joe

edit flag offensive delete link more
0

answered 2011-08-25 07:11:09 -0500

chaupv79 gravatar image

Hi Joe

swauth and swift don't work for "https" protocol and 443 port.

I am headache with that problems.

when i try to create new user chau:

swauth-add-user -A https://192.168.0.82:8080/auth/ -K secure_key -a chau chauer chauing

error as below:

root@chaupv-desktop:~# swauth-add-user -A https://192.168.0.82:8080/auth/ -K secure_key -a chau chauer chauing Traceback (most recent call last): File "/usr/local/bin/swauth-add-user", line 7, in execfile(__file__) File "/root/swift/gholt-swauth-69fd700/bin/swauth-add-user", line 76, in ssl=(parsed.scheme == 'https')) File "/root/swift/release/swift/common/bufferedhttp.py", line 168, in http_connect_raw conn.endheaders() File "/usr/lib/python2.6/httplib.py", line 904, in endheaders self._send_output() File "/usr/lib/python2.6/httplib.py", line 776, in _send_output self.send(msg) File "/usr/lib/python2.6/httplib.py", line 735, in send self.connect() File "/usr/lib/python2.6/httplib.py", line 1112, in connect self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file) File "/usr/lib/pymodules/python2.6/eventlet/green/ssl.py", line 310, in wrap_socket return GreenSSLSocket(sock, a, *kw) File "/usr/lib/pymodules/python2.6/eventlet/green/ssl.py", line 47, in __init__ super(GreenSSLSocket, self).__init__(sock.fd, args, *kw) File "/usr/lib/python2.6/ssl.py", line 118, in __init__ self.do_handshake() File "/usr/lib/pymodules/python2.6/eventlet/green/ssl.py", line 218, in do_handshake super(GreenSSLSocket, self).do_handshake) File "/usr/lib/pymodules/python2.6/eventlet/green/ssl.py", line 78, in _call_trampolining return func(a, *kw) File "/usr/lib/python2.6/ssl.py", line 293, in do_handshake self._sslobj.do_handshake()

ssl.SSLError: [Errno 1] _ssl.c:480: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

when i try to test on user "tim" with "https": curl -v -H 'X-Storage-User: tim:timmer' -H 'X-Storage-Pass: timming' https://192.168.0.80:8080/auth/v1.0

output=>

curl -v -H 'X-Storage-User: tim:timmer' -H 'X-Storage-Pass: timming' https://127.0.0.1:8080/auth/v1.0 * About to connect() to 127.0.0.1 port 8080 (#0) * Trying 127.0.0.1... connected * Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0) * successfully set certificate verify locations: * CAfile: none CApath: /etc/ssl/certs * SSLv3, TLS handshake, Client hello (1): * error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol * Closing connection #0 curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol=> * About to connect() to 127.0.0.1 port 8080 (#0) * Trying 127.0.0.1... connected * Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0) * successfully set certificate verify locations: * CAfile: none CApath: /etc/ssl/certs * SSLv3, TLS handshake, Client hello (1): * error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol * Closing connection #0 curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

==============================

Do you have any idea? Joe?

Thank you

edit flag offensive delete link more
0

answered 2011-08-25 07:56:53 -0500

chaupv79 gravatar image

Hi Joe/Marcelo

Hi everybody

can anyone show me how to enable "https" on swift?

edit flag offensive delete link more
0

answered 2011-08-25 15:29:43 -0500

btorch gravatar image

ok,

  • First, you need to create the cert/key and also enable them in the proxy-server.conf (assuming you haven't done so already) --> cert_file = /etc/swift/cert.crt --> key_file = /etc/swift/cert.key

I'm also assuming here that your "bind_port" is set to 443

  • Under the swauth section you will also need to add the "default_swift_cluster" option

default_swift_cluster = local#https://192.168.0.80:443//v1#https://127.0.0.1:443/v1

Then restart the proxy

  • Now, you will need to either create a new swauth account/user so that it picks up the new storageUrl or change the storageUrl for the old account with "swauth-set-account-service " tool
edit flag offensive delete link more
0

answered 2011-08-26 04:43:33 -0500

chaupv79 gravatar image

sorry, default_swift_cluster should be:

default_swift_cluster = local#https://192.168.0.15:443/v1#https://127.0.0.1:443/v1

edit flag offensive delete link more
0

answered 2011-08-26 04:44:00 -0500

chaupv79 gravatar image

2) when I create new users on "https"

swauth-add-user -A https://192.168.0.15:443/auth/ -K chaupv79 -a chau chauer chauing

=> error

root@chaupv-desktop:~/swift/trunk# swauth-add-user -A https://192.168.0.15:443/auth/ -K chaupv79 -a chau chauer chauing

Account creation failed: 500 Server Error User creation failed: 500 Server Error

Do you know why, Marcelo?

edit flag offensive delete link more
0

answered 2011-08-26 05:44:57 -0500

chaupv79 gravatar image

Sorry, I need to add enough information

I had created account before creating user

root@chaupv-desktop:~/swift/trunk# swauth-add-account -A https://192.168.0.15:443/auth/ -K chaupv79 chau

and the error 500 occurs =>

Account creation failed: 500 Server Error

edit flag offensive delete link more
0

answered 2011-08-26 13:27:13 -0500

btorch gravatar image

What do the logs show?

Have you stopped all the swift services and started them again just in case? And also verified that all are indeed running

What is the output if you just do a swauth-list? Same error?

I also noticed that your cache line does not specify a memcache server but I believe it might default to localhost. Try restarting memcached as well

Chau Pham question169028@answers.launchpad.net wrote:

Question #169028 on OpenStack Object Storage (swift) changed: https://answers.launchpad.net/swift/+question/169028 (https://answers.launchpad.net/swift/+...)

Chau Pham gave more information on the question: Sorry, I need to add enough information

I had created account before creating user

root@chaupv-desktop:~/swift/trunk# swauth-add-account -A https://192.168.0.15:443/auth/ -K chaupv79 chau

and the error 500 occurs =>

Account creation failed: 500 Server Error


You received this question notification because you are a direct subscriber of the question.

edit flag offensive delete link more
0

answered 2011-08-26 14:48:24 -0500

chaupv79 gravatar image

Hi Marcelo,

Thank you for your reply.

to make sure I have restarted all server by

  • swift-init stop all
  • swift-init start all

after I reset all services, I dare to make sure all services are running.

I create swift account again

swauth-add-account -K chaupv79 -A https://192.168.0.15:443/auth/ chau

=> Account creation failed: 500 Server Error

Log ===================proxy.log=========== root@chaupv:~/swift/trunk# cat /var/log/swift/proxy.log Aug 26 11:32:10 chaupv proxy-server - - 26/Aug/2011/02/32/10 HEAD /v1/AUTH_.auth/chau HTTP/1.0 404 - Swauth - - - - - - 0.0196 Aug 26 11:32:10 chaupv proxy-server - - 26/Aug/2011/02/32/10 PUT /v1/AUTH_.auth/chau HTTP/1.0 404 - Swauth - - - - - - 0.0009 root@chaupv:~/swift/trunk#

===================proxy.error========== root@chaupv:~/swift/trunk# cat /var/log/swift/proxy.error Aug 26 11:28:00 chaupv proxy-server Started child 5039 Aug 26 11:29:47 chaupv proxy-server SIGTERM received Aug 26 11:29:47 chaupv proxy-server Exited Aug 26 11:30:02 chaupv proxy-server Started child 5457 Aug 26 11:32:10 chaupv proxy-server STDOUT: EXCEPTION IN handle: Traceback (most recent call last):#012 File "/usr/local/lib/python2.6/dist-packages/swauth-1.0.3.dev-py2.6.egg/swauth/middleware.py", line 415, in handle#012 return self.handle_request(req)(env, start_response)#012 File "/usr/local/lib/python2.6/dist-packages/swauth-1.0.3.dev-py2.6.egg/swauth/middleware.py", line 482, in handle_request#012 req.response = handler(req)#012 File "/usr/local/lib/python2.6/dist-packages/swauth-1.0.3.dev-py2.6.egg/swauth/middleware.py", line 720, in handle_put_account#012 'account: %s %s' % (path, resp.status))#012Exception: Could not create account within main auth account: /v1/AUTH_.auth/chau 404 Not Found#012: {'SCRIPT_NAME': '/auth/v2/chau', 'webob.adhoc_attrs': {'start_time': 1314325930.8969491, 'bytes_transferred': '-', 'client_disconnect': False}, 'REQUEST_METHOD': 'PUT', 'PATH_INFO': '', 'SERVER_PROTOCOL': 'HTTP/1.0', 'QUERY_STRING': '', 'eventlet.posthooks': [(<bound method="" swauth.posthooklogger="" of="" <swauth.middleware.swauth="" object="" at="" 0x2be3190="">>, (<request at="" 0x2c3f3d0="" put="" https:="" 192.168.0.15="" auth="" v2="" chau="">,), {})], 'SERVER_NAME': '192.168.0.15', 'REMOTE_ADDR': '192.168.0.15', 'eventlet.input': <eventlet.wsgi.input object="" at="" 0x2c28450="">, 'HTTP_X_AUTH_ADMIN_KEY': 'chaupv79', 'wsgi.url_scheme': 'https', 'SERVER_PORT': '443', 'HTTP_X_AUTH_ADMIN_USER': '.super_admin', 'HTTP_X_CF_TRANS_ID': 'txc5b99ca4-ca75-4d69-bd65-1bd6e88bcde1', 'wsgi.input': <eventlet.wsgi.input object="" at="" 0x2c28450="">, 'HTTP_HOST': '192.168.0.15', 'swift.cache': <swift.common.memcached.memcachering object="" at="" 0x2c3f290="">, 'HTTPS': 'on', 'wsgi.multithread': True, 'wsgi.version': (1, 0), 'GATEWAY_INTERFACE': 'CGI/1.1', 'wsgi.run_once': False, 'wsgi.errors': <swift.common.utils.loggerfileobject object="" at="" 0x2b704d0="">, 'wsgi.multiprocess': False, 'CONTENT_TYPE': None, 'HTTP_ACCEPT_ENCODING': 'identity'}

I will wait for your answer, Marcelo

Thank you

edit flag offensive delete link more
0

answered 2011-08-26 16:25:45 -0500

btorch gravatar image

Hmm I noticed that you changed the "super_admin_key" from the first post of the proxy-server.conf to the second post. I assume this is a different SAIO setup as well, right ? since I noticed the IP changes as well.

Anyway,

Are you able to get anything from "swauth-list -K chaupv79 -A https://127.0.0.1:443/auth/ " ?

I haven't used this version of swauth "swauth-1.0.3.dev", there could be some bugs on that one I guess.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2011-08-24 07:11:58 -0500

Seen: 1,083 times

Last updated: Jun 24 '12