Concourse UAA/Credhub fails with "The connection attempt failed" and SQL State 08001
search cancel

Concourse UAA/Credhub fails with "The connection attempt failed" and SQL State 08001

book

Article ID: 391095

calendar_today

Updated On:

Products

Concourse for VMware Tanzu

Issue/Introduction

When using Concourse with an external database, it may be observed that the credhub and uaa processes are in a failing state. When looking at the logs in /var/vcap/sys/log/uaa/localhost.log, it shows:

 

SQL State  : 08001
Error Code : 0
Message    : The connection attempt failed.

Resolution

This error indicates for whatever reason, the VM where credhub and UAA are running cannot communicate with the configured DB. The following should be tested to narrow down where the issue may be:

  1. First, verify that the connection details provided to concourse are valid for the DB. You can confirm these with bosh -d <concourse> manifest. Ensure that you can connect with these details from outside the env.
  2. If the creds are valid, and you can connect from outside the env, ensure that the Concourse VMs can reach the network where the database is running. The best way to this is:
    1. bosh ssh to a concourse deployed VM
    2. Run nc -v <db-host> 5432
  3. If there is a connection issue, you will need to work with you network team and ensure the IPs for the concourse VMs are allowed access to the DB address, using port 5432.

If the above steps don't resolve the problem, please contact support.