Uploaded image for project: 'Automation Hub'
  1. Automation Hub
  2. AAH-1679

synchronization fails due to 403 Forbidden

    • False
    • Hide

      None

      Show
      None
    • False
    • Approved

      Description

      I cannot synchronize the rh-certified repo to private automation hub.

      Some customers have raised support cases.

      Key Dependency Versions

          "versions": [
              {
                  "component": "core",
                  "version": "3.15.5"
              },
              {
                  "component": "container",
                  "version": "2.8.6"
              },
              {
                  "component": "ansible",
                  "version": "0.10.2"
              },
              {
                  "component": "galaxy",
                  "version": "4.4.3"
              }
          ],
      

      Steps to Reproduce

      Web UI > Repository Management > Remote > rh-certified > Edit > fill in the form > Save > press Sync

      It always occurs.

      Actual Behavior

      Here is /var/log/messages from my testing environment.

      May 31 14:55:00 aap21ah pulpcore-worker[8796]: pulp []: pulp_ansible.app.downloaders:INFO: Updating bearer token
      May 31 14:55:00 aap21ah pulpcore-worker[8796]: Giving up download_wrapper(...) after 1 tries (aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://console.redhat.com/api/automation-hub/'))
      May 31 14:55:00 aap21ah pulpcore-worker[8796]: pulp []: backoff:ERROR: Giving up download_wrapper(...) after 1 tries (aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://console.redhat.com/api/automation-hub/'))
      May 31 14:55:00 aap21ah pulpcore-worker[8796]: Giving up download_wrapper(...) after 1 tries (aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://console.redhat.com/api/automation-hub/api/'))
      May 31 14:55:00 aap21ah pulpcore-worker[8796]: pulp []: backoff:ERROR: Giving up download_wrapper(...) after 1 tries (aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://console.redhat.com/api/automation-hub/api/'))
      May 31 14:55:00 aap21ah pulpcore-worker[8796]: pulp []: pulpcore.tasking.pulpcore_worker:INFO: Task 37607df5-4a82-4944-9c2e-656558f32f26 failed (403, message='Forbidden', url=URL('https://console.redhat.com/api/automation-hub/api/'))
      May 31 14:55:00 aap21ah pulpcore-worker[8796]: pulp []: pulpcore.tasking.pulpcore_worker:INFO:   File "/usr/lib/python3.8/site-packages/pulpcore/tasking/pulpcore_worker.py", line 330, in _perform_task
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:    result = func(*args, **kwargs)
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:  File "/usr/lib/python3.8/site-packages/pulp_ansible/app/tasks/collections.py", line 137, in sync
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:    first_stage = CollectionSyncFirstStage(
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:  File "/usr/lib/python3.8/site-packages/pulp_ansible/app/tasks/collections.py", line 402, in __init__
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:    self.should_sync = not optimize or asyncio.get_event_loop().run_until_complete(
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:  File "/usr/lib64/python3.8/asyncio/base_events.py", line 616, in run_until_complete
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:    return future.result()
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:  File "/usr/lib/python3.8/site-packages/pulp_ansible/app/tasks/collections.py", line 755, in _should_we_sync
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:    root, api_version = await self._get_root_api(self.remote.url)
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:  File "/usr/lib/python3.8/site-packages/async_lru.py", line 237, in wrapped
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:    return (yield from asyncio.shield(fut, loop=_loop))
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:  File "/usr/lib/python3.8/site-packages/pulp_ansible/app/tasks/collections.py", line 426, in _get_root_api
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:    api_data = parse_metadata(await downloader.run())
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:  File "/usr/lib/python3.8/site-packages/pulpcore/download/http.py", line 259, in run
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:    return await download_wrapper()
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:  File "/usr/lib/python3.8/site-packages/backoff/_async.py", line 133, in retry
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:    ret = await target(*args, **kwargs)
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:  File "/usr/lib/python3.8/site-packages/pulpcore/download/http.py", line 255, in download_wrapper
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:    return await self._run(extra_data=extra_data)
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:  File "/usr/lib/python3.8/site-packages/pulp_ansible/app/downloaders.py", line 92, in _run
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:    return await self._run_with_token_refresh_and_401_retry()
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:  File "/usr/lib/python3.8/site-packages/pulp_ansible/app/downloaders.py", line 110, in _run_with_token_refresh_and_401_retry
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:    return await self._run_with_additional_headers(headers)
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:  File "/usr/lib/python3.8/site-packages/pulp_ansible/app/downloaders.py", line 135, in _run_with_additional_headers
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:    self.raise_for_status(response)
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:  File "/usr/lib/python3.8/site-packages/pulp_ansible/app/downloaders.py", line 69, in raise_for_status
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:    response.raise_for_status()
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:  File "/usr/lib64/python3.8/site-packages/aiohttp/client_reqrep.py", line 998, in raise_for_status
      May 31 14:55:00 aap21ah pulpcore-worker[8796]:    raise ClientResponseError(
      

      Expected Behavior

      without errors

              awcrosby5 Andrew Crosby (Inactive)
              rhn-support-tsugimur Takashi Sugimura (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: