EssentialsX

EssentialsX

2M Downloads

Discord: Console relay stops after internet connection is lost

GGORG0 opened this issue ยท 1 comments

commented

Type of bug

Other unexpected behaviour

/ess dump all output

https://essentialsx.net/dump.html?id=708faf89235745aea329e7c4d6771c53

Error log (if applicable)

https://paste.gg/p/anonymous/ddf2268050ec449c9f47e8871dc0b2a5

Bug description

When my server loses the internet connection (network gear auto-restarts at 3:00 AM), the Discord console relay stops sending messages. Everything else, like chat relay (both ways) and running commands from the console channel works, just not sending the logs via a webhook.

This bug has been happening to me for I think about a year, but I didn't know how to report bugs at the time.

Steps to reproduce

  1. Enable the console relay
  2. Disconnect the server from the internet for about 1-2 minutes
  3. Print something to the console (e.g. run some commands or say something in chat)
  4. See that the logs aren't being forwarded to Discord, but everything else works
  5. Restart the server to fix it

Expected behaviour

The logs should be printed right after the internet connection is restored, and they should continue printing like normal

Actual behaviour

The console channel just goes silent, even after restoring the internet connection. /ess reload doesn't help. Only restarting the servers gets the relay to print new messages again.

Just my thoughts: The thread or whatever it used for printing messages crashes or stops after it fails to print new messages to Discord.

commented

this pair of errors shows up when this occurs
[net.essentialsx.dep.club.minnced.discord.webhook.WebhookClient] There was some error while sending a webhook message
java.net.UnknownHostException: No such host is known (discord.com)
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) ~[?:?]
at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:52) ~[?:?]
at java.net.InetAddress$PlatformResolver.lookupByName(InetAddress.java:1211) ~[?:?]
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1828) ~[?:?]
at java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:1139) ~[?:?]
at java.net.InetAddress.getAllByName0(InetAddress.java:1818) ~[?:?]
at java.net.InetAddress.getAllByName(InetAddress.java:1688) ~[?:?]
at net.essentialsx.dep.okhttp3.Dns$Companion$DnsSystem.lookup(Dns.kt:49) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.dep.okhttp3.internal.connection.RouteSelector.resetNextInetSocketAddress(RouteSelector.kt:164) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.dep.okhttp3.internal.connection.RouteSelector.nextProxy(RouteSelector.kt:129) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.dep.okhttp3.internal.connection.RouteSelector.next(RouteSelector.kt:71) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.dep.okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:205) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.dep.okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.dep.okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.dep.okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.dep.okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.dep.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.dep.okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.dep.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.dep.okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.dep.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.dep.okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.dep.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.dep.okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.dep.okhttp3.internal.connection.RealCall.execute(RealCall.kt:154) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.dep.club.minnced.discord.webhook.WebhookClient.executePair(WebhookClient.java:825) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.dep.club.minnced.discord.webhook.WebhookClient.drainQueue(WebhookClient.java:801) ~[EssentialsXDiscord-2.20.1.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.lang.Thread.run(Thread.java:1583) ~[?:?]
[10:25:17 ERROR]: [EssentialsDiscord] An error occurred while sending messages to your console channel! This was likely caused by accidentally deleting your console webhook. This can usually by fixed by ensuring your bot has the "Manage Webhooks" permission and running "/ess reload".
[10:25:22 WARN]: [EssentialsDiscord] Webhook (ID: 873778633645391872) took longer than expected to shutdown, this may have caused some problems.
java.lang.InterruptedException: ExecutorService did not terminate in time.
at net.essentialsx.discord.util.WrappedWebhookClient.close(WrappedWebhookClient.java:82) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.discord.util.ConsoleInjector.remove(ConsoleInjector.java:154) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.discord.util.ConsoleInjector.lambda$sendMessage$1(ConsoleInjector.java:83) ~[EssentialsXDiscord-2.20.1.jar:?]
at java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:990) ~[?:?]
at java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:974) ~[?:?]
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2194) ~[?:?]
at net.essentialsx.dep.club.minnced.discord.webhook.WebhookClient.executePair(WebhookClient.java:851) ~[EssentialsXDiscord-2.20.1.jar:?]
at net.essentialsx.dep.club.minnced.discord.webhook.WebhookClient.drainQueue(WebhookClient.java:801) ~[EssentialsXDiscord-2.20.1.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.lang.Thread.run(Thread.java:1583) ~[?:?]