Getting "pkg_resources.DistributionNotFound: The 'ansible-core>=2.12.0' distribution was not found and is required by ansible-lint" on Red Hat Ansible Private Automation Hub

Solution Verified - Updated -

Issue

  • Private Automation Hub Services are not starting on one cluster node.

  • The Private Automation Hub is showing the following exception in /var/log/messages :

    Jul 14 09:10:56 automationhub gunicorn[57558]: [2023-07-14 09:10:56 +0000] [57566] [INFO] Worker exiting (pid: 57566)
    Jul 14 09:10:56 automationhub gunicorn[57558]: [2023-07-14 09:10:56 +0000] [57565] [ERROR] Exception in worker process
    ...
    Jul 14 09:10:56 automationhub gunicorn[57558]:  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2469, in require
    Jul 14 09:10:56 automationhub gunicorn[57558]:    items = working_set.resolve(reqs, env, installer, extras=self.extras)
    Jul 14 09:10:56 automationhub gunicorn[57558]:  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 770, in resolve
    Jul 14 09:10:56 automationhub gunicorn[57558]:    raise DistributionNotFound(req, requirers)
    Jul 14 09:10:56 automationhub gunicorn[57558]: pkg_resources.DistributionNotFound: The 'ansible-core>=2.12.0' distribution was not found and is required by ansible-lint
    
  • Getting below error while accessing the hub UI in the browser:

    502 Bad Gateway
    

Environment

  • Red Hat® Ansible Automation Platform 2.x
    • Private Automation Hub

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content