Support Questions
Find answers, ask questions, and share your expertise

problems using postgresql and sqoop




I would like to work with my postgres database and sqoop. I would like to get a list of all tables of a database and i would like to import a table from postgresql to sqoop.


When i installed everything, i followed the instruction


I used following commando to get the informaiton of the tables:

sqoop list-tables --driver=org.postgresql.Driver --connect jdbc:postgresql:// --username xxx --password xxx


But I get this Error Msg:

Warning: /usr/lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
18/08/29 09:58:50 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-cdh5.10.0
18/08/29 09:58:50 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
18/08/29 09:58:50 WARN sqoop.ConnFactory: Parameter --driver is set to an explicit driver however appropriate connection manager is not being set (via --connection-manager). Sqoop is going to fall back to org.apache.sqoop.manager.GenericJdbcManager. Please specify explicitly which connection manager should be used next time.
18/08/29 09:58:50 INFO manager.SqlManager: Using default fetchSize of 1000
18/08/29 09:58:51 ERROR manager.SqlManager: Error reading database metadata: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "", user "xxx", database "amon", SSL off
org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "", user "xxx", database "amon", SSL off
        at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(
        at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(
        at org.postgresql.core.ConnectionFactory.openConnection(
        at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(
        at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(
        at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(
        at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(
        at org.postgresql.jdbc4.Jdbc4Connection.<init>(
        at org.postgresql.Driver.makeConnection(
        at org.postgresql.Driver.connect(
        at java.sql.DriverManager.getConnection(
        at java.sql.DriverManager.getConnection(
        at org.apache.sqoop.manager.SqlManager.makeConnection(
        at org.apache.sqoop.manager.GenericJdbcManager.getConnection(
        at org.apache.sqoop.manager.SqlManager.listTables(
        at org.apache.sqoop.Sqoop.runSqoop(
        at org.apache.sqoop.Sqoop.runTool(
        at org.apache.sqoop.Sqoop.runTool(
        at org.apache.sqoop.Sqoop.main(
Could not retrieve tables list from server
18/08/29 09:58:51 ERROR tool.ListTablesTool: manager.listTables() returned null


I also tried to include '?sslmode=require' but it doesnt work.


Does someone knows, how i can fix this problem?


best regards


Master Guru
Postgres is sensitive to how you connect to it. You should be using the exact address it listens on, as only that will be allowed by the default configuration.

Your command carries an IP that's While am uncertain if you've masked it or if you are truly using a wildcard-designate IP for a server address, you should ideally be using the exact hostname/IP that the Postgres service is listening on.

Your Postgres service's configuration will carry the listening_address entry in it that designates this. Take a look at this thread over at Stack Exchange: