swift stat执行报错HTTPConnectionPool(host='controller', port=8080)

在尝试使用 Swift 进行统计操作时遇到 HTTPConnectionPool 错误,具体表现为 'Max retries exceeded with url',问题源于无法连接到 controller 主机的 8080 端口。已检查日志,未发现相关错误记录,且 8080 端口未开启。建议检查输入是否正确,避免旧配置影响,确保端口开放并重新添加模块。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

[root@controller ~]# swift stat

HTTPConnectionPool(host='controller', port=8080): Max retries exceeded with url: /v1/AUTH_8cc1c04a21ae4165a1667e0bd5029831 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fee786be310>: Failed to establish a new connection: [Errno 111] Connection refused',))

[根@控制器~ ] #快速统计

[ gēn @ kòng zhì ~ ] # kuài tǒng

HTTPConnectionPool(host='controller', port=8080): Max retries exceeded with url: /v1/AUTH_8cc1c04a21ae4165a1667e0bd5029831 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fee786be310>: Failed to establish a new connection: [Errno 111] Connection refused',))

httpconnectionpool(主持人= 'controller,端口为8080):马克斯重试次数超过网址:/ V1 / auth_8cc1c04a21ae4165a1667e0bd5029831(由NewConnectionError(“< requests.packages.urllib3.connection.httpconnection对象在0x7fee786be310 >:未能建立起一个新的连接:[ 111 ]我拒绝连接,))


查看日志发现并没有报错记录

检查端口8080,发现没有开启

[root@controller ~]# ss -ntl | grep 8080

检查配置文件发现错误在:/etc/swift/proxy-server.conf 文件[pipeline:main]下 模块错误

可能是你输错了,没有注释掉以前的,是一句话不能回车,重新添加模块

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

重启服务

systemctl restart openstack-swift-proxy.service

查看8080端口,正常开启

[root@controller ~]# ss -ntl | grep 8080
LISTEN     0      128          *:8080                     *:*                  

执行swift stat正常显示

[root@controller ~]# ss -ntl | grep 8080
LISTEN     0      128          *:8080                     *:*                  
[root@controller ~]# . demo-openrc 
[root@controller ~]# swift stat
        Account: AUTH_8cc1c04a21ae4165a1667e0bd5029831
     Containers: 0
        Objects: 0
          Bytes: 0
X-Put-Timestamp: 1510849794.31358
    X-Timestamp: 1510849794.31358
     X-Trans-Id: tx11aea3fa5f8e45e2ab16b-005a0dbd01
   Content-Type: text/plain; charset=utf-8

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值