FutureSend failure
Closed this issue · 3 comments
I have a falure trying to send direct data to another Peer
FutureSend fSend = peerDHT.send(number).object(str).start();
fSend.awaitUninterruptibly();(if i set handler error alse appears)
number - Number160 that identifies peer
After that i got ObjectDataReply on every node that is running and error message below.
[NETTY-TOMP2P - worker-client/server - -1-2] ERROR net.tomp2p.futures.BaseFutureAdapter - BaseFutureAdapter exceptionCaught()
java.lang.NullPointerException
at net.tomp2p.dht.DistributedHashTable$2$1$1.interMediateResponse(DistributedHashTable.java:198)
at net.tomp2p.dht.DistributedHashTable$8.operationComplete(DistributedHashTable.java:672)
at net.tomp2p.dht.DistributedHashTable$8.operationComplete(DistributedHashTable.java:668)
at net.tomp2p.futures.BaseFutureImpl.callOperationComplete(BaseFutureImpl.java:328)
at net.tomp2p.futures.BaseFutureImpl.notifyListeners(BaseFutureImpl.java:361)
at net.tomp2p.futures.FutureForkJoin.evaluate(FutureForkJoin.java:167)
at net.tomp2p.futures.FutureForkJoin.access$000(FutureForkJoin.java:33)
at net.tomp2p.futures.FutureForkJoin$1.operationComplete(FutureForkJoin.java:111)
at net.tomp2p.futures.BaseFutureImpl.callOperationComplete(BaseFutureImpl.java:328)
at net.tomp2p.futures.BaseFutureImpl.notifyListeners(BaseFutureImpl.java:361)
at net.tomp2p.futures.FutureResponse.responseNow(FutureResponse.java:152)
at net.tomp2p.connection.ChannelCreator$2$1.run(ChannelCreator.java:277)
at net.tomp2p.connection.ChannelCreator$2.operationComplete(ChannelCreator.java:282)
at net.tomp2p.connection.ChannelCreator$2.operationComplete(ChannelCreator.java:257)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:680)
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:603)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:563)
at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:406)
at io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:82)
at io.netty.channel.AbstractChannel$CloseFuture.setClosed(AbstractChannel.java:900)
at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:559)
at io.netty.channel.DefaultChannelPipeline$HeadContext.close(DefaultChannelPipeline.java:1098)
at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:543)
at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:528)
at io.netty.channel.ChannelDuplexHandler.close(ChannelDuplexHandler.java:73)
at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:543)
at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:528)
at io.netty.channel.ChannelDuplexHandler.close(ChannelDuplexHandler.java:73)
at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:543)
at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:528)
at io.netty.channel.ChannelOutboundHandlerAdapter.close(ChannelOutboundHandlerAdapter.java:71)
at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:543)
at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:528)
at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:394)
at net.tomp2p.connection.RequestHandler.channelRead0(RequestHandler.java:317)
at net.tomp2p.connection.RequestHandler.channelRead0(RequestHandler.java:40)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at net.tomp2p.message.TomP2PCumulationTCP.decoding(TomP2PCumulationTCP.java:71)
at net.tomp2p.message.TomP2PCumulationTCP.channelRead(TomP2PCumulationTCP.java:47)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at net.tomp2p.connection.IdleStateHandlerTomP2P.channelRead(IdleStateHandlerTomP2P.java:112)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:745)
java.lang.NullPointerException
at net.tomp2p.dht.DistributedHashTable$2$1$1.interMediateResponse(DistributedHashTable.java:198)
at net.tomp2p.dht.DistributedHashTable$8.operationComplete(DistributedHashTable.java:672)
at net.tomp2p.dht.DistributedHashTable$8.operationComplete(DistributedHashTable.java:668)
at net.tomp2p.futures.BaseFutureImpl.callOperationComplete(BaseFutureImpl.java:328)
at net.tomp2p.futures.BaseFutureImpl.notifyListeners(BaseFutureImpl.java:361)
at net.tomp2p.futures.FutureForkJoin.evaluate(FutureForkJoin.java:167)
at net.tomp2p.futures.FutureForkJoin.access$000(FutureForkJoin.java:33)
at net.tomp2p.futures.FutureForkJoin$1.operationComplete(FutureForkJoin.java:111)
at net.tomp2p.futures.BaseFutureImpl.callOperationComplete(BaseFutureImpl.java:328)
at net.tomp2p.futures.BaseFutureImpl.notifyListeners(BaseFutureImpl.java:361)
at net.tomp2p.futures.FutureResponse.responseNow(FutureResponse.java:152)
at net.tomp2p.connection.ChannelCreator$2$1.run(ChannelCreator.java:277)
at net.tomp2p.connection.ChannelCreator$2.operationComplete(ChannelCreator.java:282)
at net.tomp2p.connection.ChannelCreator$2.operationComplete(ChannelCreator.java:257)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:680)
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:603)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:563)
at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:406)
at io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:82)
at io.netty.channel.AbstractChannel$CloseFuture.setClosed(AbstractChannel.java:900)
at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:559)
at io.netty.channel.DefaultChannelPipeline$HeadContext.close(DefaultChannelPipeline.java:1098)
at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:543)
at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:528)
at io.netty.channel.ChannelDuplexHandler.close(ChannelDuplexHandler.java:73)
at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:543)
at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:528)
at io.netty.channel.ChannelDuplexHandler.close(ChannelDuplexHandler.java:73)
at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:543)
at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:528)
at io.netty.channel.ChannelOutboundHandlerAdapter.close(ChannelOutboundHandlerAdapter.java:71)
at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:543)
at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:528)
at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:394)
at net.tomp2p.connection.RequestHandler.channelRead0(RequestHandler.java:317)
at net.tomp2p.connection.RequestHandler.channelRead0(RequestHandler.java:40)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at net.tomp2p.message.TomP2PCumulationTCP.decoding(TomP2PCumulationTCP.java:71)
at net.tomp2p.message.TomP2PCumulationTCP.channelRead(TomP2PCumulationTCP.java:47)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at net.tomp2p.connection.IdleStateHandlerTomP2P.channelRead(IdleStateHandlerTomP2P.java:112)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:745)
[NETTY-TOMP2P - worker-client/server - -1-2] ERROR net.tomp2p.futures.BaseFutureImpl - Unexcpected exception in exceptionCaught()
java.lang.NullPointerException
at net.tomp2p.dht.DistributedHashTable$2$1$1.interMediateResponse(DistributedHashTable.java:198)
at net.tomp2p.dht.DistributedHashTable$8.operationComplete(DistributedHashTable.java:672)
at net.tomp2p.dht.DistributedHashTable$8.operationComplete(DistributedHashTable.java:668)
at net.tomp2p.futures.BaseFutureImpl.callOperationComplete(BaseFutureImpl.java:332)
at net.tomp2p.futures.BaseFutureImpl.notifyListeners(BaseFutureImpl.java:361)
at net.tomp2p.futures.FutureForkJoin.evaluate(FutureForkJoin.java:167)
at net.tomp2p.futures.FutureForkJoin.access$000(FutureForkJoin.java:33)
at net.tomp2p.futures.FutureForkJoin$1.operationComplete(FutureForkJoin.java:111)
at net.tomp2p.futures.BaseFutureImpl.callOperationComplete(BaseFutureImpl.java:328)
at net.tomp2p.futures.BaseFutureImpl.notifyListeners(BaseFutureImpl.java:361)
at net.tomp2p.futures.FutureResponse.responseNow(FutureResponse.java:152)
at net.tomp2p.connection.ChannelCreator$2$1.run(ChannelCreator.java:277)
at net.tomp2p.connection.ChannelCreator$2.operationComplete(ChannelCreator.java:282)
at net.tomp2p.connection.ChannelCreator$2.operationComplete(ChannelCreator.java:257)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:680)
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:603)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:563)
at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:406)
at io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:82)
at io.netty.channel.AbstractChannel$CloseFuture.setClosed(AbstractChannel.java:900)
at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:559)
at io.netty.channel.DefaultChannelPipeline$HeadContext.close(DefaultChannelPipeline.java:1098)
at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:543)
at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:528)
at io.netty.channel.ChannelDuplexHandler.close(ChannelDuplexHandler.java:73)
at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:543)
at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:528)
at io.netty.channel.ChannelDuplexHandler.close(ChannelDuplexHandler.java:73)
at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:543)
at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:528)
at io.netty.channel.ChannelOutboundHandlerAdapter.close(ChannelOutboundHandlerAdapter.java:71)
at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:543)
at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:528)
at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:394)
at net.tomp2p.connection.RequestHandler.channelRead0(RequestHandler.java:317)
at net.tomp2p.connection.RequestHandler.channelRead0(RequestHandler.java:40)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at net.tomp2p.message.TomP2PCumulationTCP.decoding(TomP2PCumulationTCP.java:71)
at net.tomp2p.message.TomP2PCumulationTCP.channelRead(TomP2PCumulationTCP.java:47)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at net.tomp2p.connection.IdleStateHandlerTomP2P.channelRead(IdleStateHandlerTomP2P.java:112)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:745)
This is interesting, I could not reproduce this behavior.
Do you have a code snippet or a JUnit that I can run?
I think that was my fault. During some experiments I found out that I need to bootstrap to another peer on both ends to be able to send direct messages. Stack trace was executed cause log4j was included.
You can either bootstrap on both ends, or wait until the maintenance ping figures out that the other peer is alive, or disable peer alive verification in the peer map.