deathcap / node-minecraft-ping

Sends a server list ping packet Minecraft servers (1.2.5, 1.3.2, 1.4.4, 1.5.2, 1.6.4, 1.7.10, 1.8.9, 1.9)
MIT License
23 stars 12 forks source link

Query protocol (ping_fefd_udp) ping fails on Glowstone++ #9

Closed deathcap closed 8 years ago

deathcap commented 8 years ago

https://github.com/GlowstonePlusPlus/GlowstonePlusPlus edit config/glowstone.yml and set query-enabled: true (it is off by default), then try to ping:

node-minecraft-ping $ node demo.js localhost 25614
ping fe01fa error { [Error: connect ECONNREFUSED 127.0.0.1:25614]
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 25614 }
ping fe01 error { [Error: connect ECONNREFUSED 127.0.0.1:25614]
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 25614 }
ping fe error { [Error: connect ECONNREFUSED 127.0.0.1:25614]
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 25614 }

Supporting the fe pings in GS++ is https://github.com/GlowstonePlusPlus/GlowstonePlusPlus/issues/186, but it is supposed to have query support https://github.com/GlowstonePlusPlus/GlowstonePlusPlus/tree/master/src/main/java/net/glowstone/net/query - added in https://github.com/GlowstonePlusPlus/GlowstonePlusPlus/commit/e854d5056259450a0836fae220fd83d60bb75b48 from https://github.com/GlowstoneMC/Glowstone/issues/377 - I can query the vanilla server (tested with a modded 1.5.2 server.properties enable-query=true), but GS++ logs this error:

12:32:09 [INFO] Binding query to address: 0.0.0.0/0.0.0.0:25614...
12:32:09 [INFO] Ready for connections.
12:32:11 [SEVERE] Error in query handling
io.netty.util.IllegalReferenceCountException: refCnt: 0, decrement: 1
    at io.netty.buffer.AbstractReferenceCountedByteBuf.release(AbstractReferenceCountedByteBuf.java:111)
    at io.netty.buffer.WrappedByteBuf.release(WrappedByteBuf.java:832)
    at io.netty.buffer.SimpleLeakAwareByteBuf.release(SimpleLeakAwareByteBuf.java:44)
    at io.netty.util.ReferenceCountUtil.release(ReferenceCountUtil.java:84)
    at io.netty.channel.DefaultAddressedEnvelope.release(DefaultAddressedEnvelope.java:97)
    at io.netty.util.ReferenceCountUtil.release(ReferenceCountUtil.java:84)
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:112)
    at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelReadNow(ChannelHandlerInvokerUtil.java:84)
    at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelRead(DefaultChannelHandlerInvoker.java:153)
    at io.netty.channel.PausableChannelEventExecutor.invokeChannelRead(PausableChannelEventExecutor.java:86)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:389)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:956)
    at io.netty.channel.nio.AbstractNioMessageChannel$NioMessageUnsafe.read(AbstractNioMessageChannel.java:93)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:514)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:471)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:385)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:351)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
    at io.netty.util.internal.chmv8.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1412)
    at io.netty.util.internal.chmv8.ForkJoinTask.doExec(ForkJoinTask.java:280)
    at io.netty.util.internal.chmv8.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:877)
    at io.netty.util.internal.chmv8.ForkJoinPool.scan(ForkJoinPool.java:1706)
    at io.netty.util.internal.chmv8.ForkJoinPool.runWorker(ForkJoinPool.java:1661)
    at io.netty.util.internal.chmv8.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:126)
12:32:11 [WARNING] Failed to release a message: DatagramPacket(=> /127.0.0.1:61873, PooledUnsafeDirectByteBuf(freed))
io.netty.util.IllegalReferenceCountException: refCnt: 0, decrement: 1
    at io.netty.buffer.AbstractReferenceCountedByteBuf.release(AbstractReferenceCountedByteBuf.java:111)
    at io.netty.util.ReferenceCountUtil.release(ReferenceCountUtil.java:84)
    at io.netty.channel.DefaultAddressedEnvelope.release(DefaultAddressedEnvelope.java:97)
    at io.netty.util.ReferenceCountUtil.release(ReferenceCountUtil.java:84)
    at io.netty.util.ReferenceCountUtil.safeRelease(ReferenceCountUtil.java:109)
    at io.netty.channel.ChannelOutboundBuffer.remove(ChannelOutboundBuffer.java:288)
    at io.netty.channel.ChannelOutboundBuffer.failFlushed(ChannelOutboundBuffer.java:589)
    at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:839)
    at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.flush0(AbstractNioChannel.java:298)
    at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:806)
    at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1283)
    at io.netty.channel.ChannelHandlerInvokerUtil.invokeFlushNow(ChannelHandlerInvokerUtil.java:166)
    at io.netty.channel.DefaultChannelHandlerInvoker.invokeFlush(DefaultChannelHandlerInvoker.java:355)
    at io.netty.channel.PausableChannelEventExecutor.invokeFlush(PausableChannelEventExecutor.java:46)
    at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:546)
    at net.glowstone.net.query.QueryHandler.channelReadComplete(QueryHandler.java:50)
    at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelReadCompleteNow(ChannelHandlerInvokerUtil.java:92)
    at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelReadComplete(DefaultChannelHandlerInvoker.java:167)
    at io.netty.channel.PausableChannelEventExecutor.invokeChannelReadComplete(PausableChannelEventExecutor.java:91)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelReadComplete(AbstractChannelHandlerContext.java:412)
    at io.netty.channel.DefaultChannelPipeline.fireChannelReadComplete(DefaultChannelPipeline.java:962)
    at io.netty.channel.nio.AbstractNioMessageChannel$NioMessageUnsafe.read(AbstractNioMessageChannel.java:97)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:514)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:471)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:385)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:351)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
    at io.netty.util.internal.chmv8.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1412)
    at io.netty.util.internal.chmv8.ForkJoinTask.doExec(ForkJoinTask.java:280)
    at io.netty.util.internal.chmv8.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:877)
    at io.netty.util.internal.chmv8.ForkJoinPool.scan(ForkJoinPool.java:1706)
    at io.netty.util.internal.chmv8.ForkJoinPool.runWorker(ForkJoinPool.java:1661)
    at io.netty.util.internal.chmv8.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:126)

maybe an error on node-minecraft-ping or Glowstone++ (Netty 5 update?), would need to investigate further, saving this issue in node-minecraft-ping for now

deathcap commented 8 years ago

Also fails using https://github.com/xPaw/PHP-Minecraft-Query/blob/master/README.md#query instead of node-minecraft-ping. Opened https://github.com/GlowstonePlusPlus/GlowstonePlusPlus/issues/187