tomp2p / TomP2P

A P2P-based high performance key-value pair storage library
http://tomp2p.net
Apache License 2.0
438 stars 122 forks source link

Discovery is broken, getting NPE in PingRPC #112

Closed rkfg closed 8 years ago

rkfg commented 8 years ago

Trying ExampleDNS with logging enabled:

15 Oct 2015 04:18:30,753 [] DEBUG PeerMap - Peer paddr[0xbb1ad57319b89cd868fb0e6f684df992352cccfc/10.6.0.29,4001,] is offline with reason PeerException (PEER_ERROR): java.lang.NullPointerException.
15 Oct 2015 04:18:30,753 [] ERROR DispatchHandler - Exception in custom handler.
java.lang.NullPointerException
    at net.tomp2p.rpc.PingRPC.handleResponse(PingRPC.java:351)
    at net.tomp2p.rpc.DispatchHandler.forwardMessage(DispatchHandler.java:170)
    at net.tomp2p.connection.Sender.sendSelf(Sender.java:379)
    at net.tomp2p.connection.Sender.sendTCP(Sender.java:174)
    at net.tomp2p.connection.RequestHandler.sendTCP(RequestHandler.java:189)
    at net.tomp2p.rpc.PingRPC.pingTCPDiscover(PingRPC.java:216)
    at net.tomp2p.p2p.builder.DiscoverBuilder.discover(DiscoverBuilder.java:251)
    at net.tomp2p.p2p.builder.DiscoverBuilder.access$000(DiscoverBuilder.java:45)
    at net.tomp2p.p2p.builder.DiscoverBuilder$1.operationComplete(DiscoverBuilder.java:203)
    at net.tomp2p.p2p.builder.DiscoverBuilder$1.operationComplete(DiscoverBuilder.java:199)
    at net.tomp2p.futures.BaseFutureImpl.callOperationComplete(BaseFutureImpl.java:345)
    at net.tomp2p.futures.BaseFutureImpl.addListener(BaseFutureImpl.java:331)
    at net.tomp2p.p2p.builder.DiscoverBuilder.discover(DiscoverBuilder.java:199)
    at net.tomp2p.p2p.builder.DiscoverBuilder.start(DiscoverBuilder.java:183)
    at net.tomp2p.examples.ExampleDNS.<init>(ExampleDNS.java:42)
    at net.tomp2p.examples.ExampleDNS.main(ExampleDNS.java:47)
15 Oct 2015 04:18:30,756 [] DEBUG Sender - peer failed: msgid=1514881631,t=REQUEST_2,c=PING,tcp,s=paddr[0xbb1ad57319b89cd868fb0e6f684df992352cccfc/10.6.0.29,4001,],r=paddr[0xbb1ad57319b89cd868fb0e6f684df992352cccfc/127.0.0.1,4001,], future response state:,type:FAILED,msg:0,reason:Failed with type EXCEPTION. Reason: java.lang.NullPointerException
15 Oct 2015 04:18:30,756 [] DEBUG PeerMap - Peer paddr[0xbb1ad57319b89cd868fb0e6f684df992352cccfc/127.0.0.1,4001,] is offline with reason PeerException (PEER_ERROR): Future (compl/canc):true/, FAILED, Failed with type EXCEPTION. Reason: java.lang.NullPointerException.
tbocek commented 8 years ago

thanks for reporting, fixed