Skip to main content

JDBC Query Executor unable to write to SQL server. Bails out with java.net.SocketException: Connection timed out (Read failed)

  • December 22, 2021
  • 0 replies
  • 108 views

subashini
StreamSets Employee
Forum|alt.badge.img

Issue:

The JDBC Executor was timing out writing to SQL server while  the same pipeline JDBC lookups on similar and other tables residing in the same database worked.

Errors stack seen in the SDC logs was

Connection ConnectionID:980 ClientConnectionId: <<nnnnnnnnnnnn>> marked as broken because of SQLSTATE(08S01), ErrorCode(0)
com.microsoft.sqlserver.jdbc.SQLServerException: Connection timed out (Read failed)
 at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:2892)
 at com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:2031)
 at com.microsoft.sqlserver.jdbc.TDSReader.readPacket(IOBuffer.java:6418)
 at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:7579)
 at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:866)
 at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:768)
 at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7194)
 at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2935)
 at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:248)
 at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:223)
 at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStatement.java:744)
 at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95)
 at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java)
 at com.streamsets.pipeline.stage.executor.jdbc.JdbcQueryExecutor.processARecord(JdbcQueryExecutor.java:238)
 at com.streamsets.pipeline.stage.executor.jdbc.JdbcQueryExecutor.processSerially(JdbcQueryExecutor.java:144)
 at com.streamsets.pipeline.stage.executor.jdbc.JdbcQueryExecutor.write(JdbcQueryExecutor.java:128)
 at com.streamsets.pipeline.api.base.configurablestage.DExecutor.write(DExecutor.java:34)
 at com.streamsets.datacollector.runner.StageRuntime.lambda$execute$2(StageRuntime.java:303)
 at com.streamsets.datacollector.runner.StageRuntime.execute(StageRuntime.java:244)
 at com.streamsets.datacollector.runner.StageRuntime.execute(StageRuntime.java:311)
 at com.streamsets.datacollector.runner.StagePipe.process(StagePipe.java:221)
 at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.processPipe(ProductionPipelineRunner.java:864)
 at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.lambda$executeRunner$3(ProductionPipelineRunner.java:908)
 at com.streamsets.datacollector.runner.PipeRunner.acceptConsumer(PipeRunner.java:207)
 at com.streamsets.datacollector.runner.PipeRunner.forEachInternal(PipeRunner.java:152)
 at com.streamsets.datacollector.runner.PipeRunner.executeBatch(PipeRunner.java:132)
 at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.executeRunner(ProductionPipelineRunner.java:907)
 at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.runSourceLessBatch(ProductionPipelineRunner.java:885)
 at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.runPollSource(ProductionPipelineRunner.java:609)
 at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.run(ProductionPipelineRunner.java:400)
 at com.streamsets.datacollector.runner.Pipeline.run(Pipeline.java:528)
 at com.streamsets.datacollector.execution.runner.common.ProductionPipeline.run(ProductionPipeline.java:112)
 at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunnable.run(ProductionPipelineRunnable.java:75)
 at com.streamsets.datacollector.execution.runner.standalone.StandaloneRunner.startInternal(StandaloneRunner.java:761)
 at com.streamsets.datacollector.execution.runner.standalone.StandaloneRunner.start(StandaloneRunner.java:754)
 at com.streamsets.datacollector.execution.AbstractRunner.lambda$scheduleForRetries$0(AbstractRunner.java:371)
 at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.lambda$call$0(SafeScheduledExecutorService.java:226)
 at com.streamsets.datacollector.security.GroupsInScope.execute(GroupsInScope.java:34)
 at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.call(SafeScheduledExecutorService.java:222)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
 at com.streamsets.datacollector.metrics.MetricSafeScheduledExecutorService$MetricsTask.run(MetricSafeScheduledExecutorService.java:100)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.SocketException: Connection timed out (Read failed)
 at java.net.SocketInputStream.socketRead0(Native Method)
 at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
 at java.net.SocketInputStream.read(SocketInputStream.java:171)
 at java.net.SocketInputStream.read(SocketInputStream.java:141)
 at com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:2023)
 ... 44 more

Solution:

 +    It turns out the MTU needed adjustment to let the larger amount of data in and out of the device

Did this topic help you find an answer to your question?
This topic has been closed for comments