pypa / bandersnatch

A PyPI mirror client according to PEP 381 http://www.python.org/dev/peps/pep-0381/
Academic Free License v3.0
455 stars 141 forks source link

lots of packages on "not updating. Giving up." issue #1247

Closed 89ao closed 2 years ago

89ao commented 2 years ago

When I look into my banderlogfile, I saw a lot of "ERROR Stale serial for xxxxx (nnnnnn) not updating. Giving up." It seems that many package have gave up updating ,how can I deal with this packages? Are they give up "fow now" or "forever"? For now I have already "bandersnatch sync xxx xxx xxxx" manuelly but which is the better way to make them update automatically?

I am using bandersntach 6.0.0 on "docker pull image: pypa/bandersnatch"

LOG1:

/yum/pip/banderlogfile.log.2022-10-08_21:2022-10-08 17:40:48,437 bandersnatch.package: ERROR Stale serial for lusid-sdk-preview (15334162) not updating. Giving up.
/yum/pip/banderlogfile.log.2022-10-08_21:2022-10-08 18:10:48,229 bandersnatch.package: ERROR Stale serial for deepconsensus (15329078) not updating. Giving up.
/yum/pip/banderlogfile.log.2022-10-08_21:2022-10-08 18:10:49,921 bandersnatch.package: ERROR Stale serial for lusid-sdk-preview (15334162) not updating. Giving up.
/yum/pip/banderlogfile.log.2022-10-08_21:2022-10-08 18:40:47,663 bandersnatch.package: ERROR Stale serial for deepconsensus (15329078) not updating. Giving up.
/yum/pip/banderlogfile.log.2022-10-08_21:2022-10-08 18:40:48,747 bandersnatch.package: ERROR Stale serial for lusid-sdk-preview (15334162) not updating. Giving up.
/yum/pip/banderlogfile.log.2022-10-08_21:2022-10-08 19:10:47,796 bandersnatch.package: ERROR Stale serial for deepconsensus (15329078) not updating. Giving up.
/yum/pip/banderlogfile.log.2022-10-08_21:2022-10-08 19:10:48,867 bandersnatch.package: ERROR Stale serial for lusid-sdk-preview (15334162) not updating. Giving up.
/yum/pip/banderlogfile.log.2022-10-08_21:2022-10-08 19:40:48,062 bandersnatch.package: ERROR Stale serial for deepconsensus (15329078) not updating. Giving up.
/yum/pip/banderlogfile.log.2022-10-08_21:2022-10-08 20:10:48,301 bandersnatch.package: ERROR Stale serial for deepconsensus (15329078) not updating. Giving up.
/yum/pip/banderlogfile.log.2022-10-08_21:2022-10-08 20:40:48,106 bandersnatch.package: ERROR Stale serial for deepconsensus (15329078) not updating. Giving up.
/yum/pip/banderlogfile.log.2022-10-08_21:2022-10-08 21:40:56,767 bandersnatch.package: ERROR Stale serial for flexget (15337495) not updating. Giving up.
/yum/pip/banderlogfile.log.2022-10-09_01:2022-10-09 01:55:28,493 bandersnatch.package: ERROR Stale serial for flexget (15344666) not updating. Giving up.
/yum/pip/banderlogfile.log.2022-10-09_15:2022-10-09 02:42:25,010 bandersnatch.package: ERROR Stale serial for flexget (15344666) not updating. Giving up.
/yum/pip/banderlogfile.log.2022-10-09_15:2022-10-09 03:12:24,711 bandersnatch.package: ERROR Stale serial for flexget (15344666) not updating. Giving up.
/yum/pip/banderlogfile.log.2022-10-09_15:2022-10-09 03:42:24,877 bandersnatch.package: ERROR Stale serial for flexget (15344666) not updating. Giving up.

LOG2:

2022-10-09 02:25:07 bandersnatch.master: WARNING Got an error when attempting to clear the cache
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/bandersnatch/master.py", line 130, in check_for_stale_cache
    async with self.session.request("PURGE", path):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1138, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 640, in _request
    resp.raise_for_status()
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1004, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 401, message='Unauthorized', url=URL('https://pypi.org/pypi/flexget/json')
2022-10-09 02:25:07 bandersnatch.package: ERROR Stale serial for package flexget - Attempt 3
2022-10-09 02:25:07 bandersnatch.package: ERROR Stale serial for flexget (15344666) not updating. Giving up.
2022-10-09 02:25:07 bandersnatch.mirror: ERROR Error syncing package: flexget@15344666
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/bandersnatch/package.py", line 61, in update_metadata
    self._metadata = await master.get_package_metadata(
  File "/usr/local/lib/python3.10/site-packages/bandersnatch/master.py", line 240, in get_package_metadata
    metadata_response = await metadata_generator.asend(None)
  File "/usr/local/lib/python3.10/site-packages/bandersnatch/master.py", line 158, in get
    await self.check_for_stale_cache(path, required_serial, got_serial)
  File "/usr/local/lib/python3.10/site-packages/bandersnatch/master.py", line 137, in check_for_stale_cache
    raise StalePage(
bandersnatch.master.StalePage: Expected PyPI serial 15344666 for request https://pypi.python.org/pypi/flexget/json but got 15344665. HTTP PURGE has been issued to the request url

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/bandersnatch/mirror.py", line 129, in package_syncer
    await package.update_metadata(self.master, attempts=3)
  File "/usr/local/lib/python3.10/site-packages/bandersnatch/package.py", line 86, in update_metadata
    raise error_class(package_name=self.name, attempts=attempts)
bandersnatch.errors.StaleMetadata: Stale serial for flexget after 3 attempts

thanks a lot for your time.

89ao commented 2 years ago

already solved. using download-mirror option to download from another nearby mirror.