Skip to content

Correctly deal with exception below #907

Closed

Description

@bnouwt
smart-connectors-runtime-1  | Oct 09, 2026 6:54:47 AM org.glassfish.jersey.server.ServerRuntime$Responder writeResponse
smart-connectors-runtime-1  | SEVERE: An I/O error has occurred while writing a response message entity to the container output stream.
smart-connectors-runtime-1  | org.glassfish.jersey.server.internal.process.MappableException: org.eclipse.jetty.io.EofException
smart-connectors-runtime-1  |   at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:67)
smart-connectors-runtime-1  |   at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139)
smart-connectors-runtime-1  |   at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1116)
smart-connectors-runtime-1  |   at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:691)
smart-connectors-runtime-1  |   at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:398)
smart-connectors-runtime-1  |   at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:388)
smart-connectors-runtime-1  |   at org.glassfish.jersey.server.ServerRuntime$AsyncResponder$3.run(ServerRuntime.java:926)
smart-connectors-runtime-1  |   at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
smart-connectors-runtime-1  |   at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
smart-connectors-runtime-1  |   at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
smart-connectors-runtime-1  |   at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
smart-connectors-runtime-1  |   at org.glassfish.jersey.internal.Errors.process(Errors.java:244)
smart-connectors-runtime-1  |   at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:266)
smart-connectors-runtime-1  |   at org.glassfish.jersey.server.ServerRuntime$AsyncResponder.resume(ServerRuntime.java:963)
smart-connectors-runtime-1  |   at org.glassfish.jersey.server.ServerRuntime$AsyncResponder.resume(ServerRuntime.java:914)
smart-connectors-runtime-1  |   at eu.knowledge.engine.rest.api.impl.ProactiveApiServiceImpl.lambda$scPostPost$0(ProactiveApiServiceImpl.java:307)
smart-connectors-runtime-1  |   at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:739)
smart-connectors-runtime-1  |   at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:531)
smart-connectors-runtime-1  |   at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2206)
smart-connectors-runtime-1  |   at eu.knowledge.engine.smartconnector.impl.ReasonerProcessor.lambda$continueReasoningForward$0(ReasonerProcessor.java:337)
smart-connectors-runtime-1  |   at java.base/java.util.concurrent.CompletableFuture.uniAcceptNow(CompletableFuture.java:778)
smart-connectors-runtime-1  |   at java.base/java.util.concurrent.CompletableFuture.uniAcceptStage(CompletableFuture.java:756)
smart-connectors-runtime-1  |   at java.base/java.util.concurrent.CompletableFuture.thenAccept(CompletableFuture.java:2241)
smart-connectors-runtime-1  |   at eu.knowledge.engine.smartconnector.impl.ReasonerProcessor.continueReasoningForward(ReasonerProcessor.java:329)
smart-connectors-runtime-1  |   at eu.knowledge.engine.smartconnector.impl.ReasonerProcessor.lambda$continueReasoningForward$0(ReasonerProcessor.java:339)
smart-connectors-runtime-1  |   at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:739)
smart-connectors-runtime-1  |   at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:531)
smart-connectors-runtime-1  |   at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2221)
smart-connectors-runtime-1  |   at java.base/java.util.concurrent.CompletableFuture$Timeout.run(CompletableFuture.java:2828)
smart-connectors-runtime-1  |   at java.base/java.util.concurrent.DelayScheduler$ScheduledForkJoinTask.compute(DelayScheduler.java:543)
smart-connectors-runtime-1  |   at java.base/java.util.concurrent.ForkJoinTask$InterruptibleTask.exec(ForkJoinTask.java:1662)
smart-connectors-runtime-1  |   at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:511)
smart-connectors-runtime-1  |   at java.base/java.util.concurrent.DelayScheduler.loop(DelayScheduler.java:325)
smart-connectors-runtime-1  |   at java.base/java.util.concurrent.DelayScheduler.run(DelayScheduler.java:221)
smart-connectors-runtime-1  | Caused by: org.eclipse.jetty.io.EofException
smart-connectors-runtime-1  |   at org.eclipse.jetty.io.SocketChannelEndPoint.flush(SocketChannelEndPoint.java:116)
smart-connectors-runtime-1  |   at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:422)
smart-connectors-runtime-1  |   at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:275)
smart-connectors-runtime-1  |   at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:254)
smart-connectors-runtime-1  |   at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:386)
smart-connectors-runtime-1  |   at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:843)
smart-connectors-runtime-1  |   at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:243)
smart-connectors-runtime-1  |   at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)
smart-connectors-runtime-1  |   at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:600)
smart-connectors-runtime-1  |   at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:1051)
smart-connectors-runtime-1  |   at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:1123)
smart-connectors-runtime-1  |   at org.eclipse.jetty.server.HttpOutput.channelWrite(HttpOutput.java:271)
smart-connectors-runtime-1  |   at org.eclipse.jetty.server.HttpOutput.channelWrite(HttpOutput.java:255)
smart-connectors-runtime-1  |   at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:859)
smart-connectors-runtime-1  |   at org.glassfish.jersey.servlet.internal.ResponseWriter$NonCloseableOutputStreamWrapper.write(ResponseWriter.java:302)
smart-connectors-runtime-1  |   at org.glassfish.jersey.message.internal.CommittingOutputStream.write(CommittingOutputStream.java:203)
smart-connectors-runtime-1  |   at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$UnCloseableOutputStream.write(WriterInterceptorExecutor.java:276)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.core.json.UTF8JsonGenerator._flushBuffer(UTF8JsonGenerator.java:2281)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.core.json.UTF8JsonGenerator.writeString(UTF8JsonGenerator.java:526)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ser.std.StringSerializer.serialize(StringSerializer.java:40)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeFieldsUsing(MapSerializer.java:904)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeWithoutTypeInfo(MapSerializer.java:761)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:719)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:34)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:119)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:79)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:18)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:732)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:760)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:183)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:119)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:79)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:18)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:732)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:760)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:183)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider._serialize(DefaultSerializerProvider.java:503)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:342)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ObjectWriter$Prefetch.serialize(ObjectWriter.java:1587)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.databind.ObjectWriter.writeValue(ObjectWriter.java:1061)
smart-connectors-runtime-1  |   at com.fasterxml.jackson.jakarta.rs.base.ProviderBase.writeTo(ProviderBase.java:621)
smart-connectors-runtime-1  |   at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:242)
smart-connectors-runtime-1  |   at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:227)
smart-connectors-runtime-1  |   at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139)
smart-connectors-runtime-1  |   at org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:85)
smart-connectors-runtime-1  |   at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:139)
smart-connectors-runtime-1  |   at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:61)
smart-connectors-runtime-1  |   ... 33 more
smart-connectors-runtime-1  | Caused by: java.io.IOException: Broken pipe
smart-connectors-runtime-1  |   at java.base/sun.nio.ch.SocketDispatcher.writev0(Native Method)
smart-connectors-runtime-1  |   at java.base/sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:70)
smart-connectors-runtime-1  |   at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:227)
smart-connectors-runtime-1  |   at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:158)
smart-connectors-runtime-1  |   at java.base/sun.nio.ch.SocketChannelImpl.implWrite(SocketChannelImpl.java:593)
smart-connectors-runtime-1  |   at java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:627)
smart-connectors-runtime-1  |   at java.base/java.nio.channels.SocketChannel.write(SocketChannel.java:633)
smart-connectors-runtime-1  |   at org.eclipse.jetty.io.SocketChannelEndPoint.flush(SocketChannelEndPoint.java:110)
smart-connectors-runtime-1  |   ... 79 more
smart-connectors-runtime-1  |
smart-connectors-runtime-1  | 2026-10-09 06:54:47:093 +0000 [ForkJoinPool.commonPool-delayScheduler] WARN MessageRouterImpl-SCU-200-B46 - KB 'https://bronscode.nl/microgrid/ingest/SmartMeters' did not respond within 60s to PostMessage 'c859262a-6907-4300-9054-63927344b8d1'.

Activity

  1. self-assigned this
    on Oct 23, 2026
  2. bnouwt commented on Oct 23, 2026

    @bnouwt
    CollaboratorAuthor

    This exception occurred because a KB (i.e. REST API client) had a shorter (or the same) timeout as the KE_KB_WAIT_TIMEOUT configuration property of the KE. In the network was a non-responsive KB which caused this KE_KB_WAIT_TIMEOUT to be applicable, but sometimes when it finished the POST KI the REST API client already disconnected due to the timeout. Therefore, we see the broken pipe error at the server side.

    Tested this, but it does not happen like that. In the above scenario, no mapped exception is thrown. What needs to happen is the following:
    - create BIG REACT KI response using Test java in Eclipse
    - Add to Bruno's handlePosst (about 6 Mb). Better to use a file (don't forget to set the mimetype to application/json).
    - Use Bruno KB1 and KB2 with post and react. Activate post using CURL with added --limit-rate 10b configuration.
    - Use HandleGet to retrieve and postHandle to post data.
    - Then wait while CURL receives data and if you see data on screen press CTRL+C.
    - Check the log of the KER server and see a MappedException.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions