gpload reports 'could not connect to database: FATAL: password authentication failed for user "user01"'
search cancel

gpload reports 'could not connect to database: FATAL: password authentication failed for user "user01"'

book

Article ID: 296897

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

When running gpload either manually or via a 3rd party application such as Informatica, the gpload command reports:
could not connect to database: FATAL:  password authentication failed for user "user01"
The password defined in the gpload YAML configuration file is correct, but the error is still reported.

Example output:
$ gpload -f gpload.yml 
2023-03-06 14:33:39|INFO|gpload session started 2023-03-06 14:33:39
2023-03-06 14:33:39|ERROR|could not connect to database: FATAL:  password authentication failed for user "user01"
. Is the Greenplum Database running on port 5432?
2023-03-06 14:33:39|INFO|rows Inserted          = 0
2023-03-06 14:33:39|INFO|rows Updated           = 0
2023-03-06 14:33:39|INFO|data formatting errors = 0
2023-03-06 14:33:39|INFO|gpload failed


Environment

Product Version: 6.23

Resolution

Check if there is a ".pgpass" file for the user running gpload. See PostgreSQL: Documentation: 15: 34.16. The Password File for the location of the file and details on the entries in the file.

Ensure that there is no entry in the file that would cause the incorrect password to be sent when connecting to the database for the user used by gpload. The passwords defined in the .pgpass file will be used before the password defined in the gpload YAML configuration file.

See the information on the "-W" option in gpload which gives details on how the password is provided by gpload when it is logging into the database.