Problem with pulp 3 rpm/file distribution. Getting 404 errors

Problem:
I’ve just installed pulp with ansible on a freshly installed rhel8 server.
Pulp got installed without problem.
I’ve also installed pulpcli and tried to creare a new rpm repo to publish an rpm and see if it work correctly.
I followed the instruction on pulp documentation and I was able to create the repo, upload an rpm artifact, publish the repository and distribute it.
I got the distribution url but it seems I cannot browse the repository or even download the published rpm.
I got a 404 accessing the url.

I’ve also tried to sync a redhat repository and publish/distribute it and still get a 404.
I think I’m probably missing some steps.

I’ve tried also with the file plugin using the documentation found here in Correctness check (Scripting — Pulp File 1.10.2 documentation) using the scripts from the git repo and all operation conclude correctly but at the end downloading the file i get a 404 and repository is not browsable.

Expected outcome:
Being able to see the repository content/download the file I’ve put in the repository

Pulpcore version:
3.19.0

Pulp plugins installed and their versions:
RPM: 3.17.5
FILE: 1.10.2

Operating system - distribution and version:
Red Hat Enterprise Linux release 8.6 (Ootpa)

Other relevant data:

install.yml used
---
- hosts: myserver
  force_handlers: True
  pre_tasks:
    - name: Verify Ansible meets min required version
      assert:
        that: "ansible_version.full is version_compare('2.9', '>=')"
        msg: >
          "You must update Ansible to at least 2.9 to use this version of Pulp 3 Installer."
    - name: Check (S3) storage backend is configured.
      assert:
        that:
          - pulp_settings.aws_access_key_id is defined
          - pulp_settings.aws_secret_access_key is defined
          - pulp_settings.aws_storage_bucket_name is defined
          - pulp_settings.aws_default_acl is defined
          - pulp_settings.s3_use_sigv4 is defined
          - pulp_settings.aws_s3_signature_version is defined
          - pulp_settings.aws_s3_addressing_style is defined
          - pulp_settings.aws_s3_region_name is defined
          - pulp_settings.media_root is defined
          - pulp_settings.default_file_storage is defined
      when: pulp_install_object_storage == "s3"
    - name: Check (Azure) storage backend is configured.
      assert:
        that:
          - pulp_settings.azure_account_name is defined
          - pulp_settings.azure_container is defined
          - pulp_settings.azure_account_key is defined
          - pulp_settings.azure_url_expiration_secs is defined
          - pulp_settings.azure_overwrite_files is defined
          - pulp_settings.azure_location is defined
          - pulp_settings.default_file_storage is defined
      when: pulp_install_object_storage == "azure"
    - name: Check if pulpcore repo exists
      stat:
        path: /etc/yum.repos.d/pulpcore.repo
      register: pulpcorerepo

    - name: Remove pulpcore fedorapeople
      lineinfile:
        path: /etc/yum.repos.d/pulpcore.repo
        regexp: 'fedorapeople'
        line: "baseurl = {{ pulp_pkg_repo }}"
      when: pulpcorerepo.stat.exists
  collections:
    - pulp.pulp_installer
  roles:
    - pulp_all_services
  environment:
    DJANGO_SETTINGS_MODULE: pulpcore.app.settings
  vars:
    pulp_repos_rhel_codeready_enable: false
    pulp_repos_rhel_opional_enable: false
    pulp_default_admin_password: xxxxxxxxxxxxxxxxxxx
    pulp_workers: 4
    pulpcore_update: true
    pulp_install_plugins:
      # galaxy-ng: {}
      # pulp-2to3-migration: {}
      # pulp-ansible: {}
      # pulp-certguard: {}
      # pulp-container: {}
      # pulp-cookbook: {}
      # pulp-deb: {}
      pulp-file: {}
      # pulp-gem: {}
      # pulp-maven: {}
      # pulp-npm: {}
      # pulp-ostree: {}
      # pulp-python: {}
      pulp-rpm: {}
    pulp_settings:
      secret_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      content_origin: "{{ pulp_webserver_disable_https | default(false) | ternary('http', 'https') }}://{{ ansible_fqdn }}"

pulp rpm repository show --name rpmtest
{
“pulp_href”: “/pulp/api/v3/repositories/rpm/rpm/37a83c44-ca1e-4261-838c-045f307a3d81/”,
“pulp_created”: “2022-06-02T13:35:54.989173Z”,
“versions_href”: “/pulp/api/v3/repositories/rpm/rpm/37a83c44-ca1e-4261-838c-045f307a3d81/versions/”,
“pulp_labels”: {},
“latest_version_href”: “/pulp/api/v3/repositories/rpm/rpm/37a83c44-ca1e-4261-838c-045f307a3d81/versions/1/”,
“name”: “rpmtest”,
“description”: null,
“retain_repo_versions”: null,
“remote”: null,
“autopublish”: false,
“metadata_signing_service”: null,
“retain_package_versions”: 0,
“metadata_checksum_type”: null,
“package_checksum_type”: null,
“gpgcheck”: 0,
“repo_gpgcheck”: 0,
“sqlite_metadata”: false
}

pulp rpm publication show --href /pulp/api/v3/publications/rpm/rpm/80345248-5a85-4055-a126-add065e0cae7/
{
“pulp_href”: “/pulp/api/v3/publications/rpm/rpm/80345248-5a85-4055-a126-add065e0cae7/”,
“pulp_created”: “2022-06-02T14:26:32.605648Z”,
“repository_version”: “/pulp/api/v3/repositories/rpm/rpm/37a83c44-ca1e-4261-838c-045f307a3d81/versions/1/”,
“repository”: “/pulp/api/v3/repositories/rpm/rpm/37a83c44-ca1e-4261-838c-045f307a3d81/”,
“metadata_checksum_type”: “sha256”,
“package_checksum_type”: “sha256”,
“gpgcheck”: 0,
“repo_gpgcheck”: 0,
“sqlite_metadata”: false
}

pulp rpm distribution show --name rpmtest-dist
{
“pulp_href”: “/pulp/api/v3/distributions/rpm/rpm/803010eb-77c3-475b-993d-8a9a1248e83c/”,
“pulp_created”: “2022-06-02T14:28:28.930222Z”,
“base_path”: “rpmtestdist”,
“base_url”: “https://servername/pulp/content/rpmtestdist/”,
“content_guard”: null,
“pulp_labels”: {},
“name”: “rpmtest-dist”,
“repository”: null,
“publication”: “/pulp/api/v3/publications/rpm/rpm/80345248-5a85-4055-a126-add065e0cae7/”
}

I was able to make it work downgrading to 3.18.3 as suggested here: