swift stat报错HEAD returning 503

执行swift stat发现报错503:

[root@controller ~]# . demo-openrc 
[root@controller ~]# swift stat
Account HEAD failed: http://controller:8080/v1/AUTH_8cc1c04a21ae4165a1667e0bd5029831 503 Service Unavailable

查看错误日志/var/log/messages中显示:

Nov 16 14:20:31 controller proxy-server: ERROR with Account server 192.168.200.20:6002/sdc re: Trying to HEAD /v1/AUTH_af24a3c94886470183c864ef0f161b4c: Connection refused (txn: tx1ca8accfbf8847558f53c-005a0de4ff)

Nov 16 14:20:31 controller proxy-server: ERROR with Account server 192.168.200.20:6002/sdb re: Trying to HEAD /v1/AUTH_af24a3c94886470183c864ef0f161b4c: Connection refused (txn: tx1ca8accfbf8847558f53c-005a0de4ff)

Nov 16 14:20:31 controller proxy-server: Account HEAD returning 503 for [] (txn: tx1ca8accfbf8847558f53c-005a0de4ff)


控制器代理服务器:与客户服务器192.168.200.20:6002 / SDC再错误:试图头/ V1 / auth_af24a3c94886470183c864ef0f161b4c:拒绝连接(TXN:tx1
控制器代理服务器:与客户服务器192.168.200.20:6002 / SDB重错误:试图头/ V1 / auth_af24a3c94886470183c864ef0f161b4c:拒绝连接(TXN:tx1
控制器代理服务器帐户头返回503 [ ](TXN:tx1ca8accfbf8847558f53c-005a0de4f


原因:在创建并发ring时设置了错误的ip地址说以会连接失败,我是把管理网络地址写成了外部网络地址,排了半天错错误日志就那几句话,一直没有注意看IP。。现在发现居然是写错了地址


解决方法:


1.删除各节点/etc/swift/下所有.gz文件重新创建并发Ring

[root@compute swift]# rm *.gz
rm: remove regular file ‘account.ring.gz’? y
rm: remove regular file ‘container.ring.gz’? y
rm: remove regular file ‘object.ring.gz’? y

2.然后 重新创建并发Ring完成后将 新的.gz文件复制到每个存储节点

[root@controller swift]# scp *.gz 192.168.100.20:/etc/swift/
[email protected]'s password: 
account.ring.gz                                                                                 100%  451     0.4KB/s   00:00    
container.ring.gz                                                                               100%  453     0.4KB/s   00:00    
object.ring.gz                                                                                  100%  447     0.4KB/s   00:00    

3.上述完成后各节点重新添加权限

chown -R root:swift /etc/swift


4.重启控制节点服务和各存储节点服务

控制节点:

systemctl restart openstack-swift-proxy.service memcached.service

存储节点:

systemctl restart openstack-swift-account.service openstack-swift-account-auditor.service \
openstack-swift-account-reaper.service openstack-swift-account-replicator.service \
openstack-swift-container.service openstack-swift-container-auditor.service \
openstack-swift-container-replicator.service openstack-swift-container-updater.service \
openstack-swift-object.service openstack-swift-object-auditor.service \
openstack-swift-object-replicator.service openstack-swift-object-updater.service


5.重新显示服务状态

[root@controller ~]# swift stat
        Account: AUTH_8cc1c04a21ae4165a1667e0bd5029831
     Containers: 0
        Objects: 0
          Bytes: 0
X-Put-Timestamp: 1510845652.31045
    X-Timestamp: 1510845652.31045
     X-Trans-Id: tx9b845b33034f46f686b7f-005a0dacd3
   Content-Type: text/plain; charset=utf-8

你可能感兴趣的:(OpenStack错误整理)