I have an Amazon EC2 instance where I have spun up a hadoop and hive cluster and have initialized postgres inside of a docker container. However, when I run the following code to initialize the hive metastore in postgres I get the following message about altering the pg_hba.conf file
Administrator:~/environment $ schematool -dbType postgres -initSchema
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/apache-hive-3.1.3-bin/lib/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/hadoop-3.3.4/share/hadoop/common/lib/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Metastore connection URL: jdbc:postgresql://localhost:6432/metastore
Metastore Connection Driver : org.postgresql.Driver
Metastore connection User: hive
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.
Underlying cause: org.postgresql.util.PSQLException : The authentication type 10 is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or subnet, and that it is using an authentication scheme supported by the driver.
SQL Error code: 0
Use --verbose for detailed stacktrace.
*** schemaTool failed ***
I have been able to log directly onto the container in order to alter the file in accordance with suggestions from this Post. I located the file in this path within the container /var/lib/postgresql/data/pg_hba.conf I attempted to edit it with vim, but it seems like everything in the file is already set to accept local connections. Please advise how to resolve the issue so that I can run the schematool -dbType postgres -initSchema command
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all trust
host replication all 127.0.0.1/32 trust
host replication all ::1/128 trust
host all all all scram-sha-256