Ask Your Question

Failed to initialize connection pool - JDBC Redshift

asked 2019-02-13 06:17:34 -0500

larsjaja gravatar image

updated 2019-02-13 11:51:59 -0500

metadaddy gravatar image

While trying to run a query towards redshift. URL, credentials should all be valid - (works on most other JDBC clients):

jdbc:redshift://<url to redshift cluster>:5439/<database>

Tried pretty much all redshift JDBC library versions: latest was this: RedshiftJDBC42-no-awssdk- - downloaded from AWS.

Please advise.

com.zaxxer.hikari.pool.PoolInitializationException: Exception during pool initialization: [Amazon](500150) Error setting/closing connection: SocketTimeoutException.
    at com.zaxxer.hikari.pool.HikariPool.initializeConnections(
    at com.zaxxer.hikari.pool.HikariPool.<init>(
    at com.zaxxer.hikari.HikariDataSource.<init>(
    at com.streamsets.pipeline.lib.jdbc.JdbcUtil.createDataSourceForRead(
    at com.streamsets.pipeline.stage.executor.jdbc.JdbcQueryExecutorConfig.init(
    at com.streamsets.pipeline.stage.executor.jdbc.JdbcQueryExecutor.init(
    at com.streamsets.pipeline.api.base.BaseStage.init(
    at com.streamsets.pipeline.api.base.configurablestage.DStage.init(
    at com.streamsets.datacollector.runner.StageRuntime.lambda$init$0(
    at com.streamsets.datacollector.util.LambdaUtil.withClassLoaderInternal(
    at com.streamsets.datacollector.util.LambdaUtil.withClassLoader(
    at com.streamsets.datacollector.runner.StageRuntime.init(
    at com.streamsets.datacollector.runner.StagePipe.init(
    at com.streamsets.datacollector.runner.StagePipe.init(
    at com.streamsets.datacollector.runner.Pipeline.initPipe(
    at com.streamsets.datacollector.runner.Pipeline.lambda$init$0(
    at com.streamsets.datacollector.runner.PipeRunner.forEach(
    at com.streamsets.datacollector.runner.Pipeline.init(
    at com.streamsets.datacollector.execution.runner.standalone.StandaloneRunner.start(
    at com.streamsets.datacollector.execution.AbstractRunner.lambda$scheduleForRetries$0(
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.lambda$call$0(
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(
    at java.util.concurrent.ScheduledThreadPoolExecutor$
    at com.streamsets.datacollector.metrics.MetricSafeScheduledExecutorService$
    at java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.util.concurrent.ThreadPoolExecutor$
edit retag flag offensive close merge delete



SocketTimeoutException implies a connectivity issue from the machine where SDC is running to the DB instance. Is there a way to run a command line query against Redshift, and can you try doing so from the same machine where SDC runs?

jeff gravatar imagejeff ( 2019-02-13 11:48:36 -0500 )edit

Also, this kind of issue can arise with AWS resources if the security settings on the AWS side are not permitting the type of connection you're attempting to establish.

jeff gravatar imagejeff ( 2019-02-13 11:49:14 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-02-14 05:49:11 -0500

larsjaja gravatar image

updated 2019-02-14 09:07:41 -0500

metadaddy gravatar image

Thanks, @jeff - you are right! Turned out our network and security people are very cautious so outgoing traffic was blocked... Now I am in, and dumping data into redshift.

edit flag offensive delete link more


Hi @jeff or @larsjaja, I am having the same connectivity issue with Redshift. What specifically was the network/security fix? Thanks!

J3 gravatar imageJ3 ( 2020-03-18 21:58:57 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-02-13 06:17:34 -0500

Seen: 513 times

Last updated: Feb 14 '19