2023-11-15, 07:26 PM
Got some informations about the wake up :
JellyFin is reconnecting on my server when websocket fail
As you can see at 18:58:39 websocket sent and received informations (my server was up)
At 18:59 my server hibernate so WebSocket is sending every 30 seconds but got no reply :
Until 19:15:08 where Websocket failed and throw an error :
On my app we can see that Jellyfin app sent HTTP request to /socket at 19:15
At 19:16 Server is up and websocket is working again :
I continue to fetch logs and come back to you as soon I've something more interesting
Thanks
JellyFin is reconnecting on my server when websocket fail
As you can see at 18:58:39 websocket sent and received informations (my server was up)
Code:
11-15 18:58:39.919 8683 9174 I org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: Sending (raw) message {"MessageType":"KeepAlive","Data":{}}
11-15 18:58:39.926 8683 9081 I org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: Receiving (raw) message {"MessageType":"KeepAlive","MessageId":"f1b49e0128ba4fee986263c99a23451f"}
At 18:59 my server hibernate so WebSocket is sending every 30 seconds but got no reply :
Code:
11-15 18:59:40.006 8683 9174 I org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: Sending (raw) message {"MessageType":"KeepAlive","Data":{}}
11-15 19:00:10.050 8683 9174 I org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: Sending (raw) message {"MessageType":"KeepAlive","Data":{}}
Until 19:15:08 where Websocket failed and throw an error :
Code:
11-15 19:14:41.107 8683 9174 I org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: Sending (raw) message {"MessageType":"KeepAlive","Data":{}}
11-15 19:15:08.643 8683 9081 W org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: WebSocket has failed
11-15 19:15:08.643 8683 9081 W org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: java.io.EOFException
11-15 19:15:08.643 8683 9081 W org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: at okio.RealBufferedSource.require(RealBufferedSource.kt:199)
11-15 19:15:08.643 8683 9081 W org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: at okio.RealBufferedSource.readByte(RealBufferedSource.kt:209)
11-15 19:15:08.643 8683 9081 W org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: at okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.kt:119)
11-15 19:15:08.643 8683 9081 W org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.kt:102)
11-15 19:15:08.643 8683 9081 W org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.kt:293)
11-15 19:15:08.643 8683 9081 W org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: at okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(RealWebSocket.kt:195)
11-15 19:15:08.643 8683 9081 W org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
11-15 19:15:08.643 8683 9081 W org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
11-15 19:15:08.643 8683 9081 W org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
11-15 19:15:08.643 8683 9081 W org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: at java.lang.Thread.run(Thread.java:764)
11-15 19:15:08.651 8683 9174 I org.jellyfin.sdk.api.sockets.helper.ReconnectHelper: Reconnect scheduled in 30s (error=true)
11-15 19:15:11.150 8683 9174 I org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: Sending (raw) message {"MessageType":"KeepAlive","Data":{}}
11-15 19:15:11.150 8683 9174 W org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: Unable to send message: invalid state (state=ERROR)
11-15 19:15:38.693 8683 9174 D org.jellyfin.sdk.api.sockets.SocketInstance: Reconnect requested
11-15 19:15:38.694 8683 9174 I org.jellyfin.sdk.api.sockets.SocketInstance: Reconnecting
11-15 19:15:38.697 8683 9174 D org.jellyfin.sdk.api.sockets.helper.ReconnectHelper: Notified about reconnect, attempts=1
On my app we can see that Jellyfin app sent HTTP request to /socket at 19:15
Code:
time="2023-11-15T19:15:40Z" level=info client="172.30.33.5:43196" forwardedFor=<my-external-ip> method=GET path=/socket
time="2023-11-15T19:15:40Z" level=info msg="Server is offline, trying to wake up using Wake On Lan"
time="2023-11-15T19:15:40Z" level=info msg="Magic packet sent"
time="2023-11-15T19:15:46Z" level=info msg="Waiting for server to wake up..."
At 19:16 Server is up and websocket is working again :
Code:
11-15 19:16:38.836 8683 8972 D org.jellyfin.sdk.api.sockets.helper.ReconnectHelper: Notified about reconnect, attempts=2
11-15 19:16:38.946 8683 10490 I org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: WebSocket has opened
11-15 19:16:38.947 8683 8972 D org.jellyfin.sdk.api.sockets.helper.ReconnectHelper: Notified about connect, attempts reset
11-15 19:16:38.947 8683 8720 I org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: Sending (raw) message {"MessageType":"KeepAlive","Data":{}}
11-15 19:16:38.971 8683 10490 I org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: Receiving (raw) message {"MessageType":"ForceKeepAlive","MessageId":"00000000000000000000000000000000","Data":60}
11-15 19:16:38.972 8683 10490 I org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: Receiving (raw) message {"MessageType":"KeepAlive","MessageId":"fa2a7c95f57a4f7ca184777b59029c4a"}
11-15 19:16:38.975 8683 8720 I org.jellyfin.sdk.api.sockets.helper.KeepAliveHelper: Using a KeepAlive message delay of 30 seconds
11-15 19:16:38.976 8683 8740 I org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: Sending (raw) message {"MessageType":"KeepAlive","Data":{}}
11-15 19:16:38.980 8683 10490 I org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: Receiving (raw) message {"MessageType":"KeepAlive","MessageId":"c51f483e442f474a961727244e446066"}
11-15 19:17:09.009 8683 9174 I org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: Sending (raw) message {"MessageType":"KeepAlive","Data":{}}
11-15 19:17:09.016 8683 10490 I org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: Receiving (raw) message {"MessageType":"KeepAlive","MessageId":"1015bab14fcb463797981acb8214f4c3"}
11-15 19:17:39.042 8683 9174 I org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: Sending (raw) message {"MessageType":"KeepAlive","Data":{}}
11-15 19:17:39.049 8683 10490 I org.jellyfin.sdk.api.sockets.OkHttpWebsocketSession: Receiving (raw) message {"MessageType":"KeepAlive","MessageId":"27e03c98ce3640abac8d23ac14900189"}
I continue to fetch logs and come back to you as soon I've something more interesting
Thanks