WaterfallMC / Waterfall-Old

[UNMAINTAINED] Waterfall prior to becoming patch-based, see the project website at
https://papermc.io
Other
35 stars 12 forks source link

UnknownHostException - Any way to automatically resolve session server host? #71

Closed mibby closed 8 years ago

mibby commented 8 years ago

Waterfall dev 207

When this error occurs, all users are unable to join any server on the waterfall/bungeecord network until the proxy is restarted. Assuming because mojang migrated authentication/session servers. Is there any way to automatically resolve the session server without having to restart the proxy so users are able to connect when the error occurs?

04:08:48 [SEVERE] Error authenticating <user> with minecraft.net
java.net.UnknownHostException: sessionserver.mojang.com: unknown error
    at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
    at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
    at java.net.InetAddress.getAllByName0(InetAddress.java:1276)
    at java.net.InetAddress.getAllByName(InetAddress.java:1192)
    at java.net.InetAddress.getAllByName(InetAddress.java:1126)
    at java.net.InetAddress.getByName(InetAddress.java:1076)
    at net.md_5.bungee.http.HttpClient.get(HttpClient.java:64)
    at net.md_5.bungee.connection.InitialHandler.handle(InitialHandler.java:451)
    at net.md_5.bungee.protocol.packet.EncryptionResponse.handle(EncryptionResponse.java:49)
    at net.md_5.bungee.netty.HandlerBoss.channelRead(HandlerBoss.java:76)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
    at io.github.waterfallmc.waterfall.DirectByteToMessageDecoder.fireChannelRead(DirectByteToMessageDecoder.java:179)
    at io.github.waterfallmc.waterfall.DirectByteToMessageDecoder.channelRead(DirectByteToMessageDecoder.java:169)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
    at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:152)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
    at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:823)
    at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:339)
    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:255)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
    at java.lang.Thread.run(Thread.java:745)
minecrafter commented 8 years ago

You can try clearing your DNS caches.

Netty 4.1 has a custom resolver that we'll probably use in the future.

mibby commented 8 years ago

The issue resolves itself when restarting the proxy instance. Just it isn't an ideal situation. It would be nice to automatically resolve the authentication problem if mojang changes the session server so the proxy doesn't have to be restarted when it occurs to allow players to connect again. To have a setup that can be online for days/week at a time.

Janmm14 commented 8 years ago

Possibly the java dns cache is the issue here.