Why I'm Getting "OperationalError: could not connect to server" in tower.log on Ansible Tower ?

Solution Verified - Updated -

Issue

When accessing Ansible Tower GUI, I'm getting "Internal Server Error". The tower.log shows the following error message.

OperationalError: could not connect to server: No route to host
    Is the server running on host "db.example.com" (1.1.1.1) and accepting
    TCP/IP connections on port 5432?

Environment

Ansible Tower 3.1+

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