Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

unable to run swift stat

I have a fresh Fedora 21 install, on which I have installed and configured just swift and keystone I ran the following keystone command:

keystone endpoint-create --region RegionOne --service_id 8c90a8900abe45ad83aa5b04df957e80 --publicurl "http://127.0.0.1:8080/v1/AUTH_c36b8bb29ea947ce922f42389004648b" --adminurl http://127.0.0.1:8080/v1 --internalurl http://127.0.0.1:8080/v1

This gave me the following endpoint definition for swift:

6c063f73bc0041e09a0c0d65193e0285 | RegionOne | http://127.0.0.1:8080/v1/AUTH_c36b8bb29ea947ce922f42389004648b | http://127.0.0.1:8080/v1 | http://127.0.0.1:8080/v1 | 8c90a8900abe45ad83aa5b04df957e80

When I attempt to run swift --debug stat I get the following error:

DEBUG:keystoneclient.session:REQ: curl -i -X POST http://127.0.0.1:35357/v2.0/tokens -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-keystoneclient" -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "mast3r"}}}'
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 127.0.0.1
DEBUG:requests.packages.urllib3.connectionpool:"POST /v2.0/tokens HTTP/1.1" 200 2423
DEBUG:keystoneclient.session:RESP: [200] {'date': 'Thu, 19 Feb 2015 14:32:32 GMT', 'content-type': 'application/json', 'content-length': '2423', 'vary': 'X-Auth-Token', 'connection': 'keep-alive'}
RESP BODY: {"access": {"token": {"issued_at": "2015-02-19T14:32:32.818064", "expires": "2015-02-19T15:32:32Z", "id": "MIIEzwYJKoZIhvcNAQcCoIIEwDCCBLwCAQExCTAHBgUrDgMCGjCCAyUGCSqGSIb3DQEHAaCCAxYEggMSeyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxNS0wMi0xOVQxNDozMjozMi44MTgwNjQiLCAiZXhwaXJlcyI6ICIyMDE1LTAyLTE5VDE1OjMyOjMyWiIsICJpZCI6ICJwbGFjZWhvbGRlciIsICJ0ZW5hbnQ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Fq5XnW5tOu1r875MbK1j07VNAi4p6ZstUqvpvEQm5wyX-262fLJ7zNf57ms3EmL-U5jm-x0KVa08-H5rQ5BA3daj3QyKd8oZFY3f8L6pDEh537XLlkThQYdOd6E1b3PIp+1KgVxVm5Aw-MlaqhEZtj6tr7unb1qTe+OxjctXVFVmxpjereAlnuuUrw6SZTSUiNNWz9E-kWuwfQ1gfekwm1MUU3SQIA1zIqWwfh4f9bkJCYXUBKyhNRpaQsFxDrFDyZdy41mKKPSleNVJz0kTycqqyUTPnRaIEpKnTYM9QPdqrHpwhcm3ntulWKBcj52lsipACGk7o=", "tenant": {"description": "Admin Tenant", "enabled": true, "id": "c36b8bb29ea947ce922f42389004648b", "name": "admin"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://127.0.0.1:8080/v1", "region": "RegionOne", "internalURL": "http://127.0.0.1:8080/v1", "id": "452efc8140114d44a04e252e7b0945ea", "publicURL": "http://127.0.0.1:8080/v1/AUTH_c36b8bb29ea947ce922f42389004648b"}], "endpoints_links": [], "type": "object-store", "name": "swift"}], "user": {"username": "admin", "roles_links": [], "id": "a2b8e23eaa404378b2fb34cf217efbe9", "roles": [{"name": "admin"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["e3c480c2fd6142f594b8539b002a6b6d"]}}}

WARNING:keystoneclient.httpclient:Failed to retrieve management_url from token
DEBUG:iso8601.iso8601:Parsed 2015-02-19T15:32:32Z into {'tz_sign': None, 'second_fraction': None, 'hour': u'15', 'daydash': u'19', 'tz_hour': None, 'month': None, 'timezone': u'Z', 'second': u'32', 'tz_minute': None, 'year': u'2015', 'separator': u'T', 'monthdash': u'02', 'day': None, 'minute': u'32'} with default timezone <iso8601.iso8601.Utc object at 0x7fb9df33cdd0>
DEBUG:iso8601.iso8601:Got u'2015' for 'year' with default None
DEBUG:iso8601.iso8601:Got u'02' for 'monthdash' with default 1
DEBUG:iso8601.iso8601:Got 2 for 'month' with default 2
DEBUG:iso8601.iso8601:Got u'19' for 'daydash' with default 1
DEBUG:iso8601.iso8601:Got 19 for 'day' with default 19
DEBUG:iso8601.iso8601:Got u'15' for 'hour' with default None
DEBUG:iso8601.iso8601:Got u'32' for 'minute' with default None
DEBUG:iso8601.iso8601:Got u'32' for 'second' with default None
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 127.0.0.1
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 127.0.0.1
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 127.0.0.1
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 127.0.0.1
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 127.0.0.1
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 127.0.0.1
ERROR:swiftclient:('Connection aborted.', error(111, 'Connection refused'))
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 1243, in _retry
    rv = func(self.url, self.token, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 520, in head_account
    conn.request(method, parsed.path, '', headers)
  File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 217, in request
    files=files, **self.requests_args)
  File "/usr/lib/python2.7/site-packages/swiftclient/client.py", line 185, in _request
    return self.request_session.request(*arg, **kwarg)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 461, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 573, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 415, in send
    raise ConnectionError(err, request=request)
ConnectionError: ('Connection aborted.', error(111, 'Connection refused'))
Traceback (most recent call last):
  File "/bin/swift", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/swiftclient/shell.py", line 1287, in main
    globals()['st_%s' % args[0]](parser, argv[1:], output)
  File "/usr/lib/python2.7/site-packages/swiftclient/shell.py", line 493, in st_stat
    items = stat_result['items']
KeyError: 'items'

Here is my proxy-server.conf:

[DEFAULT]
bind_ip = 10.0.0.20
bind_port = 8080
workers = 8
user = swift

[pipeline:main]
pipeline = healthcheck cache authtoken keystone proxy-server

[app:proxy-server]
use = egg:swift#proxy
allow_account_management = true
account_autocreate = true

[filter:cache]
use = egg:swift#memcache
memcache_servers = 10.0.0.20:11211

[filter:catch_errors]
use = egg:swift#catch_errors

[filter:healthcheck]
use = egg:swift#healthcheck

[filter:keystone]
use = egg:swift#keystoneauth
operator_roles = admin, SwiftOperator
is_admin = true
cache = swift.cache

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
admin_tenant_name = service
admin_user = swift
admin_password = swift
auth_host = 10.0.0.20
auth_port = 35357
auth_protocol = http
auth_uri = http://10.0.0.20:5000
signing_dir = /tmp/keystone-signing-swift

What can I do to fix this?