bytesafe-ce icon indicating copy to clipboard operation
bytesafe-ce copied to clipboard

Fail to download some library python with python upstream

Open tsukiazuma opened this issue 2 years ago • 6 comments

Hello,

I can download some library python, but sometimes I can't with warning: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='bytesafe.xxx', port=443): Read timed out. (read timeout=15)")': /python/pypi-external/pytz/2023.3.post1/pytz-2023.3.post1-py2.py3-none-any.whl

Bytesafe use upstream: https://pypi.org/simple/

How can I do to fix it ?

Thank you.

tsukiazuma avatar Sep 14 '23 01:09 tsukiazuma

I added more information about the bytesafe log when downloading the library: bytesafe-bytesafe-ce-1 | time="2023-09-14T04:46:23Z" level=info msg="failed to pull package" accountId=bytesafe-ce action=PullFile error="[email protected] not found in registry or upstreams" file=python_dateutil-2.8.2-py2.py3-none-any.whl packageName=python-dateutil pkg=python/api registry=pypi-external registryName=pypi-external version=2.8.2 bytesafe-bytesafe-ce-1 | time="2023-09-14T04:46:23Z" level=warning msg="python.ParseFilename - skipping file python-dateutil-2.4.1.tar.bz2" action=fetchExternalUpstreamVersionsFromPyPI error="unparsable filename 'python-dateutil-2.4.1.tar.bz2' (extension)" pkg=artifacts bytesafe-bytesafe-ce-1 | time="2023-09-14T04:46:40Z" level=error msg="failed to fetch package binary" action=pullFromCandidates error="failed to write temp file: context canceled" len(candidates)=1 pkg=artifacts url="https://files.pythonhosted.org/packages/36/7a/87837f39d0296e723bb9b62bbb257d0355c7f6128853c78955f57342a56d/python_dateutil-2.8.2-py2.py3-none-any.whl"

tsukiazuma avatar Sep 14 '23 06:09 tsukiazuma

Hi,

it looks like your client is timing out for some reason. There are a few things you can try:

  1. make sure you are using the latest version of pip
  2. run pipwith a longer timeout, e.g. set PIP_DEFAULT_TIMEOUT=100 before running pip or pip install --default-timeout=100 xxxx

Kind Regards, Andreas

wallrat avatar Sep 15 '23 13:09 wallrat

Hi,

If setup with user's computer, I tried but it don't work.

If setup on server, how can I do to setup it? I deploy ByteSafe with docker, but can't excute docker image. I also encountered 1 more case. Error message requires installation of python >= 3.8. Although, I have upgraded to python 3.9.13 image

Thank you

tsukiazuma avatar Sep 18 '23 08:09 tsukiazuma

Hi,

it looks like your client is timing out for some reason. There are a few things you can try:

  1. make sure you are using the latest version of pip
  2. run pipwith a longer timeout, e.g. set PIP_DEFAULT_TIMEOUT=100 before running pip or pip install --default-timeout=100 xxxx

Kind Regards, Andreas

I think that this log line has cause the issue, it's not about the timeout. error="failed to write temp file: context canceled"

level=error msg="failed to fetch blob" accountId=bytesafe-ce action=pullBlob error="Get \"https://files.pythonhosted.org/packages/df/79/c80174d711ee26ee5da55a9cc3e248f1ec7a0188b5e4d6bbbbcd09b974b0/plotly-5.17.0-py2.py3-none-any.whl\": context canceled" pkg=artifacts url="https://files.pythonhosted.org/packages/df/79/c80174d711ee26ee5da55a9cc3e248f1ec7a0188b5e4d6bbbbcd09b974b0/plotly-5.17.0-py2.py3-none-any.whl"

wonhee0410 avatar Sep 18 '23 09:09 wonhee0410

Hi, sorry for the late answer:

If setup with user's computer, I tried but it don't work. Yes it a config for the client side. From the log you posted it looks like your client (i.e. pip?) is timing out and cutting the connection (thats where the "context canceled" and related log rows comes from). It could also be a proxy if you are using one to access Bytesafe.

wallrat avatar Sep 26 '23 14:09 wallrat

I tried configure for pip client and server contains docker of Bytesafe, but it don't work.

tsukiazuma avatar Sep 27 '23 08:09 tsukiazuma