【问题标题】:Failing to start containers on Ubuntu server (Time out on pypi.org)无法在 Ubuntu 服务器上启动容器(pypi.org 上的超时)
【发布时间】:2022-11-10 18:17:44
【问题描述】:

无法使用 docker-compose 在 Ubuntu 主机上启动 Docker 容器。收到此错误:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/celery/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/celery/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/celery/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/celery/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/celery/ ERROR: Could not find a version that satisfies the requirement celery==5.0.5 (from versions: none) ERROR: No matching distribution found for celery==5.0.5 ERROR: Service 'celery' failed to build: The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1

尝试在 Dockerfile 中放入 --default-timeout=100 参数:

RUN pip install -r requirements.txt --default-timeout=100

【问题讨论】:

    标签: docker-compose celery


    【解决方案1】:

    有时,简单的终端重启似乎可以解决问题。 如果这没有任何作用并且您在 Windows 上,那么也有以下解决方法:

    步骤1: 按Win+R打开运行,输入“regedit”,点击确定。 第2步: 移至 HKEY_CURRENT_USER/软件/Microsoft/Windows/当前版本/Internet 设置。 第 3 步: 找到一个名为“ProxyServer”的文件并将其删除。 第4步: 打开命令 第 5 步: 触发命令“pip install flask-bcrypt”

    From a GitHub Discussion

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-17
      • 2018-08-08
      • 2021-12-31
      • 1970-01-01
      • 1970-01-01
      • 2014-08-14
      • 2014-03-16
      • 2019-12-04
      相关资源
      最近更新 更多