Issue:
On SCH installation when using the script to populate the databases (01-initdb.sh) using a PostgreSQL database the following error appears:
Error while running 'BuildSchemaCommand': java.lang.Exception: Error looking up 'APPLICATION_INFO' table: org.postgresql.util.PSQLException: FATAL: Ident authentication failed for user \"admin\"\n\n----------------------------------------\njava.lang.Exception: Error looking up 'APPLICATION_INFO' table: org.postgresql.util.PSQLException: FATAL: Ident authentication failed for user \"admin\"\n\tat com.streamsets.lib.util.DbUtils.systemTableExists(DbUtils.java:38)\n\
Solution:
By default PostgreSQL is configured to work with ident authentication, this method works by obtaining the client's operating system user name from an ident server and using it as the allowed database username. If ident fails we can configure PostgreSQL to work with md5 method (md5 hash password identification) editing the pg_hba.conf file.
You can identify the location of the pg_hba.conf
file by running the following command in psql command line (you will need to be logged in as a superuser in the database):
postgres=# show hba_file; hba_file
--------------------------------------
/var/lib/postgresql/data/pg_hba.conf
(1 row)
The contents of the file will be something similar to:
local all all peer
host all all 127.0.0.1/32 ident
host all all ::1/128 ident
If PostgreSQL is on the same host that SCH we could change the line:
host all all 127.0.0.1/32 ident
to:
host all all 127.0.0.1/32 md5
Otherwise, we should add a new line with the host IP address:
host all all 192.168.11.11/32 md5