[Openstack] Fw: problem in setting up Tempauth authentication & authorization with Swift
pragya jain
prag_2648 at yahoo.co.in
Wed Sep 4 05:51:11 UTC 2013
root at arun-Aspire-5742:/etc/swift# swift-ring-builder object.builder
object.builder, build version 14
262144 partitions, 3.000000 replicas, 1 regions, 1 zones, 1 devices, 0.00 balance
The minimum number of hours before a partition can be reassigned is 24
Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
2 1 1 127.0.0.1 6000 127.0.0.1 6000 d1 100.00 786432 0.00
root at arun-Aspire-5742:/etc/swift# swift-ring-builder account.builder
account.builder, build version 14
262144 partitions, 3.000000 replicas, 1 regions, 1 zones, 1 devices, 0.00 balance
The minimum number of hours before a partition can be reassigned is 24
Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
2 1 1 127.0.0.1 6002 127.0.0.1 6002 d1 100.00 786432 0.00
root at arun-Aspire-5742:/etc/swift# swift-ring-builder container.builder
container.builder, build version 11
262144 partitions, 3.000000 replicas, 1 regions, 1 zones, 1 devices, 0.00 balance
The minimum number of hours before a partition can be reassigned is 24
Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
1 1 1 127.0.0.1 6001 127.0.0.1 6001 d1 100.00 786432 0.00
root at arun-Aspire-5742:/etc/swift# cd ~
root at arun-Aspire-5742:~# sudo swift-init account start
Starting account-server...(/etc/swift/account-server.conf)
root at arun-Aspire-5742:~# sudo swift-init proxy start
Starting proxy-server...(/etc/swift/proxy-server.conf)
root at arun-Aspire-5742:~# curl -v -H 'X-Auth-User:prag2648:pragya' -H 'X-Auth-Key:pj2648' http://localhost:8080/auth/v1.0/
* About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1... connected
> GET /auth/v1.0/ HTTP/1.1
> User-Agent: curl/7.22.0 (i686-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost:8080
> Accept: */*
> X-Auth-User:prag2648:pragya
> X-Auth-Key:pj2648
>
< HTTP/1.1 200 OK
< X-Storage-Url: http://localhost:8080/v1/AUTH_prag2648
< X-Auth-Token: AUTH_tk4be7b90194c747468c4973675db15ca5
< Content-Type: text/html; charset=UTF-8
< X-Storage-Token: AUTH_tk4be7b90194c747468c4973675db15ca5
< Content-Length: 0
< X-Trans-Id: txc07e87d3d4b8487b85d89-005226c820
< Date: Wed, 04 Sep 2013 05:41:52 GMT
<
* Connection #0 to host localhost left intact
* Closing connection #0
root at arun-Aspire-5742:~# curl -v -H 'X-Storage-Token:AUTH_tk4be7b90194c747468c4973675db15ca5' http://127.0.0.1:8080/v1/AUTH_prag2648/
* About to connect() to 127.0.0.1 port 8080 (#0)
* Trying 127.0.0.1... connected
> GET /v1/AUTH_prag2648/ HTTP/1.1
> User-Agent: curl/7.22.0 (i686-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: 127.0.0.1:8080
> Accept: */*
> X-Storage-Token:AUTH_tk4be7b90194c747468c4973675db15ca5
>
< HTTP/1.1 503 Internal Server Error
< Content-Length: 118
< Content-Type: text/html; charset=UTF-8
< X-Trans-Id: tx2301beb46542488597d23-005226c87d
< Date: Wed, 04 Sep 2013 05:43:26 GMT
<
* Connection #0 to host 127.0.0.1 left intact
* Closing connection #0
<html><h1>Service Unavailable</h1><p>The server is currently unavailable. Please try again at a later time.</p></html>root at arun-Aspire-5742:~#
root at arun-Aspire-5742:~# curl -v -H 'X-Storage-Token:AUTH_tk4be7b90194c747468c4973675db15ca5' http://127.0.0.1/v1/AUTH_prag2648/
* About to connect() to 127.0.0.1 port 80 (#0)
* Trying 127.0.0.1... Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host
root at arun-Aspire-5742:~# curl -v -H 'X-Storage-Token:AUTH_tk4be7b90194c747468c4973675db15ca5' http://localhost:8080/v1/AUTH_prag2648/
* About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1... connected
> GET /v1/AUTH_prag2648/ HTTP/1.1
> User-Agent: curl/7.22.0 (i686-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost:8080
> Accept: */*
> X-Storage-Token:AUTH_tk4be7b90194c747468c4973675db15ca5
>
< HTTP/1.1 503 Internal Server Error
< Content-Length: 118
< Content-Type: text/html; charset=UTF-8
< X-Trans-Id: txb0d8717ab05c4cf0bdebd-005226c8a4
< Date: Wed, 04 Sep 2013 05:44:05 GMT
<
* Connection #0 to host localhost left intact
* Closing connection #0
<html><h1>Service Unavailable</h1><p>The server is currently unavailable. Please try again at a later time.</p></html>root at arun-Aspire-5742:~#
root at arun-Aspire-5742:~# grep txa4c98c518382430ab9f5f-005222dede /var/log/syslogroot at arun-Aspire-5742:~#
>________________________________
> From: Kuo Hugo <tonytkdk at gmail.com>
>To: pragya jain <prag_2648 at yahoo.co.in>
>Cc: Gareth <academicgareth at gmail.com>; "openstack at lists.openstack.org" <openstack at lists.openstack.org>
>Sent: Friday, 30 August 2013 1:15 PM
>Subject: Re: [Openstack] Fw: problem in setting up Tempauth authentication & authorization with Swift
>
>
>
>Hmm....
>
>
>1) No Container and Object servers are running
>2) Only one drive in the ring
>3) No device been mount to /srv/node/* , unless you are disabling mount_check
>4) Did you setup rsync yet ?
>
>
>Maybe you can follow the online document to complete the above items.
>
>
>Good luck~
>
>
>
>
>
>
>+Hugo Kuo+
>hugo at swiftstack.com
>
>tonytkdk at gmail.com
>
>+886 935004793
>
>
>
>2013/8/30 pragya jain <prag_2648 at yahoo.co.in>
>
>root at arun-Aspire-5742:~# swift-ring-builder /etc/swift/account.builder
>>/etc/swift/account.builder, build version 1
>>262144 partitions, 3.000000 replicas, 1 regions, 1 zones, 1 devices, 0.00 balance
>>The minimum number of hours before a partition can be reassigned is 24
>>Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
>> 0 1 1 10.0.2.15 6000 10.0.2.15 6000 d1 100.00 786432 0.00
>>root at arun-Aspire-5742:~# swift-ring-builder /etc/swift/container.builder
>>/etc/swift/container.builder, build version 1
>>262144 partitions, 3.000000 replicas, 1 regions, 1 zones, 1 devices, 0.00 balance
>>The minimum number of hours before a partition can be reassigned is 24
>>Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
>> 0 1 1 10.0.2.15 6001 10.0.2.15 6001 d1 100.00 786432 0.00
>>root at arun-Aspire-5742:~# swift-ring-builder /etc/swift/object.builder
>>/etc/swift/object.builder, build version 1
>>262144 partitions, 3.000000 replicas, 1 regions, 1 zones, 1 devices, 0.00 balance
>>The minimum number of hours before a partition can be reassigned is 24
>>Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
>> 0 1 1 10.0.2.15 6002 10.0.2.15 6002 d1 100.00 786432 0.00
>>root at arun-Aspire-5742:~# ps aux | grep swift
>>swift 5174 0.0 0.1 18700 11548 ? Ss 10:45 0:00 /usr/bin/python /usr/local/bin/swift-account-server /etc/swift/account-server.conf
>>swift 5181 0.0 0.1 18976 9624 ? S 10:45 0:00 /usr/bin/python /usr/local/bin/swift-account-server /etc/swift/account-server.conf
>>swift 5182 0.0 0.1 18992 9616 ? S 10:45 0:00 /usr/bin/python /usr/local/bin/swift-account-server /etc/swift/account-server.conf
>>swift 5183 0.0 0.1 18992 9620 ? S 10:45 0:00 /usr/bin/python /usr/local/bin/swift-account-server /etc/swift/account-server.conf
>>swift 5184 0.0 0.1 18992 9632 ? S 10:45 0:00 /usr/bin/python /usr/local/bin/swift-account-server /etc/swift/account-server.conf
>>swift 5192 0.0 0.2 18296 11812 ? Ss 10:45 0:00 /usr/bin/python /usr/local/bin/swift-proxy-server /etc/swift/proxy-server.conf
>>swift 5197 0.0 0.2 23512 15552 ? S 10:45 0:00 /usr/bin/python /usr/local/bin/swift-proxy-server /etc/swift/proxy-server.conf
>>swift 5198 0.0 0.2 23524 15628 ? S 10:45 0:00 /usr/bin/python /usr/local/bin/swift-proxy-server /etc/swift/proxy-server.conf
>>swift 5199 0.0 0.2 23524 15300 ? S 10:45 0:00 /usr/bin/python /usr/local/bin/swift-proxy-server /etc/swift/proxy-server.conf
>>swift 5200 0.0 0.2 23524 15300 ? S 10:45 0:00 /usr/bin/python /usr/local/bin/swift-proxy-server /etc/swift/proxy-server.conf
>>root 6986 0.0 0.0 4388 828 pts/0 S+ 11:46 0:00 grep --color=auto swift
>>root at arun-Aspire-5742:~# df -h
>>Filesystem Size Used Avail Use% Mounted on
>>/dev/sda4 170G 3.8G 158G 3% /
>>udev 2.8G 4.0K 2.8G 1% /dev
>>tmpfs 1.2G 908K 1.2G 1% /run
>>none 5.0M 4.0K 5.0M 1% /run/lock
>>none 2.8G 220K 2.8G 1% /run/shm
>>/dev/sda2 98G 25G 73G 26% /media/D8EA06E4EA06BEAE
>>/dev/sda5 98G 54G 45G 55% /media/8AE41BA8E41B9613
>>root at arun-Aspire-5742:~# ls /srv/node/*
>>/srv/node/d1:
>>
>>
>>/srv/node/d2:
>>
>>
>>/srv/node/d3:
>>root at arun-Aspire-5742:~# netstat -antulp
>>Active Internet connections (servers and established)
>>Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
>>tcp 0 0 127.0.0.1:11211 0.0.0.0:* LISTEN 941/memcached
>>tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 5192/python
>>tcp 0 0 0.0.0.0:6002 0.0.0.0:* LISTEN 5174/python
>>tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 6936/dnsmasq
>>tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 596/cupsd
>>tcp 0 0 101.58.138.11:56680 207.171.162.71:443 ESTABLISHED 2042/chrome
>>tcp 0 0 127.0.0.1:11211 127.0.0.1:45287 ESTABL
>>ISHED 941/memcached
>>tcp 0 0 127.0.0.1:11211 127.0.0.1:45292 ESTABLISHED 941/memcached
>>tcp 0 0 127.0.0.1:45287 127.0.0.1:11211 ESTABLISHED 5197/python
>>tcp 1 0 101.58.138.11:34377 91.189.89.144:80 CLOSE_WAIT 1674/ubuntu-geoip-p
>>tcp 0 0 127.0.0.1:45292 127.0.0.1:11211 ESTABLISHED 5198/python
>>tcp6 0 0 ::1:631 :::* LISTEN 596/cupsd
>>udp 0 0 127.0.0.1:11211 0.0.0.0:* 941/memcached
>>udp 0 0 0.0.0.0:46638 0.0.0.0:* 576/avahi-daemon: r
>>udp 0 0 127.0.0.1:53 0.0.0.0:* 6936/dnsmasq
>>udp 0 0 0.0.0.0:5353 0.0.0.0:* 576/avahi-daemon: r
>>udp6 0 0 :::55335 :::* 576/avahi-daemon: r
>>udp6 0 0 :::5353 :::* 576/avahi-daemon: r
>>root at arun-Aspire-5742:~# swift-init all status
>>No container-updater running
>>No account-auditor running
>>No object-replicator running
>>proxy-server running (5192 - /etc/swift/proxy-server.conf)
>>No container-replicator running
>>No object-auditor running
>>No object-expirer running
>>No container-auditor running
>>No container-server running
>>account-server running (5174 - /etc/swift/account-server.conf)
>>No account-reaper running
>>No container-sync running
>>No account-replicator running
>>No object-updater running
>>No object-server running
>>
>>
>>
>>>________________________________
>>> From: Kuo Hugo <tonytkdk at gmail.com>
>>>To: pragya jain <prag_2648 at yahoo.co.in>
>>>Cc: Gareth <academicgareth at gmail.com>; "openstack at lists.openstack.org" <openstack at lists.openstack.org>
>>>Sent: Friday, 30 August 2013 11:23 AM
>>>
>>>Subject: Re: [Openstack] Fw: problem in setting up Tempauth authentication & authorization with Swift
>>>
>>>
>>>
>>>Hi Pragya :
>>>
>>>
>>>I'm in highly recommends that you can go through the Swift online document http://docs.openstack.org/developer/swift/index.html .
>>>It's a good place to understand the basic architecture, especially swift *terms*
>>>
>>>
>>>
>>>Check rings :
>>>$> swift-ring-builder /etc/swift/object.builder
>>>>$> swift-ring-builder /etc/swift/container.builder
>>>>$> swift-ring-builder /etc/swift/account.builder
>>>
>>>
>>>Check Swift workers :
>>>$> swift-init all status
>>>>$> ps aux | grep swift
>>>>$> df -h
>>>>$> ls /srv/node/*
>>>>$> netstat -antulp
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>+Hugo Kuo+
>>>hugo at swiftstack.com
>>>
>>>tonytkdk at gmail.com
>>>
>>>+886 935004793
>>>
>>>
>>>
>>>2013/8/30 pragya jain <prag_2648 at yahoo.co.in>
>>>
>>>hello sir,
>>>>
>>>>
>>>>I am working on single node.
>>>>Please let me know how to check network topology and ring structure.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>________________________________
>>>>> From: Gareth <academicgareth at gmail.com>
>>>>>To: Kuo Hugo <tonytkdk at gmail.com>
>>>>>Cc: pragya jain <prag_2648 at yahoo.co.in>; "openstack at lists.openstack.org" <openstack at lists.openstack.org>
>>>>>Sent: Friday, 30 August 2013 8:11 AM
>>>>>
>>>>>Subject: Re: [Openstack] Fw: problem in setting up Tempauth authentication & authorization with Swift
>>>>>
>>>>>
>>>>>
>>>>>Pragya
>>>>>
>>>>>
>>>>>The v1.0 auth uses tempauth for swift, like what you config in proxy-server.conf. All account data is read from that file, so you couldn't add/delete account in tempauth without modifying config file and restart swift.
>>>>>
>>>>>
>>>>>BTW, your curl link here "curl -v -H 'X-Storage-Token:AUTH_tk3867b7599d5346559ee0baaa09e0f40d' http://localhost:8080/v1/AUTH_prag2648/" actually is a GET request, which means getting account data. If you config everything correctly, it must have valid response. And you logs are a better way to find what happened in this request (set log level to DEBUG, and you will get more details).
>>>>>
>>>>>
>>>>>
>>>>>On Fri, Aug 30, 2013 at 7:47 AM, Kuo Hugo <tonytkdk at gmail.com> wrote:
>>>>>
>>>>>Hi Pragya,
>>>>>>
>>>>>>
>>>>>>I need more information.
>>>>>>
>>>>>>
>>>>>>1) Please draw a network topology of your environment
>>>>>>2) How many nodes do you have?
>>>>>>3) What's the ring looks like ?
>>>>>>
>>>>>>
>>>>>>
>>>>>>Hugo Kuo
>>>>>>hugo at swiftstack.com
>>>>>>
>>>>>>tonytkdk at gmail.com
>>>>>>
>>>>>>+886 935004793
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>2013/8/29 pragya jain <prag_2648 at yahoo.co.in>
>>>>>>
>>>>>>hello sir,
>>>>>>>
>>>>>>>
>>>>>>>connection is established successfully. But, when I try to create an account, I face the problem.
>>>>>>>
>>>>>>>
>>>>>>>root at arun-Aspire-5742:~# sudo swift-init account start
>>>>>>>Starting account-server...(/etc/swift/account-server.conf)
>>>>>>>root at arun-Aspire-5742:~# sudo swift-init proxy start
>>>>>>>Starting proxy-server...(/etc/swift/proxy-server.conf)
>>>>>>>root at arun-Aspire-5742:~# curl -v -H 'X-Auth-User:prag2648:pragya' -H 'X-Auth-Key:pj2648' http://localhost:8080/auth/v1.0/
>>>>>>>* About to connect() to localhost port 8080 (#0)
>>>>>>>* Trying 127.0.0.1... connected
>>>>>>>> GET /auth/v1.0/ HTTP/1.1
>>>>>>>> User-Agent: curl/7.22.0 (i686-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
>>>>>>>> Host: localhost:8080
>>>>>>>> Accept: */*
>>>>>>>> X-Auth-User:prag2648:pragya
>>>>>>>> X-Auth-Key:pj2648
>>>>>>>>
>>>>>>>< HTTP/1.1 200 OK
>>>>>>>< X-Storage-Url: http://localhost:8080/v1/AUTH_prag2648
>>>>>>>< X-Auth-Token: AUTH_tk3867b7599d5346559ee0baaa09e0f40d
>>>>>>>< Content-Type: text/html; charset=UTF-8
>>>>>>>< X-Storage-Token: AUTH_tk3867b7599d5346559ee0baaa09e0f40d
>>>>>>>< Content-Length: 0
>>>>>>>< X-Trans-Id: txe2ab76a7617e40399f456-00521f3d16
>>>>>>>< Date: Thu, 29 Aug 2013 12:22:46 GMT
>>>>>>><
>>>>>>>* Connection #0 to host localhost left intact
>>>>>>>* Closing connection #0
>>>>>>>root at arun-Aspire-5742:~# python
>>>>>>>Python 2.7.3 (default, Apr 10 2013, 05:46:21)
>>>>>>>[GCC 4.6.3] on linux2
>>>>>>>Type "help", "copyright", "credits" or "license" for more information.
>>>>>>>>>> import swift.common.memcached as memcached
>>>>>>>>>> memcache = memcached.MemcacheRing(['127.0.0.1:11211'])
>>>>>>>>>> print memcache.get('AUTH_/user/prag2648:pragya')
>>>>>>>AUTH_tk3867b7599d5346559ee0baaa09e0f40d
>>>>>>>>>> print memcache.get('AUTH_/token/AUTH_tk3867b7599d5346559ee0baaa09e0f40d')
>>>>>>>[1377865366.826027, 'prag2648,prag2648:pragya,.reseller_admin,AUTH_prag2648']
>>>>>>>>>>
>>>>>>>root at arun-Aspire-5742:~# curl -v -H 'X-Storage-Token:AUTH_tk3867b7599d5346559ee0baaa09e0f40d' http://127.0.0.1/v1/Auth_prag2648/
>>>>>>>* About to connect() to 127.0.0.1 port 80 (#0)
>>>>>>>* Trying 127.0.0.1... Connection refused
>>>>>>>* couldn't connect to host
>>>>>>>* Closing connection #0
>>>>>>>curl: (7) couldn't connect to host
>>>>>>>root at arun-Aspire-5742:~# curl -v -H 'X-Storage-Token:AUTH_tk3867b7599d5346559ee0baaa09e0f40d' http://localhost:8080/v1/AUTH_prag2648/
>>>>>>>* About to connect() to localhost port 8080 (#0)
>>>>>>>* Trying 127.0.0.1... connected
>>>>>>>> GET /v1/AUTH_prag2648/ HTTP/1.1
>>>>>>>> User-Agent: curl/7.22.0 (i686-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/
>>>>>>>1.2.3.4 libidn/1.23 librtmp/2.3
>>>>>>>> Host: localhost:8080
>>>>>>>> Accept: */*
>>>>>>>> X-Storage-Token:AUTH_tk3867b7599d5346559ee0baaa09e0f40d
>>>>>>>>
>>>>>>>< HTTP/1.1 503 Internal Server Error
>>>>>>>< Content-Length: 118
>>>>>>>< Content-Type: text/html; charset=UTF-8
>>>>>>>< X-Trans-Id: txd6fd9eead36e4b74b0869-00521f3efe
>>>>>>>< Date: Thu, 29 Aug 2013 12:30:55 GMT
>>>>>>><
>>>>>>>* Connection #0 to host localhost left intact
>>>>>>>* Closing connection #0
>>>>>>><html><h1>Service Unavailable</h1><p>The server is currently unavailable. Please try again at a later time.</p></html>root at arun-Aspire-5742:~#
>>>>>>>
>>>>>>>
>>>>>>>Please help me in this regard.
>>>>>>>
>>>>>>>
>>>>>>>---
>>>>>>>
>>>>>>>
>>>>>>>Pragya Jain
>>>>>>>
>>>>>>>>________________________________
>>>>>>>> From: pragya jain <prag_2648 at yahoo.co.in>
>>>>>>>>To: Kuo Hugo <tonytkdk at gmail.com>
>>>>>>>>Cc: "openstack at lists.openstack.org" <openstack at lists.openstack.org>
>>>>>>>>
>>>>>>>>Sent: Thursday, 29 August 2013 4:47 PM
>>>>>>>>Subject: Re: [Openstack] Fw: problem in setting up Tempauth authentication & authorization with Swift
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>Thanks Kuo very much for this help.
>>>>>>>>connection is successfully established.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>________________________________
>>>>>>>>> From: Kuo Hugo <tonytkdk at gmail.com>
>>>>>>>>>To: pragya jain <prag_2648 at yahoo.co.in>
>>>>>>>>>Cc: "openstack at lists.openstack.org" <openstack at lists.openstack.org>
>>>>>>>>>Sent: Thursday, 29 August 2013 3:46 PM
>>>>>>>>>Subject: Re: [Openstack] Fw: problem in setting up Tempauth authentication & authorization with Swift
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>curl -v -H 'X-Auth-User:admin:admin' -H 'X-Auth-Key:admin' http://localhost:8080/auth/v1.0/
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>+Hugo Kuo+
>>>>>>>>>hugo at swiftstack.com
>>>>>>>>>tonytkdk at gmail.com
>>>>>>>>>+886 935004793
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>2013/8/29 pragya jain <prag_2648 at yahoo.co.in>
>>>>>>>>>>
>>>>>>>>>> root at arun-Aspire-5742:~# netstat -antulp | grep 8080
>>>>>>>>>> tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 2421/python
>>>>>>>>>>
>>>>>>>>>> user = swift
>>>>>>>>>>
>>>>>>>>>> ________________________________
>>>>>>>>>> From: Kuo Hugo <tonytkdk at gmail.com>
>>>>>>>>>> To: pragya jain <prag_2648 at yahoo.co.in>
>>>>>>>>>> Cc: "openstack at lists.openstack.org" <openstack at lists.openstack.org>
>>>>>>>>>> Sent: Thursday, 29 August 2013 2:47 PM
>>>>>>>>>>
>>>>>>>>>> Subject: Re: [Openstack] Fw: problem in setting up Tempauth authentication & authorization with Swift
>>>>>>>>>>
>>>>>>>>>> gt; netstat -antulp | grep 8080
>>>>>>>>>>
>>>>>>>>>> 1) is 8080 port been used ?
>>>>>>>>>> 2) What's the value of *user* parameter in proxy-server.conf https://github.com/openstack/swift/blob/master/etc/proxy-server.conf-sample#L7
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> +Hugo Kuo+
>>>>>>>>>> hugo at swiftstack.com
>>>>>>>>>> tonytkdk at gmail.com
>>>>>>>>>> +886 935004793
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 2013/8/29 pragya jain <prag_2648 at yahoo.co.in>
>>>>>>>>>>
>>>>>>>>>> hello sir,
>>>>>>>>>>
>>>>>>>>>> I run the command:
>>>>>>>>>>
>>>>>>>>>> root at arun-Aspire-5742:~# find / -name swift-proxy-server
>>>>>>>>>> /opt/swift/build/scripts-2.7/swift-proxy-server
>>>>>>>>>> /opt/swift/bin/swift-proxy-server
>>>>>>>>>> /usr/local/bin/swift-proxy-server
>>>>>>>>>> /usr/local/lib/python2.7/dist-packages/swift-1.9.2-py2.7.egg/EGG-INFO/scripts/swift-proxy-server
>>>>>>>>>>
>>>>>>>>>> root at arun-Aspire-5742:~# /usr/bin/python /usr/local/bin/swift-proxy-server /etc/swift/proxy-server.conf
>>>>>>>>>> Traceback (most recent call last):
>>>>>>>>>> File "/usr/local/bin/swift-proxy-server", line 5, in <module>
>>>>>>>>>> pkg_resources.run_script('swift==1.9.2', 'swift-proxy-server')
>>>>>>>>>> File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, in run_script
>>>>>>>>>> self.require(requires)[0].run_script(script_name, ns)
>>>>>>>>>> File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, in run_script
>>>>>>>>>> execfile(script_filename, namespace, namespace)
>>>>>>>>>> File "/usr/local/lib/python2.7/dist-packages/swift-1.9.2-py2.7.egg/EGG-INFO/scripts/swift-proxy-server", line 22, in <module>
>>>>>>>>>> run_wsgi(conf_file, 'proxy-server', default_port=8080, **options)
>>>>>>>>>> File "/usr/local/lib/python2.7/dist-packages/swift-1.9.2-py2.7.egg/swift/common/wsgi.py", line 251, in run_wsgi
>>>>>>>>>> sock = get_socket(conf, default_port=kwargs.get('default_port', 8080))
>>>>>>>>>> File "/usr/local/lib/python2.7/dist-packages/swift-1.9.2-py2.7.egg/swift/common/wsgi.py", line 168, in get_socket
>>>>>>>>>> bind_addr[0], bind_addr[1], bind_timeout))
>>>>>>>>>> Exception: Could not bind to 0.0.0.0:8080 after trying for 30 seconds
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ________________________________
>>>>>>>>>> From: Kuo Hugo <tonytkdk at gmail.com>
>>>>>>>>>> To: pragya jain <prag_2648 at yahoo.co.in>
>>>>>>>>>> Cc: "openstack at lists.openstack.org" <openstack at lists.openstack.org>
>>>>>>>>>> Sent: Thursday, 29 August 2013 2:19 PM
>>>>>>>>>>
>>>>>>>>>> Subject: Re: [Openstack] Fw: problem in setting up Tempauth authentication & authorization with Swift
>>>>>>>>>>
>>>>>>>>>> find out the swift-proxy-server binary in your OS. (The path in example just an assumption)
>>>>>>>>>>
>>>>>>>>>> gt; find / -name swift-proxy-server
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> +Hugo Kuo+
>>>>>>>>>> hugo at swiftstack.com
>>>>>>>>>> tonytkdk at gmail.com
>>>>>>>>>> +886 935004793
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 2013/8/29 pragya jain <prag_2648 at yahoo.co.in>
>>>>>>>>>>
>>>>>>>>>> hello sir
>>>>>>>>>>
>>>>>>>>>> Thanks for the help
>>>>>>>>>>
>>>>>>>>>> root at arun-Aspire-5742:~# /usr/bin/python /usr/bin/swift-proxy-server /etc/swift/proxy-server.conf
>>>>>>>>>> /usr/bin/python: can't open file '/usr/bin/swift-proxy-server': [Errno 2] No such file or directory
>>>>>>>>>>
>>>>>>>>>> this is the result of the command.
>>>>>>>>>>
>>>>>>>>>> please help in this regard.
>>>>>>>>>>
>>>>>>>>>> -----
>>>>>>>>>> Pragya Jain
>>>>>>>>>>
>>>>>>>>>> ________________________________
>>>>>>>>>> From: Kuo Hugo <tonytkdk at gmail.com>
>>>>>>>>>> To: pragya jain <prag_2648 at yahoo.co.in>
>>>>>>>>>> Cc: "openstack at lists.openstack.org" <openstack at lists.openstack.org>
>>>>>>>>>> Sent: Thursday, 29 August 2013 1:20 PM
>>>>>>>>>>
>>>>>>>>>> Subject: Re: [Openstack] Fw: problem in setting up Tempauth authentication & authorization with Swift
>>>>>>>>>>
>>>>>>>>>> Obviously, There's no proxy server running on your node.
>>>>>>>>>>
>>>>>>>>>> Please execute it on the node where proxy-server located:
>>>>>>>>>> (I assume the binary is in /usr/bin and conf file is in /etc/swift)
>>>>>>>>>>
>>>>>>>>>> gt; /usr/bin/python /usr/bin/swift-proxy-server /etc/swift/proxy-server.conf
>>>>>>>>>>
>>>>>>>>>> What's the result ?
>>>>>>>>>>
>>>>>>>>>> +Hugo Kuo+
>>>>>>>>>> hugo at swiftstack.com
>>>>>>>>>> tonytkdk at gmail.com
>>>>>>>>>> +886 935004793
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 2013/8/29 pragya jain <prag_2648 at yahoo.co.in>
>>>>>>>>>>
>>>>>>>>>> hello sir
>>>>>>>>>>
>>>>>>>>>> Thanks for the suggestion.
>>>>>>>>>>
>>>>>>>>>> (1) I give the space between pj2648 and .admin and also between .admin and .reseller_admin and tried the connection again, but face the same problem
>>>>>>>>>>
>>>>>>>>>> root at arun-Aspire-5742:~# vi /etc/swift/proxy-server.conf
>>>>>>>>>>
>>>>>>>>>> and make following changes:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> user_admin_admin = admin .admin .reseller_admin
>>>>>>>>>> user_test_tester = testing .admin
>>>>>>>>>> user_test2_tester2 = testing2 .admin
>>>>>>>>>> user_test_tester3 = testing3
>>>>>>>>>>
>>>>>>>>>> user_prag2648_pragya = pj2648 .admin .reseller_admin
>>>>>>>>>>
>>>>>>>>>> and then
>>>>>>>>>>
>>>>>>>>>> root at arun-Aspire-5742:~# sudo swift-init account start
>>>>>>>>>> Starting account-server...(/etc/swift/account-server.conf)
>>>>>>>>>> root at arun-Aspire-5742:~# sudo swift-init proxy start
>>>>>>>>>>
>>>>>>>>>> Starting proxy-server...(/etc/swift/proxy-server.conf)
>>>>>>>>>> root at arun-Aspire-5742:~# curl -v -H 'X-Auth-User:prag2648:pragya' -H 'X-Auth-Key:pj2648' http://localhost/auth/v1.0/
>>>>>>>>>> * About to connect() to localhost port 80 (#0)
>>>>>>>>>> * Trying 127.0.0.1... Connection refused
>>>>>>>>>> * couldn't connect to host
>>>>>>>>>> * Closing connection #0
>>>>>>>>>> curl: (7) couldn't connect to host
>>>>>>>>>>
>>>>>>>>>> (2) I also tired the connection with user admin:admin
>>>>>>>>>> root at arun-Aspire-5742:~# curl -v -H 'X-Auth-User:admin:admin' -H 'X-Auth-Key:admin' http://localhost/auth/v1.0/
>>>>>>>>>>
>>>>>>>>>> * About to connect() to localhost port 80 (#0)
>>>>>>>>>> * Trying 127.0.0.1... Connection refused
>>>>>>>>>> * couldn't connect to host
>>>>>>>>>> * Closing connection #0
>>>>>>>>>> curl: (7) couldn't connect to host
>>>>>>>>>>
>>>>>>>>>> (3) I also run the command to verify the port number of proxy
>>>>>>>>>> root at arun-Aspire-5742:~# ps aux | grep proxy
>>>>>>>>>> nobody 2124 0.0 0.0 5384 1164 ? S 10:39 0:00 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/var/run/sendsigs.omit.d/network-manager.dnsmasq.pid --listen-address=127.0.0.1 --conf-file=/var/run/nm-dns-dnsmasq.conf --cache-size=0 --proxy-dnssec
>>>>>>>>>> root 2724 0.0 0.0 4368 828 pts/0 R+ 10:52 0:00 grep --color=auto proxy
>>>>>>>>>> root at arun-Aspire-5742:~# netstat -antulp
>>>>>>>>>> Active Internet connections (servers and established)
>>>>>>>>>> Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
>>>>>>>>>> tcp 0 0 127.0.0.1:11211 0.0.0.0:* LISTEN 931/memcached
>>>>>>>>>> tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 2124/dnsmasq
>>>>>>>>>> tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 623/cupsd
>>>>>>>>>> tcp 0 0 115.184.7.223:51521 74.125.236.132:80 TIME_WAIT -
>>>>>>>>>> tcp 1 0 115.184.7.223:46280 91.189.89.144:80 CLOSE_WAIT 1663/ubuntu-geoip-p
>>>>>>>>>> tcp 0 0 115.184.7.223:60563 173.194.38.147:80 TIME_WAIT -
>>>>>>>>>> tcp 0 0 115.184.7.223:43256 124.124.201.179:80 TIME_WAIT -
>>>>>>>>>> tcp 0 0 115.184.7.223:41791 124.124.201.169:80 TIME_WAIT -
>>>>>>>>>> tcp 0 0 115.184.7.223:36669 124.124.252.9:80 TIME_WAIT -
>>>>>>>>>> tcp 0 0 115.184.7.223:51747 173.194.38.184:80 TIME_WAIT -
>>>>>>>>>> tcp 0 0 115.184.7.223:54229 74.125.236.44:443 TIME_WAIT -
>>>>>>>>>> tcp 0 0 115.184.7.223:36185 173.194.36.26:80 TIME_WAIT -
>>>>>>>>>> tcp 0 0 115.184.7.223:38854 74.125.236.109:80 TIME_WAIT -
>>>>>>>>>> tcp6 0 0 ::1:631 :::* LISTEN 623/cupsd
>>>>>>>>>> udp 0 0 0.0.0.0:5353 0.0.0.0:* 619/avahi-daemon: r
>>>>>>>>>> udp 0 0 0.0.0.0:53489 0.0.0.0:* 619/avahi-daemon: r
>>>>>>>>>> udp 0 0 127.0.0.1:11211 0.0.0.0:* 931/memcached
>>>>>>>>>> udp 0 0 127.0.0.1:53 0.0.0.0:* 2124/dnsmasq
>>>>>>>>>> udp6 0 0 :::5353 :::* 619/avahi-daemon: r
>>>>>>>>>> udp6 0 0 :::36705 :::* 619/avahi-daemon: r
>>>>>>>>>>
>>>>>>>>>> Please help to proceed further.
>>>>>>>>>>
>>>>>>>>>> ---
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>>
>>>>>>>>>> Pragya jain
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ________________________________
>>>>>>>>>> From: Kuo Hugo <tonytkdk at gmail.com>
>>>>>>>>>> To: pragya jain <prag_2648 at yahoo.co.in>
>>>>>>>>>> Cc: Amanda Plimpton <amanda at swiftstack.com>; "openstack at lists.openstack.org" <openstack at lists.openstack.org>
>>>>>>>>>> Sent: Wednesday, 28 August 2013 9:59 PM
>>>>>>>>>> Subject: Re: [Openstack] Fw: problem in setting up Tempauth authentication & authorization with Swift
>>>>>>>>>>
>>>>>>>>>> Hi
>>>>>>>>>>
>>>>>>>>>> 1) user_prag2648_pragya = pj2648.admin.reseller_admin try to have a space between pj2648 and .admin . How about to test with user admin:admin ?
>>>>>>>>>> 2) Verify the port number of proxy by
>>>>>>>>>>
>>>>>>>>>> gt; ps aux | grep proxy
>>>>>>>>>> gt; netstat -antulp
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 3) Check the Proxy for how to setup bind_port https://github.com/openstack/swift/blob/master/etc/proxy-server.conf-sample
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> +Hugo Kuo+
>>>>>>>>>> hugo at swiftstack.com
>>>>>>>>>> tonytkdk at gmail.com
>>>>>>>>>> +886 935004793
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 2013/8/29 pragya jain <prag_2648 at yahoo.co.in>
>>>>>>>>>>
>>>>>>>>>> hello sir,
>>>>>>>>>>
>>>>>>>>>> Please help me in knowing how to use 8080 port
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ________________________________
>>>>>>>>>> From: Amanda Plimpton <amanda at swiftstack.com>
>>>>>>>>>> To: pragya jain <prag_2648 at yahoo.co.in>
>>>>>>>>>> Cc: "joe at swiftstack.com" <joe at swiftstack.com>; "contact at swiftstack.com" <contact at swiftstack.com>; anita goel <goel.anita at gmail.com>
>>>>>>>>>> Sent: Tuesday, 27 August 2013 9:40 AM
>>>>>>>>>> Subject: Re: Fw: problem in setting up Tempauth authentication & authorization with Swift
>>>>>>>>>>
>>>>>>>>>> Hello,
>>>>>>>>>>
>>>>>>>>>> Did Edward's suggestion of using port 8080 help at all? The error seems to indicate a network setting issue. You may wish to double check the settings and configuration.
>>>>>>>>>>
>>>>>>>>>> Given your interest in Swift I would also recommend locating a nearby OpenStack group or attending an event such as http://openstackindia.wordpress.com/2013/08/14/openstack-india-day-2013-announced/
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Thank you,
>>>>>>>>>> Amanda
>>>>>>>>>>
>>>>>>>>>> SwiftStack Inc.
>>>>>>>>>> swiftstack.com
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Mon, Aug 26, 2013 at 8:55 PM, pragya jain <prag_2648 at yahoo.co.in> wrote:
>>>>>>>>>>
>>>>>>>>>> hello sir!
>>>>>>>>>>
>>>>>>>>>> Please help me in setting up Tempauth authentication & authorization with Swift.
>>>>>>>>>> same error is continued.
>>>>>>>>>>
>>>>>>>>>> ----- Forwarded Message -----
>>>>>>>>>> From: pragya jain <prag_2648 at yahoo.co.in>
>>>>>>>>>> To: "joe at swiftstack.com" <joe at swiftstack.com>; "clay.gerrard at gmail.com" <clay.gerrard at gmail.com>; "contact at swiftstack.com" <contact at swiftstack.com>; "openstack at ask.openstack.org" <openstack at ask.openstack.org>; "openstack at lists.openstack.org" <openstack at lists.openstack.org>
>>>>>>>>>> Cc: anita goel <goel.anita at gmail.com>
>>>>>>>>>> Sent: Monday, 26 August 2013 12:06 PM
>>>>>>>>>> Subject: problem in setting up Tempauth authentication & authorization with Swift
>>>>>>>>>>
>>>>>>>>>> hello,
>>>>>>>>>>
>>>>>>>>>> I have to configure proxy server.
>>>>>>>>>> For this,
>>>>>>>>>> I have to edit /etc/swift/swift.conf and change the swift_hash_path_suffix to something secret and then, start the proxy server process
>>>>>>>>>>
>>>>>>>>>> for this, I use the following commands:
>>>>>>>>>> root at arun-Aspire-5742:~# vi /etc/swift/swift.conf
>>>>>>>>>>
>>>>>>>>>> make following changes (highlighted) in the file:
>>>>>>>>>> swift_hash_path_suffix =pragya
>>>>>>>>>> swift_hash_path_prefix =jain
>>>>>>>>>>
>>>>>>>>>> save and exit.
>>>>>>>>>> then, I run the command:
>>>>>>>>>> root at arun-Aspire-5742:~# sudo swift-init proxy start
>>>>>>>>>> Starting proxy-server...(/etc/swift/proxy-server.conf)
>>>>>>>>>>
>>>>>>>>>> Now, I have to set up Tempauth authentication & authorization with Swift
>>>>>>>>>> for this, I run the following command:
>>>>>>>>>> root at arun-Aspire-5742:~# vi /etc/swift/proxy-server.conf
>>>>>>>>>>
>>>>>>>>>> make following changes (highlighted) in the file:
>>>>>>>>>> allow_account_management =true
>>>>>>>>>> ...
>>>>>>>>>> [filter:tempauth]
>>>>>>>>>> use = egg:swift#tempauth
>>>>>>>>>> ...
>>>>>>>>>> user_admin_admin = admin .admin .reseller_admin
>>>>>>>>>> user_test_tester = testing .admin
>>>>>>>>>> user_test2_tester2 = testing2 .admin
>>>>>>>>>> user_test_tester3 = testing3
>>>>>>>>>> user_prag2648_pragya = pj2648.admin.reseller_admin
>>>>>>>>>> ...
>>>>>>>>>>
>>>>>>>>>> save and exit
>>>>>>>>>> Then, run following commands:
>>>>>>>>>> root at arun-Aspire-5742:~# sudo swift-init account start
>>>>>>>>>> Starting account-server...(/etc/swift/account-server.conf)
>>>>>>>>>> root at arun-Aspire-5742:~# sudo swift-init proxy restart
>>>>>>>>>> Signal proxy-server pid: 2476 signal: 15
>>>>>>>>>> proxy-server (2476) appears to have stopped
>>>>>>>>>> Starting proxy-server...(/etc/swift/proxy-server.conf)
>>>>>>>>>> root at arun-Aspire-5742:~# curl -v -H 'X-Auth-User:prag2648:pragya' -H 'X-Auth-Key:pj2648' http://localhost/auth/v1.0/
>>>>>>>>>> * About to connect() to localhost port 80 (#0)
>>>>>>>>>> * Trying 127.0.0.1... Connection refused
>>>>>>>>>> * couldn't connect to host
>>>>>>>>>> * Closing connection #0
>>>>>>>>>> curl: (7) couldn't connect to host
>>>>>>>>>>
>>>>>>>>>> But, there is an error in establising a connection.
>>>>>>>>>>
>>>>>>>>>> if, I run the command to start proxy server, then it shows that proxy server is already started.
>>>>>>>>>> root at arun-Aspire-5742:~# sudo swift-init proxy start
>>>>>>>>>> proxy-server running (2935 - /etc/swift/proxy-server.conf)
>>>>>>>>>> proxy-server already started...
>>>>>>>>>>
>>>>>>>>>> Please help me in this regard.
>>>>>>>>>> ---
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>>
>>>>>>>>>> Pragya Jain
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>>>>>>>>>> Post to : openstack at lists.openstack.org
>>>>>>>>>> Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>_______________________________________________
>>>>>>Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>>>>>>Post to : openstack at lists.openstack.org
>>>>>>Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>--
>>>>>
>>>>>Gareth
>>>>>
>>>>>
>>>>>Cloud Computing, OpenStack, Fitness, Basketball
>>>>>OpenStack contributor
>>>>>Company: UnitedStack
>>>>>My promise: if you find any spelling or grammar mistakes in my email from Mar 1 2013, notify me
>>>>>and I'll donate $1 or ¥1 to an open organization you specify.
>>>>>
>>>>>
>>>
>>>
>>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20130904/0b9b6771/attachment.html>
More information about the Openstack
mailing list