Ask Your Question
1

swiftclient.service.SwiftError: 'Account not found'

asked 2014-11-12 11:10:23 -0500

mehdi gravatar image

Hi !! how can I resolved this error:

swiftclient.service.SwiftError: 'Account not found'

this when i run :

swift stat


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]](parser, argv[1:], output)
  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'

can someone help me !! thanks

edit retag flag offensive close merge delete

Comments

1

I have the same error

Khaled Riad gravatar imageKhaled Riad ( 2014-11-29 04:24:54 -0500 )edit

+1. I also followed the same directions in the http://docs.openstack.org/juno/install-guide/install/apt/content/swift-install-controller-node.html (OpenStack installation guide). But the result is the same - 'Account not found'

ilya1725 gravatar imageilya1725 ( 2014-12-12 15:33:15 -0500 )edit

@Khaled Riad & ilya1725 ,

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:06:12 -0500 )edit

@Abdul: .service --status-all command doesn't show openstack-swift-proxy.service and memcached.service. I'm running on Ubuntu. Do you mind providing instructions how to get the information you need?

ilya1725 gravatar imageilya1725 ( 2015-01-03 18:34:13 -0500 )edit

@ilya1725: You can get the status of the swift proxy service by running below command. service swift-proxy status

service memcached status

Those will provide you info on the service, c/p those output & if possible provide the config details of /etc/swift/proxy-server.conf.

Abdul Rashid gravatar imageAbdul Rashid ( 2015-01-04 03:09:15 -0500 )edit

3 answers

Sort by ยป oldest newest most voted
2

answered 2015-11-26 18:14:00 -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

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 2015-05-11 07:20:20 -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
0

answered 2014-11-29 07:05:34 -0500

Khaled Riad gravatar image

Hi

From two hours ago I was having the same error, and 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

I wish to work correctly for you

edit flag offensive delete link more

Comments

Do you have http://docs.openstack.org/developer/keystone/ (Keystone) configured on your system? Did you have to do anything different from what the instructions specify?

ilya1725 gravatar imageilya1725 ( 2014-12-16 14:26:33 -0500 )edit

I too have the same problem. i have tried many solutions but nothing has worked out yet. i removed and then reinstalled swift and also removed keystone user , user-role , service and endpoint and then created them all over again. but still nothing has helped me out. I still get this error. Plzz help

Nitiz Verma gravatar imageNitiz Verma ( 2015-04-15 14:33:28 -0500 )edit

I think the problem might be in the /etc/swift/swift.conf file with the hash key prefix and suffix. Can someone suggest me what kind of values these are?

zekken gravatar imagezekken ( 2015-09-24 01:33:28 -0500 )edit

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

5 followers

Stats

Asked: 2014-11-12 11:10:23 -0500

Seen: 1,703 times

Last updated: May 11 '15