0

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.

  • The error would occur if you're using an older version of the PostgreSQL JDBC driver Are you absolutely sure that this Neo4J tool isn't using an older version of the driver (for example, maybe you didn't remove the old version, and given the order on the class path, that driver gets used first)? – Mark Rotteveel Jan 30 '21 at 08:50
  • Maybe it is a good idea to document all the steps you performed to replace the driver of the Neo4J ETL tool. – Mark Rotteveel Jan 30 '21 at 08:55
  • I installed PostgreSQL 12 and it solved the problem. While when I was connecting to PostgreSQL 13 using Neo4j the error was still there. @MarkRotteveel – Priyankesh Raj Jan 30 '21 at 16:29
  • I recently updated my Neo4j. So the ETL tool was automatically updated. I am not sure how to manually update the driver for the ETL tool. @MarkRotteveel – Priyankesh Raj Jan 30 '21 at 16:58
  • If you don't know how to manually update the driver, how do you know that you're using a 42.2.x version of the PostgreSQL driver as you claim in your question? – Mark Rotteveel Jan 30 '21 at 17:02
  • I downloaded the latest PostgreSQL JDBC driver *postgresql-42.2.18.jre7* and whenever there was any option to give the JDBC driver path for postgres in the ETL tool ,I gave the path of the downloaded driver. Apart from that I don't know how to update the JDBC driver of the ETL tool. If you could tell me or provide me any website link for the same I will be very grateful to you. Thank You! @MarkRotteveel – Priyankesh Raj Jan 30 '21 at 17:48

0 Answers0