Ask Your Question

Failed to connect to Postgresql db using JDBC Multitable Consumer

asked 2018-10-02 05:24:04 -0500

chen wai gravatar image


I attempted this issue when I connect to Postgresql JDBC table:

"Cannot connect to specified database: com.streamsets.pipeline.api.StageException: JDBC_06 - Failed to initialize connection pool: com.zaxxer.hikari.pool.PoolInitializationException: Exception during pool initialization: The connection attempt failed"

Just wanna know the root cause of causing this issue.

I had referred to this answer:

But I still dont have clue on how to fix. May I know there is any suggestions on fixing this issue.


edit retag flag offensive close merge delete


Hi! Can you please confirm/clarify if you're able to connect using a tool other than SDC from the same machine using the same credentials? That will help isolate the issue.

iamontheinet gravatar imageiamontheinet ( 2018-10-02 15:37:30 -0500 )edit

Hi, yes, I'm able to connect using other tools like python from the same machine using the same credentials

chen wai gravatar imagechen wai ( 2018-10-03 01:23:39 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-10-02 23:49:48 -0500

Maithri gravatar image

updated 2018-10-03 00:08:55 -0500

check :

         1)default port number 5432 for PostgreSQL is open

         2)place the PostgreSQL connector jar in the path 


         3)check the exact schema name.(example public)
           You can use the command :
           select schema_name from information_schema.schemata 
           and check what is the schema name for your db.
           Specify the same name in  the schema tab .
           Database name should be mentioned in JDBC connection URL

         4)Check the exact case of your table name.It might be case sensitive.
            check using \d
edit flag offensive delete link more


Thanks for the answer. Eventually I can connect to PostgreSQL and it works perfectly. But at some moment, it prompted me this error message and I need to restart SDC for several times and then it works again

chen wai gravatar imagechen wai ( 2018-10-03 01:46:33 -0500 )edit

I tested the PostgreSQL is working fine and I already place the PostgreSQL connector jar in the path. It used to work perfectly, but still attempted this issue. After restarted SDC for several times, it works fine, not sure what is root cause of it

chen wai gravatar imagechen wai ( 2018-10-03 03:42:33 -0500 )edit

try increasing Max Connection Lifetime or keep zero

Maithri gravatar imageMaithri ( 2018-10-03 03:45:08 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-10-02 05:24:04 -0500

Seen: 173 times

Last updated: Oct 03 '18