DiscordSRV

DiscordSRV

86.8k Downloads

DNS Resolution failure due to attempted lookup with IPv6

timriker opened this issue ยท 7 comments

commented

Not sure what's failing to connect, but the stack traces make the console and logs hard to use.
Example log snippet:

https://pastebin.com/dsrQz922

$ sudo netstat -alntp | grep java
tcp6 0 0 127.0.0.1:8005 :::* LISTEN 94681/java
tcp6 0 0 :::8080 :::* LISTEN 94681/java
tcp6 0 0 :::25555 :::* LISTEN 9287/java
tcp6 0 0 :::25565 :::* LISTEN 55791/java
tcp6 0 0 10.7.0.4:45404 162.159.134.234:443 ESTABLISHED 55791/java
tcp6 0 0 10.7.0.4:37022 162.159.134.233:443 ESTABLISHED 55791/java
$ host gateway.discord.gg
gateway.discord.gg has address 162.159.136.234
gateway.discord.gg has address 162.159.135.234
gateway.discord.gg has address 162.159.133.234
gateway.discord.gg has address 162.159.134.234
gateway.discord.gg has address 162.159.130.234

commented

Caused by: java.net.UnknownHostException: gateway.discord.gg: Temporary failure in name resolution
at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)

It looks like the connection is attempted with IPv6 while gateway.discord.gg isn't IPv6 compatible (no AAAA records)

Edit,
Though this could be a issue with Java or the websocket client (com.neovisionaries.ws), and not DiscordSRV.
Discord should most definitely start supporting IPv6 Discord feedback entry

commented

In the example log you gave, all of these errors indicate that DNS resolution is failing. You should switch your server to using a public DNS resolver such as Cloudflare's.

commented

It looks like something is causing systemd-resolved to fail with a core dump, so it looks like this is not a direct issue with DiscordSRV, but rather just an issue of getting stack traces instead of a brief error message.

Feb 28 16:45:15 bob systemd[1]: systemd-resolved.service: Failed with result 'core-dump'.
Feb 28 17:55:44 bob systemd[1]: systemd-resolved.service: Failed with result 'core-dump'.
Feb 28 18:02:20 bob systemd[1]: systemd-resolved.service: Failed with result 'core-dump'.
Feb 28 19:08:23 bob systemd[1]: systemd-resolved.service: Failed with result 'core-dump'.
Feb 28 19:29:31 bob systemd[1]: systemd-resolved.service: Failed with result 'core-dump'.
commented

We cannot minimize the error

commented

After bypassing systemd-resolved, I'm still getting lots of stack traces. Timeout exceptions. Seems to escalate. Stack traces generate traffic, which tries to send them to the console channel, which, probably do to volume, rejects them so it times out, generating a stack trace, which puts us back at the start.

commented

The console channel won't attempt to send messages while JDA isn't connected to Discord. There are measures to reduce the spam of exceptions, providing the stack trace for those timeouts would help with possibly reducing them even more, if possible

commented

Side note; Discord's bumpy https://status.discordapp.com