ERROR: "FATAL: no pg_hba.conf entry for host "[local]", user "etl_user", database "etl_user", SSL off" while accessing psql for HAWQ
While accessing psql for HAWQ, the command fails with the following error:
[etl_user@hdpmaster2 ~]$ source /usr/local/hawq/greenplum_path.sh
[etl_user@hdpmaster2 ~]$ psql
psql: FATAL: no pg_hba.conf entry for host "[local]", user "etl_user", database "etl_user", SSL off
This issue occurs when the etl_user is missing under pg_hba.conf and Postgres database.
To resolve the issue, create a new user from postgres by performing the following steps:
- Login as gpadmin, sudo su - gpadmin.
- Create new role and database:
CREATE USER <user_name> SUPERUSER;
CREATE DATABASE <user_name> WITH OWNER <database_name>; - Edit pg_hba.conf under Master data directory and make the following changes:
local all <user_name> trust
host all <user_name> 0.0.0.0/0 trust
host all <user_name> ::/0 trust - Restart HAWQ cluster.

