With the HTTP Migration from HTTP1 to HTTP2 which has offered tremendous speed gains, there is a new issue where every so rarely often the mafia client will receive an IOException.
Summed up, it's as the title says. GOAWAY received.
It's not the devs trying to tell us we're unwelcome either, it's an actual HTTP error.
Two links to stackoverflow that seem very relevant. Link & Link
Could be the case that there was extra info in that server response that wasn't expressed in the exception, but it seems like the problem is fairly simple on that it's as the two links express.
As per some quick "research", "last-stream-id" is what we want, but apparently may not be properly supported in Java's HttpClient. Which is not great news.
A thought of a stupid hacky solution could be to recreate the connection every X requests, but I'm not sure that would work, or is even how it works.
Summed up, it's as the title says. GOAWAY received.
It's not the devs trying to tell us we're unwelcome either, it's an actual HTTP error.
Two links to stackoverflow that seem very relevant. Link & Link
Could be the case that there was extra info in that server response that wasn't expressed in the exception, but it seems like the problem is fairly simple on that it's as the two links express.
As per some quick "research", "last-stream-id" is what we want, but apparently may not be properly supported in Java's HttpClient. Which is not great news.
A thought of a stupid hacky solution could be to recreate the connection every X requests, but I'm not sure that would work, or is even how it works.
Disclaimer, the below exception was made on a modified client to print the exception.
Code:
IOException retrieving server reply (newchatmessages.php?j=1&lasttime=1517153437).
class java.io.IOException: /[IP Address:Port]: GOAWAY received
java.io.IOException: /[IP Address:Port]: GOAWAY received
at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:565)
at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:119)
at net.sourceforge.kolmafia.request.GenericRequest.sendRequest(GenericRequest.java:1575)
at net.sourceforge.kolmafia.request.GenericRequest.externalExecute(GenericRequest.java:1403)
at net.sourceforge.kolmafia.request.GenericRequest.execute(GenericRequest.java:1391)
at net.sourceforge.kolmafia.request.GenericRequest.run(GenericRequest.java:1146)
at net.sourceforge.kolmafia.request.ChatRequest.run(ChatRequest.java:79)
at net.sourceforge.kolmafia.chat.ChatPoller.run(ChatPoller.java:208)
Caused by: java.io.IOException: /[IP Address:Port]: GOAWAY received
at java.net.http/jdk.internal.net.http.Http2Connection.handleGoAway(Http2Connection.java:985)
at java.net.http/jdk.internal.net.http.Http2Connection.handleConnectionFrame(Http2Connection.java:853)
at java.net.http/jdk.internal.net.http.Http2Connection.processFrame(Http2Connection.java:724)
at java.net.http/jdk.internal.net.http.frame.FramesDecoder.decode(FramesDecoder.java:155)
at java.net.http/jdk.internal.net.http.Http2Connection$FramesController.processReceivedData(Http2Connection.java:232)
at java.net.http/jdk.internal.net.http.Http2Connection.asyncReceive(Http2Connection.java:649)
at java.net.http/jdk.internal.net.http.Http2Connection$Http2TubeSubscriber.processQueue(Http2Connection.java:1275)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SynchronizedRestartableTask.run(SequentialScheduler.java:175)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:147)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:198)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:271)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:224)
at java.net.http/jdk.internal.net.http.Http2Connection$Http2TubeSubscriber.runOrSchedule(Http2Connection.java:1293)
at java.net.http/jdk.internal.net.http.Http2Connection$Http2TubeSubscriber.onNext(Http2Connection.java:1319)
at java.net.http/jdk.internal.net.http.Http2Connection$Http2TubeSubscriber.onNext(Http2Connection.java:1253)
at java.net.http/jdk.internal.net.http.common.SSLTube$DelegateWrapper.onNext(SSLTube.java:202)
at java.net.http/jdk.internal.net.http.common.SSLTube$SSLSubscriberWrapper.onNext(SSLTube.java:484)
at java.net.http/jdk.internal.net.http.common.SSLTube$SSLSubscriberWrapper.onNext(SSLTube.java:287)
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper$DownstreamPusher.run1(SubscriberWrapper.java:318)
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper$DownstreamPusher.run(SubscriberWrapper.java:261)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SynchronizedRestartableTask.run(SequentialScheduler.java:175)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:147)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:198)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:271)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:224)
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper.outgoing(SubscriberWrapper.java:234)
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper.outgoing(SubscriberWrapper.java:200)
at java.net.http/jdk.internal.net.http.common.SSLFlowDelegate$Reader.processData(SSLFlowDelegate.java:403)
at java.net.http/jdk.internal.net.http.common.SSLFlowDelegate$Reader$ReaderDownstreamPusher.run(SSLFlowDelegate.java:264)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SynchronizedRestartableTask.run(SequentialScheduler.java:175)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:147)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:198)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)