Crash during shutdown
cpw opened this issue ยท 0 comments
It looks like if you command shutdown through signals (such as happens when docker closes the instance), the JDA shutdown hook kills the instance before the server itself.
You should register JDA not to use the shutdown hook, but rather, shutdown JDA during the server halt event. This way there won't be error spam during shutdown.
[27Oct2019 16:11:55.638] [Server thread/ERROR] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: Exception caught during firing event: java.lang.IllegalStateException: The Requester has been shutdown! No new requests can be requested!
Index: 8
Listeners:
0: NORMAL
1: ASM: everlastingabilities onServerStopping(Lnet/minecraftforge/fml/event/server/FMLServerStoppingEvent;)V
2: ASM: sampler.FmlMod@69853bb1 a(Lnet/minecraftforge/fml/event/server/FMLServerStoppingEvent;)V
3: ASM: flopper onServerStopping(Lnet/minecraftforge/fml/event/server/FMLServerStoppingEvent;)V
4: ASM: commoncapabilities onServerStopping(Lnet/minecraftforge/fml/event/server/FMLServerStoppingEvent;)V
5: ASM: ovh.corail.tombstone.ModTombstone@572f3180 onServerStoppingEvent(Lnet/minecraftforge/fml/event/server/FMLServerStoppingEvent;)V
6: ASM: class com.simibubi.create.Events onClose(Lnet/minecraftforge/fml/event/server/FMLServerStoppingEvent;)V
7: net.minecraftforge.eventbus.EventBus$$Lambda$2462/1565568596@4327d9e
8: ASM: de.erdbeerbaerlp.dcintegration.DiscordIntegration@292b5d61 serverStopping(Lnet/minecraftforge/fml/event/server/FMLServerStoppingEvent;)V
9: ASM: energeticsheep onServerStopping(Lnet/minecraftforge/fml/event/server/FMLServerStoppingEvent;)V
10: ASM: structuredcrafting onServerStopping(Lnet/minecraftforge/fml/event/server/FMLServerStoppingEvent;)V
11: ASM: cyclopscore onServerStopping(Lnet/minecraftforge/fml/event/server/FMLServerStoppingEvent;)V
12: ASM: colossalchests onServerStopping(Lnet/minecraftforge/fml/event/server/FMLServerStoppingEvent;)V
13: ASM: capabilityproxy onServerStopping(Lnet/minecraftforge/fml/event/server/FMLServerStoppingEvent;)V
java.lang.RuntimeException: java.lang.IllegalStateException: The Requester has been shutdown! No new requests can be requested!
at net.dv8tion.jda.core.requests.RestAction.complete(RestAction.java:446)
at net.dv8tion.jda.core.requests.RestAction.complete(RestAction.java:399)
at de.erdbeerbaerlp.dcintegration.Discord.getWebhook(Discord.java:449)
at de.erdbeerbaerlp.dcintegration.DiscordIntegration.serverStopping(DiscordIntegration.java:329)
at net.minecraftforge.eventbus.ASMEventHandler_140_DiscordIntegration_serverStopping_FMLServerStoppingEvent.invoke(.dynamic)
at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:80)
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:258)
at net.minecraftforge.fml.server.ServerLifecycleHooks.handleServerStopping(ServerLifecycleHooks.java:101)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:631)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: The Requester has been shutdown! No new requests can be requested!
at net.dv8tion.jda.core.requests.Requester.request(Requester.java:106)
at net.dv8tion.jda.core.requests.RestFuture.<init>(RestFuture.java:36)
at net.dv8tion.jda.core.requests.RestAction.submit(RestAction.java:380)
at net.dv8tion.jda.core.requests.RestAction.complete(RestAction.java:432)
... 9 more
It looks like there is an option to tell JDA not to register a shutdown hook..