Ask Your Question
0

Failed to connect to Postgresql db using JDBC Multitable Consumer

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

chen wai gravatar image

Hi,

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: https://ask.streamsets.com/question/3...

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

Thanks

edit retag flag offensive close merge delete

Comments

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 -0600 )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 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

Maithri gravatar image

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

check :

         1)default port number 5432 for PostgreSQL is open

         2)place the PostgreSQL connector jar in the path 

         streamsets-datacollector-3.3.0/streamsets-libs/
         streamsets-datacollector-jdbc-lib/lib/

         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

Comments

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 -0600 )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 -0600 )edit

try increasing Max Connection Lifetime or keep zero

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

Question Tools

1 follower

Stats

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

Seen: 42 times

Last updated: Oct 03