I am using Neo4j version 1.4.1 and PostgresSQL 13 with PgAdmin 4.30. I recently installed PostgreSQL 13, before that I had PostgreSQL 12 and PgAdmin 4.24 when this ETL import thing worked.
But now, after removing PostgreSQL 12, I was trying to import my local postgres database to Neo-4j using the neo4j ETL tool.
My input connection detail:
Host= localhost
Port= 5432
Database= mydatabasename
Connection URL= jdbc:postgresql://localhost:5432/mydatabasename Username=myUsername password="mypassword"
But when I click the Test and Save Connection button, it shows this error:
Jan 30, 2021 1:10:43 AM org.postgresql.Driver connect SEVERE: Connection error: 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. at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:614) at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:222) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49) at org.postgresql.jdbc.PgConnection.(PgConnection.java:194) at org.postgresql.Driver.makeConnection(Driver.java:431) at org.postgresql.Driver.connect(Driver.java:247) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at org.neo4j.etl.rdbms.Support.testConnection(Support.java:32) at org.neo4j.etl.rdbms.Support.main(Support.java:74)
Connection failed. SQL state: 08004, message: 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.
I took the help of this post Unable to connect to Postgress DB due to the authentication type 10 is not supported. I tried changing my pg_hba.conf settings and set the method to md5:
local all all md5
I also configured my postgresql.conf like this:
listen_addresses = '*' port = 5432 max_connections = 100 password_encryption = md5
But nothing worked. I even tried reinstalling PostgreSQL 13 and PgAdmin 4.30.
I downloaded the latest JDBC version and tried to connect using that postgresql-42.2.18.jre7, but the same error. When I'm using a Java program to connect to this database, the connection is successful.
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class JavaPostgresIntegration {
public static void main(String[] args) {
Connection c = null;
try {
Class.forName("org.postgresql.Driver");
c = DriverManager.getConnection("jdbc:postgresql://localhost:5432/mydatabase", "postgres", "mypassword");
} catch (Exception e) {
e.printStackTrace();
System.err.println(e.getClass().getName() + ": " + e.getMessage());
System.exit(0);
}
System.out.println("Opened database successfully");
try {
c.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Output: Opened database Successfuly
(I am using the downloaded postgresql-42.2.18.jre7 for this program.)
Edit: I installed PostgreSQL 12 and it solved the problem. While when I was connecting to PostgreSQL 13 using Neo4j the error was still there.