Ask Your Question

swift stat command does not work

asked 2015-11-25 05:46:27 -0500

Vranke gravatar image

updated 2015-11-25 06:04:41 -0500

I came to the very last step of the swift installation:

and for some reason my output when I enter sudo swift stat is:

Auth version 1.0 requires ST_AUTH, ST_USER, and ST_KEY environment variables to be set or overridden with
-A, -U, or -K.

Auth version 2.0 requires OS_AUTH_URL, OS_USERNAME, OS_PASSWORD, and OS_TENANT_NAME OS_TENANT_ID to be set or overridden with --os-auth-url,
--os-username, --os-password, --os-tenant-name or os-tenant-id. Note: adding "-V 2" is necessary for this.

When I try without sudo and enter swift stat, I get:

HTTPConnectionPool(host='controller', port=8080): Max retries exceeded with url: /v1/AUTH_e64bbad28a41424cb09fddf939ede141 (Caused by <class 'socket.error'>: [Errno 111] Connection refused)

Instead of:

Account: AUTH_11b9758b7049476d9b48f7a91ea11493
Containers: 0
   Objects: 0
     Bytes: 0
Content-Type: text/plain; charset=utf-8
X-Timestamp: 1381434243.83760
X-Trans-Id: txdcdd594565214fb4a2d33-0052570383
X-Put-Timestamp: 1381434243.83760

You can see all my config files (account server, container server, object server, proxy server, rsyncd and swift) in the following link

My contains the following env:

export OS_TENANT_NAME=service
export OS_USERNAME=swift
export OS_PASSWORD=klasika
export OS_AUTH_URL=http://controller:35357/v2.0

My hosts file contains:       localhost       objectstorage   controller

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

When I hit the command sudo swift-init all status I get:

container-updater running (12885 - /etc/swift/container-server.conf)
account-auditor running (12886 - /etc/swift/account-server.conf)
object-replicator running (12887 - /etc/swift/object-server.conf)
No proxy-server running
container-replicator running (12889 - /etc/swift/container-server.conf)
object-auditor running (12890 - /etc/swift/object-server.conf)
No object-expirer running
container-auditor running (12891 - /etc/swift/container-server.conf)
container-server running (12892 - /etc/swift/container-server.conf)
account-server running (12893 - /etc/swift/account-server.conf)
account-reaper running (12895 - /etc/swift/account-server.conf)
container-sync running (12897 - /etc/swift/container-server.conf)
account-replicator running (12898 - /etc/swift/account-server.conf)
object-updater running (12899 - /etc/swift/object-server.conf)
object-server running (12900 - /etc/swift/object-server.conf)

Can someone please tell me where I went wrong?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-11-25 07:52:48 -0500

Dmitry Komkov gravatar image

updated 2015-11-25 07:54:21 -0500

If you use swift command with sudo you should export variables with sudo

sudo export OS_TENANT_NAME=service
sudo export OS_USERNAME=swift
sudo export OS_PASSWORD=klasika
sudo export OS_AUTH_URL=http://controller:35357/v2.0

And only after that run sudo swift stat.

Could you provide proxy server config? (/etc/swift/ on a proxy node)

edit flag offensive delete link more


Here is the config: in this link with the rest of the other configs

Vranke gravatar imageVranke ( 2015-11-25 08:56:18 -0500 )edit

I just realized that port 8080 isn't listening to anything, but it should as indicated in the controller node. defaults ports 35357 and 5000 are listening just fine...

Vranke gravatar imageVranke ( 2015-11-25 09:05:56 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2015-11-25 05:46:27 -0500

Seen: 2,387 times

Last updated: Nov 25 '15