Ask Your Question
0

swiftclient.service.SwiftError: 'Account not found'

asked 2014-11-29 04:23:29 -0500

Khaled Riad gravatar image

Hello everybody

When I'm verifying the swift service using:

$ source demo-openrc.sh
$ swift stat

I got the following error:

Traceback (most recent call last):
File "/usr/bin/swift", line 10, in <module> sys.exit(main()) File "/usr/lib/python2.7/dist-packages/swiftclient/shell.py", line 1287, in main globals()'st_%s' % args[0]
File "/usr/lib/python2.7/dist-packages/swiftclient/shell.py", line 492, in st_stat stat_result = swift.stat() File "/usr/lib/python2.7/dist-packages/swiftclient/service.py", line 427, in stat raise SwiftError('Account not found', exc=err) swiftclient.service.SwiftError: 'Account not found'

Any help?

edit retag flag offensive close merge delete

Comments

It is a very informative to run the commands with --debug option. It will dump a lot of information, but it will be a bit more informative to show what exactly is failing.

ilya1725 gravatar imageilya1725 ( 2014-12-23 16:02:21 -0500 )edit

In my case it shows this error:

INFO:swiftclient:REQ: curl -i http://localhost:8080/v1/AUTH_f014f61da1244cfd9e6823b178af4bc9 -X POST -H "X-Auth-Token: 6238b52445f14b1a85b6649e4be2838d"
INFO:swiftclient:RESP STATUS: 401 Unauthorized
ilya1725 gravatar imageilya1725 ( 2014-12-23 16:02:45 -0500 )edit

3 answers

Sort by ยป oldest newest most voted
1

answered 2015-11-26 18:17:19 -0500

sfinga gravatar image

Hi,

I tried to solve this bug one week ago. Disabling keystoneauth in pipeline helped me, but without authentication with keystone I was able to get any file from any tenant. So I tried deploy DevStack with Swift and then I compare proxy-server.conf files.

There was some differences in pipeline and in order of filters. I set the proxy-server.conf file same way as in DevStack and it works.

root@prx03:~# vim /etc/swift/proxy-server.conf

[DEFAULT]
bind_ip = 0.0.0.0
bind_port = 8080
swift_dir = /etc/swift
user = swift

log_level = DEBUG

[pipeline:main]
pipeline = catch_errors gatekeeper healthcheck proxy-logging cache container_sync bulk tempurl ratelimit crossdomain authtoken keystoneauth tempauth  formpost staticweb container-quotas account-quotas slo dlo proxy-logging  proxy-server

[app:proxy-server]
account_autocreate = true
conn_timeout = 20
node_timeout = 120
use = egg:swift#proxy

[filter:tempauth]
user_swifttenanttest1_swiftusertest3 = testing3 .admin
user_swifttenanttest2_swiftusertest2 = testing2 .admin
user_swifttenanttest1_swiftusertest1 = testing .admin
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_test5_tester5 = testing5 service

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

[filter:cache]
use = egg:swift#memcache

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

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

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

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

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

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

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

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

[filter:list-endpoints]
use = egg:swift#list_endpoints

[filter:proxy-logging]
reveal_sensitive_prefix = 12
use = egg:swift#proxy_logging

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

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

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

[filter:container-quotas]
use = egg:swift#container_quotas

[filter:account-quotas]
use = egg:swift#account_quotas

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

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

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

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

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

[filter:authtoken]
include_service_catalog = False
cache = swift.cache
delay_auth_decision = 1
signing_dir = /var/cache/swift
auth_uri = http://IPADDRESS:5000
project_domain_id = default
project_name = service
user_domain_id = default
password = password
username = swift
auth_url = http://IPADDRESS:35357
auth_plugin = password
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
log_name = swift

[filter:keystoneauth]
operator_roles = Member, admin
use = egg:swift#keystoneauth

After that I restarted proxy server.

root@prx03:~# swift-init proxy-server restart

And check if swift works.

root@ctl01:~# source keystonercv3

root@ctl01:~# swift -V 3 stat
        Account: AUTH_cd3b21ac433c4ff6aff8e1ae144a196f
     Containers: 0
        Objects: 0
          Bytes: 0
   Content-Type: text/plain; charset=utf-8
    X-Timestamp: 1448580904.35436
     X-Trans-Id: txdd3e6db8455f447f871ff-0056579728
X-Put-Timestamp: 1448580904.35436

root@ctl01:~# swift -V 3 upload test /root/keystonerc
/root/keystonerc

root@ctl01:~# swift -V 3 list
demo
test

root@ctl01:~# swift -V 3 download test
root/keystonerc [auth 0.110s, headers 0.157s, total 0.172s, 0.002 MB/s]
edit flag offensive delete link more
0

answered 2014-12-01 02:04:55 -0500

Khaled Riad gravatar image

I solved it by the following steps:

1.On the controller node, obtain the proxy service configuration file from the Object Storage source repository:

$ sudo curl -o /etc/swift/proxy-server.conf https://raw.githubusercontent.com/openstack/swift/stable/juno/etc/proxy-server.conf-sample

2.Edit the /etc/swift/proxy-server.conf file to be like the OpenStack installation guide.

Note: Don't run step number one again after editing the /etc/swift/proxy-server.conf file, because it will reset what you done.

3.Run the following commands on the controller node and any other nodes running the proxy service, restart the Object Storage proxy service including its dependencies:

# service memcached restart
# service swift-proxy restart

Note: Make sure that each service restarted correctly.

4.On the storage nodes, start the Object Storage services:

# swift-init all start

5.Source the demo tenant credentials:

$ source demo-openrc.sh

6.run:

$ swift stat
edit flag offensive delete link more

Comments

That is exactly what I've done the first time - still the same error.

ilya1725 gravatar imageilya1725 ( 2014-12-12 14:42:35 -0500 )edit

Do you have any solution to this issue? I have exactly the same error.

JoseMi gravatar imageJoseMi ( 2014-12-23 09:26:15 -0500 )edit
1

@ ilya1725 & JoseMi,

It would be great if you provide me the status of the service running on controller node while executing below command swift stat Services running on controller node:- systemctl status openstack-swift-proxy.service memcached.service

Regards Abdul

Abdul Rashid gravatar imageAbdul Rashid ( 2014-12-31 07:08:03 -0500 )edit

I don't know what the problem was, but changing and restoring the tcp ports for account, container and object server, this worked.

JoseMi gravatar imageJoseMi ( 2015-01-09 02:46:54 -0500 )edit
0

answered 2015-05-11 07:20:14 -0500

junneyang gravatar image

i encountered the same eproblem, i have tried all the methods provided on this wbstite, waiting for your help !!! the traceback as below:

[root@devstack OpenStack]# swift --debug stat /usr/lib/python2.6/site-packages/keystoneclient/access.py:20: DeprecationWarning: The oslo namespace package is deprecated. Please use oslo_utils instead. from oslo.utils import timeutils DEBUG:keystoneclient.auth.identity.v2:Making authentication request to http://controller0:35357/v2.0/tokens INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): controller0 DEBUG:requests.packages.urllib3.connectionpool:"POST /v2.0/tokens HTTP/1.1" 200 1395 DEBUG:iso8601.iso8601:Parsed 2015-05-10T10:03:22Z into {'tz_sign': None, 'second_fraction': None, 'hour': u'10', 'daydash': u'10', 'tz_hour': None, 'month': None, 'timezone': u'Z', 'second': u'22', 'tz_minute': None, 'year': u'2015', 'separator': u'T', 'monthdash': u'05', 'day': None, 'minute': u'03'} with default timezone DEBUG:iso8601.iso8601:Got u'2015' for 'year' with default None DEBUG:iso8601.iso8601:Got u'05' for 'monthdash' with default 1 DEBUG:iso8601.iso8601:Got 5 for 'month' with default 5 DEBUG:iso8601.iso8601:Got u'10' for 'daydash' with default 1 DEBUG:iso8601.iso8601:Got 10 for 'day' with default 10 DEBUG:iso8601.iso8601:Got u'10' for 'hour' with default None DEBUG:iso8601.iso8601:Got u'03' for 'minute' with default None DEBUG:iso8601.iso8601:Got u'22' for 'second' with default None INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): controller0 DEBUG:requests.packages.urllib3.connectionpool:"HEAD /v1/AUTH_fc5fe691bf5647e7b4d9987842fb7c97 HTTP/1.1" 401 0 INFO:swiftclient:REQ: curl -i http://controller0:8080/v1/AUTH_fc5fe691bf5647e7b4d9987842fb7c97 (http://controller0:8080/v1/AUTH_fc5fe...) -I -H "X-Auth-Token: 2e5c8b48e8d14bde9c0d1be076f39f91" INFO:swiftclient:RESP STATUS: 401 UnauthorizedINFO:swiftclient:RESP HEADERS: [('content-length', '0'), ('connection', 'keep-alive'), ('x-trans-id', 'tx3219a54648b14a3da8570-00554f1eda'), ('date', 'Sun, 10 May 2015 09:03:22 GMT'), ('content-type', 'text/html; charset=UTF-8'), ('www-authenticate', 'Swift realm="AUTH_fc5fe691bf5647e7b4d9987842fb7c97"')] DEBUG:keystoneclient.auth.identity.v2:Making authentication request to http://controller0:35357/v2.0/tokens INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): controller0 DEBUG:requests.packages.urllib3.connectionpool:"POST /v2.0/tokens HTTP/1.1" 200 1395 DEBUG:iso8601.iso8601:Parsed 2015-05-10T10:03:23Z into {'tz_sign': None, 'second_fraction': None, 'hour': u'10', 'daydash': u'10', 'tz_hour': None, 'month': None, 'timezone': u'Z', 'second': u'23', 'tz_minute': None, 'year': u'2015', 'separator': u'T', 'monthdash': u'05', 'day': None, 'minute': u'03'} with default timezone DEBUG:iso8601.iso8601:Got u'2015' for 'year' with default None DEBUG:iso8601.iso8601:Got u'05' for 'monthdash' with default 1 DEBUG:iso8601.iso8601:Got 5 for 'month' with default 5 DEBUG:iso8601.iso8601:Got u'10' for 'daydash' with default 1 DEBUG:iso8601.iso8601:Got 10 for 'day' with default 10 DEBUG:iso8601.iso8601:Got u'10' for 'hour' with default None DEBUG:iso8601.iso8601:Got u'03' for 'minute' with default None DEBUG:iso8601.iso8601:Got u'23' for 'second' with default None INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): controller0 DEBUG:requests.packages.urllib3.connectionpool:"HEAD /v1/AUTH_fc5fe691bf5647e7b4d9987842fb7c97 HTTP/1.1" 401 ... (more)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

3 followers

Stats

Asked: 2014-11-29 04:22:37 -0500

Seen: 4,413 times

Last updated: May 11 '15