launchdarkly/java-server-sdk

Stream continuously reset

Closed this issue · 2 comments

I have the jdk setup for connecting to the relay and the event stream is continuously reset:

LOGS:

"Attempting to connect to SSE stream at https://******/all"
"Connected to SSE stream"
"Received StreamEvent: StartedEvent"
"Received message: MessageEvent(eventName=put,data=<streaming>,origin=https://******/all)"
"Received StreamEvent: MessageEvent(eventName=put,data=<streaming>,origin=https://******/all)"
"Received StreamEvent: CommentEvent()"
"Closed request"
"Received StreamEvent: FaultEvent(com.launchdarkly.shaded.com.launchdarkly.eventsource.StreamIOException: com.launchdarkly.shaded.okhttp3.internal.http2.StreamResetException: stream was reset: INTERNAL_ERROR)"
"Encountered EventSource error: {}"
"Error in stream connection (will retry): com.launchdarkly.shaded.com.launchdarkly.eventsource.StreamIOException: com.launchdarkly.shaded.okhttp3.internal.http2.StreamResetException: stream was reset: INTERNAL_ERROR"
"Waiting 1047 milliseconds before reconnecting"
"Attempting to connect to SSE stream at https://******/all"

SDK version 6.0.5 (update from 6.0.3 and 5.10.9 where the same logs appeared)
Relay version":"7.3.3","clientVersion":"6.0.3"

The relay reports on the /status path for the sdk key everything valid & healthy

Hello @adrian-salajan, assuming you haven't changed the connectTimeout in the HttpConfiguration and assuming your Relay isn't constantly resetting (you mention the status path is healthy), is there any network component like a firewall or network proxy that would close the SSE connection in your system? This isn't reproducible when I double-check by running both locally.

I recommend you open a ticket at https://support.launchdarkly.com/ as the support engineers will need to ask about your SDK configurations, network configuration, etc. to try to figure this out.

It was a network problem, something in Cloudfront (don't have the details). Pointing the relay to LD directly solved the issue.