<@U04S8PLJWMT> java.io.UncheckedIOException: java....
# ask-ai
í
@kapa.ai java.io.UncheckedIOException: java.net.SocketException: Socket closed at java.base/java.io.BufferedReader$1.hasNext(BufferedReader.java:684) ~[?:?] at java.base/java.util.Iterator.forEachRemaining(Iterator.java:132) ~[?:?] at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1939) ~[?:?] at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?] at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?] at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?] at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?] at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?] at io.airbyte.workers.WorkerUtils.getMessagesByType(WorkerUtils.java:205) ~[io.airbyte-airbyte-commons-worker-0.50.56.jar:?] at io.airbyte.workers.general.DefaultCheckConnectionWorker.run(DefaultCheckConnectionWorker.java:81) ~[io.airbyte-airbyte-commons-worker-0.50.56.jar:?] at io.airbyte.workers.general.DefaultCheckConnectionWorker.run(DefaultCheckConnectionWorker.java:44) ~[io.airbyte-airbyte-commons-worker-0.50.56.jar:?] at io.airbyte.workers.temporal.TemporalAttemptExecution.get(TemporalAttemptExecution.java:142) ~[io.airbyte-airbyte-workers-0.50.56.jar:?] at io.airbyte.workers.temporal.check.connection.CheckConnectionActivityImpl.lambda$runWithJobOutput$1(CheckConnectionActivityImpl.java:224) ~[io.airbyte-airbyte-workers-0.50.56.jar:?] at io.airbyte.commons.temporal.HeartbeatUtils.withBackgroundHeartbeat(HeartbeatUtils.java:57) ~[io.airbyte-airbyte-commons-temporal-core-0.50.56.jar:?] at io.airbyte.workers.temporal.check.connection.CheckConnectionActivityImpl.runWithJobOutput(CheckConnectionActivityImpl.java:209) ~[io.airbyte-airbyte-workers-0.50.56.jar:?] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?] at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?] at io.temporal.internal.activity.RootActivityInboundCallsInterceptor$POJOActivityInboundCallsInterceptor.executeActivity(RootActivityInboundCallsInterceptor.java:64) ~[temporal-sdk-1.22.3.jar:?] at io.temporal.internal.activity.RootActivityInboundCallsInterceptor.execute(RootActivityInboundCallsInterceptor.java:43) ~[temporal-sdk-1.22.3.jar:?] at io.temporal.internal.activity.ActivityTaskExecutors$BaseActivityTaskExecutor.execute(ActivityTaskExecutors.java:107) ~[temporal-sdk-1.22.3.jar:?] at io.temporal.internal.activity.ActivityTaskHandlerImpl.handle(ActivityTaskHandlerImpl.java:124) ~[temporal-sdk-1.22.3.jar:?] at io.temporal.internal.worker.ActivityWorker$TaskHandlerImpl.handleActivity(ActivityWorker.java:278) ~[temporal-sdk-1.22.3.jar:?] at io.temporal.internal.worker.ActivityWorker$TaskHandlerImpl.handle(ActivityWorker.java:243) ~[temporal-sdk-1.22.3.jar:?] at io.temporal.internal.worker.ActivityWorker$TaskHandlerImpl.handle(ActivityWorker.java:216) ~[temporal-sdk-1.22.3.jar:?] at io.temporal.internal.worker.PollTaskExecutor.lambda$process$0(PollTaskExecutor.java:105) ~[temporal-sdk-1.22.3.jar:?] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?] at java.base/java.lang.Thread.run(Thread.java:1583) [?:?] Caused by: java.net.SocketException: Socket closed at java.base/sun.nio.ch.NioSocketImpl.endRead(NioSocketImpl.java:243) ~[?:?] at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:323) ~[?:?] at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:346) ~[?:?] at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:796) ~[?:?] at java.base/java.net.Socket$SocketInputStream.read(Socket.java:1099) ~[?:?] at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:329) ~[?:?] at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:372) ~[?:?] at java.base/sun.nio.cs.StreamDecoder.lockedRead(StreamDecoder.java:215) ~[?:?] at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:169) ~[?:?] at java.base/java.io.InputStreamReader.read(InputStreamReader.java:188) ~[?:?] at java.base/java.io.BufferedReader.fill(BufferedReader.java:160) ~[?:?] at java.base/java.io.BufferedReader.implReadLine(BufferedReader.java:370) ~[?:?] at java.base/java.io.BufferedReader.readLine(BufferedReader.java:347) ~[?:?] at java.base/java.io.BufferedReader.readLine(BufferedReader.java:436) ~[?:?] at java.base/java.io.BufferedReader$1.hasNext(BufferedReader.java:681) ~[?:?] ... 27 more
k
This stack trace indicates the worker lost its stream while reading connector output during a Check Connection, causing a Socket closed error to propagate as UncheckedIOException from WorkerUtils.getMessagesByType. Similar cases in the knowledge sources occur when: - The job/connector subprocess is terminated or cancelled (e.g., exit code 143), which closes the underlying sockets the worker is reading from, leading to “Socket closed” while consuming stdout/stderr (seen during checks and syncs) ([Temporal Scheduler…](https://discuss.airbyte.io/t/1293), [Sync appears to be getting cancelled…](https://discuss.airbyte.io/t/2921), [source-greenhouse check fails](https://github.com/airbytehq/airbyte/issues/45411)). - Kubernetes pod/init container issues or timeouts cause the worker to fail or tear down the pod, again closing the streams while the worker is still reading them ([Temporal Scheduler…](https://discuss.airbyte.io/t/1293), [Temporal Scheduler… answers](https://discuss.airbyte.io/t/1293), [KubePodProcess NPE context](https://github.com/airbytehq/airbyte/issues/36819)). What to check/try: - Verify whether the check job was cancelled or retried and if the connector pod exited with 143 or similar; this is expected to produce “Socket closed” while reading logs ([Sync appears to be getting cancelled…](https://discuss.airbyte.io/t/2921), [source-greenhouse check fails](https://github.com/airbytehq/airbyte/issues/45411)). - Inspect Kubernetes events and pod status for timeouts/pending pods (image pull, scheduling, or init-container readiness) that could lead to abrupt stream closure ([Temporal Scheduler…](https://discuss.airbyte.io/t/1293)). - Re-run the check and review prior log lines for earlier errors from the connector; the “Socket closed” here is often a consequence rather than the root cause ([source-greenhouse check fails](https://github.com/airbytehq/airbyte/issues/45411)). I’m sorry, but the knowledge sources don’t provide a single definitive root cause beyond these patterns; they show this error typically follows job cancellation, connector exit, or pod/timeouts which close the worker’s log streams.