Swift not creating container rados gateway

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi There,

 I have done the exact steps u mentioned here, but I could not find the
issue in my case(I was using Ubuntu 14.04 though).
 We  are getting 400 Bad Request from swiftclient.

So I would request you to send me the version of swiftclient u are using,
also to be on safer side can you have 'hostname --fqdn' in something like "
ceph-firefly.example.com". You will have to make changes in rgw.conf only,
and restart httpd, radosgw, ceph.

Having both 'hostname' and 'hostname -f' is OK. Just to be a bit  cautious
I am suggesting it.


On Thu, Jul 31, 2014 at 1:47 PM, ?? ?? <yamashita at ossl.co.jp> wrote:

> Hi , All
>
>
> swift stat and list commnad works buti can not create a container.
> swift post command Error occurs.
> (Container POST failed: http://EXFS1/swift/v1/test 400 Bad Request
>  [first 60 chars of response] <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML
> 2.0//EN">) .
>
> # swift  --debug -A http://EXFS1/auth -U testuser:swift -K
> "bVwgc167mmLDVwpw4ufTkurK3vHp0G3MxAXpevQl" post test
> INFO:urllib3.connectionpool:Starting new HTTP connection (1): EXFS1
> DEBUG:urllib3.connectionpool:"GET /auth HTTP/1.1" 204 0
> DEBUG:swiftclient:REQ: curl -i http://EXFS1/auth -X GET
> DEBUG:swiftclient:RESP STATUS: 204 No Content
> DEBUG:swiftclient:RESP HEADERS: [('connection', 'close'),
> ('x-storage-token',
> 'AUTH_rgwtk0e00000074657374757365723a73776966746adff3e2426a97129223db53587e5623d9919a23dd00ae053a415d768ad3ce4e7319bfbd'),
> ('date', 'Thu, 31 Jul 2014 05:20:18 GMT'), ('x-storage-url', '
> http://EXFS1/swift/v1'), ('x-auth-token',
> 'AUTH_rgwtk0e00000074657374757365723a73776966746adff3e2426a97129223db53587e5623d9919a23dd00ae053a415d768ad3ce4e7319bfbd'),
> ('content-type', 'application/json'), ('server', 'Apache/2.2.22 (Fedora)')]
> INFO:urllib3.connectionpool:Starting new HTTP connection (1): EXFS1
> DEBUG:urllib3.connectionpool:"POST /swift/v1/test HTTP/1.1" 400 226
> INFO:swiftclient:REQ: curl -i http://EXFS1/swift/v1/test -X POST -H
> "Content-Length: 0" -H "X-Auth-Token:
> AUTH_rgwtk0e00000074657374757365723a73776966746adff3e2426a97129223db53587e5623d9919a23dd00ae053a415d768ad3ce4e7319bfbd"
> INFO:swiftclient:RESP STATUS: 400 Bad Request
> INFO:swiftclient:RESP HEADERS: [('date', 'Thu, 31 Jul 2014 05:20:18 GMT'),
> ('content-length', '226'), ('content-type', 'text/html;
> charset=iso-8859-1'), ('connection', 'close'), ('server', 'Apache/2.2.22
> (Fedora)')]
> INFO:swiftclient:RESP BODY: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML
> 2.0//EN">
> <html><head>
> <title>400 Bad Request</title>
> </head><body>
> <h1>Bad Request</h1>
> <p>Your browser sent a request that this server could not understand.<br />
> </p>
> </body></html>
>
> ERROR:swiftclient:Container POST failed: http://EXFS1/swift/v1/test 400
> Bad Request  [first 60 chars of response] <!DOCTYPE HTML PUBLIC
> "-//IETF//DTD HTML 2.0//EN">
> <html><he
> Traceback (most recent call last):
>   File "/opt/stack/python-swiftclient/swiftclient/client.py", line 1208,
> in _retry
>     rv = func(self.url, self.token, *args, **kwargs)
>   File "/opt/stack/python-swiftclient/swiftclient/client.py", line 736, in
> post_container
>     http_response_content=body)
> ClientException: Container POST failed: http://EXFS1/swift/v1/test 400
> Bad Request  [first 60 chars of response] <!DOCTYPE HTML PUBLIC
> "-//IETF//DTD HTML 2.0//EN">
> <html><he
> Container POST failed: http://EXFS1/swift/v1/test 400 Bad Request  [first
> 60 chars of response] <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <html><he
>
>
> "swift stat" and "swift list" command in information can see.
> # swift  -A http://EXFS1/auth -U testuser:swift -K
> "bVwgc167mmLDVwpw4ufTkurK3vHp0G3MxAXpevQl" stat
>        Account: v1
>     Containers: 0
>        Objects: 0
>          Bytes: 0
>         Server: Apache/2.2.22 (Fedora)
>     Connection: close
> X-Account-Bytes-Used-Actual: 0
>   Content-Type: text/plain; charset=utf-8
>
> # swift  -A http://EXFS1/auth -U testuser:swift -K
> "bVwgc167mmLDVwpw4ufTkurK3vHp0G3MxAXpevQl" list
> (Nothing)
>
>
> What should I do?
> Please help my problem.
>
> *Rados GW Server information
> CentOS release 6.5
> # ceph -v
> ceph version 0.80.4 (7c241cfaa6c8c068bc9da8578ca00b9f4fc7567f)
> # hostname -f
> EXFS1
>
> *Steps i did install
>
> 1)Install Apache and FastCGI.
> # yum update && yum install httpd mod_fastcgi
>
>
> 2)Change the httpd.conf file
> # vi /etc/httpd/conf/httpd.conf
> ServerName EXFS1  #add hostname -f
>
>
> 3)Install mod_ssl and openssl
> # yum install mod_ssl openssl
>
>
> 4)Generate a certificate and copy it the appropriate locations.
> # openssl genrsa -out ca.key 2048
> # openssl req -new -key ca.key -out ca.csr
> # openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt
> # cp ca.crt /etc/pki/tls/certs
> # cp ca.key /etc/pki/tls/private/ca.key
> # cp ca.csr /etc/pki/tls/private/ca.csr
>
>
> 5)Http service start
> # /etc/init.d/httpd start
>
>
> 6)radosGW install
> # yum install ceph-radosgw ceph
>
>
> *Steps i did setting
>
> 1)Create a client.radosgw.gateway keyring
> # ceph-authtool --create-keyring /etc/ceph/ceph.client.radosgw.keyring
> # chmod +r /etc/ceph/ceph.client.radosgw.keyring
> # ceph-authtool /etc/ceph/ceph.client.radosgw.keyring -n
> client.radosgw.gateway --gen-key
> # ceph-authtool -n client.radosgw.gateway --cap osd 'allow rwx' --cap mon
> 'allow rw' /etc/ceph/ceph.client.radosgw.keyring
> # ceph -k /etc/ceph/ceph.client.admin.keyring auth add
> client.radosgw.gateway -i /etc/ceph/ceph.client.radosgw.keyring
>
> client.radosgw.gateway
>         key: AQA5ltRT6DEEBRAA5oGPolWuwuqFrUEzXabcKw==
>         caps: [mon] allow rw
>         caps: [osd] allow rwx
>
>
> 2)Add a GW configuration to ceph.conf
> [client.radosgw.gateway]
> host = EXFS1
> keyring = /etc/ceph/ceph.client.radosgw.keyring
> rgw socket path = /var/run/ceph/ceph.radosgw.gateway.fastcgi.sock
> log file = /var/log/ceph/client.radosgw.gateway.log
> rgw print continue = false
> #rgw enable ops log = true
> rgw enable ops log = false
> debug rgw = 2
>
>
> 3)Distribute the keyring adn ceph.conf to the node with the gateway
> instance.
> scp ceph.client.radosgw.keyring ceph.conf EXFS2:/etc/ceph
> scp ceph.client.radosgw.keyring ceph.conf EXFS3:/etc/ceph
>
>
> 4)Create a /var/www/html/s3gw.fcgi
> # vi /var/www/html/s3gw.fcgi
> #!/bin/sh
> exec /usr/bin/radosgw -c /etc/ceph/ceph.conf -n client.radosgw.gateway
>
> # chmod +x /var/www/html/s3gw.fcgi
> # chown apache:apache s3gw.fcgi
>
>
> 5)Create a data directory so radosgw can work
> # mkdir -p /var/lib/ceph/radosgw/ceph-radosgw.gateway
>
>
> 6)Create a GW configuration
>
> # vi /etc/httpd/conf.d/rgw.conf
> FastCgiExternalServer /var/www/html/s3gw.fcgi -socket
> /var/run/ceph/ceph.radosgw.gateway.fastcgi.sock
>
>
> <VirtualHost *:80>
>         ServerName EXFS1
>         ServerAdmin EXFS1
>         DocumentRoot /var/www/html
>         RewriteEngine On
>         RewriteRule  ^/(.*) /s3gw.fcgi?%{QUERY_STRING}
> [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
>
>
>         <IfModule mod_fastcgi.c>
>         <Directory /var/www/html>
>                         Options +ExecCGI
>                         AllowOverride All
>                         SetHandler fastcgi-script
>                         Order allow,deny
>                         Allow from all
>                         AuthBasicAuthoritative Off
>                 </Directory>
>         </IfModule>
>
>         AllowEncodedSlashes On
>         ErrorLog /var/log/httpd/error.log
>         CustomLog /var/log/httpd/access.log combined
>         ServerSignature Off
> </VirtualHost>
>
>
> 7)Adjust path ownership/permissons
> # chown apache:apache /var/run/ceph/
> # chown apache:apache /var/log/httpd/
> # chown apache:apache /var/log/ceph/client.radosgw.gateway.log
>
>
> 8)Service restart
> # /etc/init.d/ceph -a restart
> # /etc/init.d/httpd restart
> # /etc/init.d/ceph-radosgw start
>
>
> 9)Create a user and subuser
> # radosgw-admin user create --uid=testuser --display-name="First User"
> # radosgw-admin subuser create --uid=testuser --subuser=testuser:swift
> --access=full
>
> # radosgw-admin user info --uid=testuser
> { "user_id": "testuser",
>   "display_name": "First User",
>   "email": "",
>   "suspended": 0,
>   "max_buckets": 1000,
>   "auid": 0,
>   "subusers": [
>         { "id": "testuser:swift",
>           "permissions": "full-control"}],
>   "keys": [
>         { "user": "testuser:swift",
>           "access_key": "80AYVS9BHDGYDP9YYG94",
>           "secret_key": ""},
>         { "user": "testuser",
>           "access_key": "HJ4JPYCDJB0DUYRE5IG0",
>           "secret_key": "8ZwlnL1KbP+tkBNf7PQc6n9DJ\/BiJj5rtd5E31sa"}],
>   "swift_keys": [
>         { "user": "testuser:swift",
>           "secret_key": ""},
>         { "user": "testuser:swift",
>           "secret_key": "bVwgc167mmLDVwpw4ufTkurK3vHp0G3MxAXpevQl"}],
>   "caps": [
>         { "type": "buckets",
>           "perm": "*"}],h
>   "op_mask": "read, write, delete",
>   "default_placement": "",
>   "placement_tags": [],
>   "bucket_quota": { "enabled": true,
>       "max_size_kb": -1,
>       "max_objects": -1},
>   "user_quota": { "enabled": false,
>       "max_size_kb": 1,
>       "max_objects": 1024},
>   "temp_url_keys": []}
>
>
>
> Best Regards.
>
> Yamashita
>
>
> =============================
> OSS Laboratories Inc.
> Yoshitami Yamashita
> Mail:yamashita at ossl.co.jp
>
> _______________________________________________
> ceph-users mailing list
> ceph-users at lists.ceph.com
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>



-- 

    .- <O> -.        .-====-.      ,-------.      .-=<>=-.
   /_-\'''/-_\      / / '' \ \     |,-----.|     /__----__\
  |/  o) (o  \|    | | ')(' | |   /,'-----'.\   |/ (')(') \|
   \   ._.   /      \ \    / /   {_/(') (')\_}   \   __   /
   ,>-_,,,_-<.       >'=jf='<     `.   _   .'    ,'--__--'.
 /      .      \    /        \     /'-___-'\    /    :|    \
(_)     .     (_)  /          \   /         \  (_)   :|   (_)
 \_-----'____--/  (_)        (_) (_)_______(_)   |___:|____|
  \___________/     |________|     \_______/     |_________|


Thanks and Regards

Ashish Chandra

Openstack Developer, Cloud Engineering

Reliance Jio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ceph.com/pipermail/ceph-users-ceph.com/attachments/20140731/95a58990/attachment.htm>


[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux