Intermittent error found in automated multiplayer tests: opening socket failed

00:29:52.696 00:29:52.696 (coherence) WebSocket: : Opening socket failed 	requestID=882bf2f7:1 endpoint=wss://api.prod.coherence.io/v1/play/ws?runtime_key=940f9557fef24dc78bfceff08442535f backoff=00:00:02.1000000 errorCode=0 wsErrorCode=Success exception=System.Net.WebSockets.WebSocketException (0x80004005): Unable to connect to the remote server ---> System.IO.IOException: Unable to read data from the transport connection: Connection reset by peer. ---> System.Net.Sockets.SocketException: Connection reset by peer
   --- End of inner exception stack trace ---
  at System.Net.Sockets.Socket+AwaitableSocketAsyncEventArgs.ThrowException (System.Net.Sockets.SocketError error) [0x00007] in <ea9f879ffa91453c98b1316882a47d5c>:0 
  at System.Net.Sockets.Socket+AwaitableSocketAsyncEventArgs.GetResult (System.Int16 token) [0x00022] in <ea9f879ffa91453c98b1316882a47d5c>:0 
  at System.Threading.Tasks.ValueTask`1+ValueTaskSourceAsTask+<>c[TResult].<.cctor>b__4_0 (System.Object state) [0x00030] in <7560840559c84ffbb83a08c4696f01f7>:0 
--- End of stack trace from previous location where exception was thrown ---
  at Mono.Net.Security.MobileAuthenticatedStream.InnerRead (System.Boolean sync, System.Int32 requestedSize, System.Threading.CancellationToken cancellationToken) [0x00104] in <ea9f879ffa91453c98b1316882a47d5c>:0 
  at Mono.Net.Security.AsyncProtocolRequest.InnerRead (System.Threading.CancellationToken cancellationToken) [0x000ac] in <ea9f879ffa91453c98b1316882a47d5c>:0 
  at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (System.Threading.CancellationToken cancellationToken) [0x00093] in <ea9f879ffa91453c98b1316882a47d5c>:0 
  at Mono.Net.Security.AsyncProtocolRequest.StartOperation (System.Threading.CancellationToken cancellationToken) [0x0008b] in <ea9f879ffa91453c98b1316882a47d5c>:0 
  at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Boolean runSynchronously, Mono.Net.Security.MonoSslAuthenticationOptions options, System.Threading.CancellationToken cancellationToken) [0x00262] in <ea9f879ffa91453c98b1316882a47d5c>:0 
  at System.Net.WebSockets.WebSocketHandle.ConnectAsyncCore (System.Uri uri, System.Threading.CancellationToken cancellationToken, System.Net.WebSockets.ClientWebSocketOptions options) [0x00199] in <ea9f879ffa91453c98b1316882a47d5c>:0 
  at System.Net.WebSockets.WebSocketHandle.ConnectAsyncCore (System.Uri uri, System.Threading.CancellationToken cancellationToken, System.Net.WebSockets.ClientWebSocketOptions options) [0x00391] in <ea9f879ffa91453c98b1316882a47d5c>:0 
  at System.Net.WebSockets.ClientWebSocket.ConnectAsyncCore (System.Uri uri, System.Threading.CancellationToken cancellationToken) [0x000d1] in <ea9f879ffa91453c98b1316882a47d5c>:0 
  at Coherence.Runtime.WebSocket.OpenSocket () [0x000b4] in /builds/bossians/production/wild-skies/Library/PackageCache/io.coherence.sdk@0.9.2/Coherence.Runtime/WebSocket.cs:161 , stacktrace: UnityEngine.Debug:LogError (object)
Coherence.Log.UnityLogger:BuildAndPrintLog (Coherence.Log.LogLevel,string,System.Text.StringBuilder,System.ValueTuple`2<string, object>[]) (at /builds/bossians/production/wild-skies/Library/PackageCache/io.coherence.sdk@0.9.2/Coherence.Log/UnityLogger.cs:124)
Coherence.Log.Logger:Log (Coherence.Log.LogLevel,string,System.ValueTuple`2<string, object>[]) (at /builds/bossians/production/wild-skies/Library/PackageCache/io.coherence.sdk@0.9.2/Coherence.Log/Logger.cs:110)
Coherence.Log.Logger:Error (string,System.ValueTuple`2<string, object>[]) (at /builds/bossians/production/wild-skies/Library/PackageCache/io.coherence.sdk@0.9.2/Coherence.Log/Logger.cs:78)
Coherence.Log.UnityLogger:Error (string,System.ValueTuple`2<string, object>[]) (at /builds/bossians/production/wild-skies/Library/PackageCache/io.coherence.sdk@0.9.2/Coherence.Log/UnityLogger.cs:66)
Coherence.Runtime.WebSocket/<OpenSocket>d__42:MoveNext () (at /builds/bossians/production/wild-skies/Library/PackageCache/io.coherence.sdk@0.9.2/Coherence.Runtime/WebSocket.cs:174)
UnityEngine.UnitySynchronizationContext:ExecuteTasks () (at /home/bokken/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107)

Environment

SDK: v0.9.2
Engine: unity
Unity: 2022.1.8f1
OS/Platform: Ubuntu/Docker

Hi @Kirsten_Miller. Thanks for reporting this. It looks like a generic network error, not something to worry about.
But if you want to provide more detail along the lines of how often it occurs and what you’re doing at the time this occurs, maybe that can shed some more light.

It seems to be getting thrown intermittently, the most recent time it appears it is happening during room creation but the error is not being thrown from PlayResolver.CreateRoom.

Any idea where exactly this is thrown from?

1 Like

Hi Kirsten - I’ll investigate our logs to make sure this isn’t a disconnect on our end. Let me investigate and report back to you.

1 Like