Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Connect to Any Peer #3514

Closed
areebmajeed opened this issue Nov 19, 2020 · 4 comments
Closed

Can't Connect to Any Peer #3514

areebmajeed opened this issue Nov 19, 2020 · 4 comments

Comments

@areebmajeed
Copy link

1. What did you do?

Used the compiled JAR file and then downloaded a backup from Trongrid to sync faster.

2. What did you expect to see?

Expected for the node to find peers and sync.

3. What did you see instead?

It is unable to find any peers and the error logs show some errors.

`

05:20:46.059 INFO [pool-1-thread-1] net connect peer 195.201.83.170 18888 9983aff733de7ccf5a2cf65afd74052099b1a0103273d2e22efd342f77e9c5345c2093545afb399b7af6c6ab6047d7b0d0966a8737f3b131e28165e8b7a62941
05:20:46.062 INFO [pool-1-thread-1] net connect peer 188.116.36.9 18888 a85e4bcfb0e20c39b4c2e2a6d0a25855012f945ec96ddbb322a46f5ecd820d709bf9ff122deca291d0487948e4d0c85f6cbd8beb6b17e7160465fb4d72b6b475
05:20:46.064 INFO [pool-1-thread-1] net connect peer 47.254.150.38 18888 76f69c560046e74399f8807a4bb75d3d14ca04643a615ea46972ec80c74895e7e80099ebaa73ded5f14e93a908142107213d28bb5a5fd55a0b745d8510b01a7c
05:20:46.065 INFO [pool-1-thread-1] net connect peer 8.211.60.253 18888 19074584f41fe6cd162b0f41f105243b9548682181fd675b7b2b626d05f26d4a24a1da247faa41ae0624ee169cb941c7aab52073f785b06c860bef877228df22
05:20:46.066 INFO [pool-1-thread-1] net connect peer 54.36.114.4 18888 b0d15bc7a1a5b0e41f26dfb50a1a50462a2a358204c345d73bcf4a2fba4293154a680472ff3da9530e57588cd589409b3915b01b12057186bc2d9d748b552d41
05:20:46.071 INFO [pool-1-thread-1] net connect peer 176.9.36.4 18888 a5b313b015e1a3d9e8b4df0da020b5b77d637a31cabc5a3cdcb6e94caacd2fb06375869dc6ef4b1c0df0d476001e6f4516ca8afc2df45c29718d66db951f2115
05:20:46.079 INFO [pool-1-thread-1] net connect peer 62.171.175.19 18888 f49c94a327b902e324148197d5e1ed8f7965af676b7ee464c2d938799fdd1f3a8eb6976d691c8b18ad14b379cef024da8fb7569f85fa9328e60a60859ff68d68
05:20:46.095 INFO [pool-1-thread-1] net connect peer 84.239.4.56 18888 74b9a64e5d2e8a18f4b38b922fd9531d78a01e6c985b8b40584911804b6a08ea0bc51a9a6f1265abc92b77ddad9e0fd1a2422df085507049e3b8fcaff45edb49
05:20:46.114 INFO [TronJClientWorker-0] net channel active, /195.201.83.170:18888
05:20:46.124 ERROR [TronJClientWorker-0] net Close peer /195.201.83.170:18888, exception caught
java.lang.NullPointerException: null
at org.tron.core.ChainBaseManager.getGenesisBlockId(ChainBaseManager.java:349)
at org.tron.common.overlay.server.HandshakeHandler.sendHelloMsg(HandshakeHandler.java:123)
at org.tron.common.overlay.server.HandshakeHandler.channelActive(HandshakeHandler.java:81)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:213)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:199)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:192)
at io.netty.channel.ChannelInboundHandlerAdapter.channelActive(ChannelInboundHandlerAdapter.java:64)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:213)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:199)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:192)
at io.netty.channel.ChannelInboundHandlerAdapter.channelActive(ChannelInboundHandlerAdapter.java:64)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:213)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:199)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:192)
at io.netty.channel.ChannelInboundHandlerAdapter.channelActive(ChannelInboundHandlerAdapter.java:64)
at io.netty.handler.timeout.IdleStateHandler.channelActive(IdleStateHandler.java:271)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:213)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:199)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:192)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelActive(DefaultChannelPipeline.java:1422)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:213)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:199)
at io.netty.channel.DefaultChannelPipeline.fireChannelActive(DefaultChannelPipeline.java:941)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:311)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:341)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:634)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:546)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:500)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
at java.base/java.lang.Thread.run(Thread.java:834)`

It looks like my node is unable to connect to any peer.

@areebmajeed
Copy link
Author

05:36:08.892 INFO [pool-1-thread-1] [net](PeerClient.java:70) connect peer 47.90.247.55 18888 b8ce5bd82261ed9cf921a675b945b6ed810d0924124d1918ab7e14ed38c92b486a612d7e420345c7f65eb8c7b282041de90431588b1f9be86ad9ab02a74a4431 05:36:08.988 INFO [TronJClientWorker-17] [net](HandshakeHandler.java:77) channel active, /47.90.247.55:18888 05:36:08.989 ERROR [TronJClientWorker-17] [net](Channel.java:150) Close peer /47.90.247.55:18888, exception caught java.lang.NullPointerException: null at org.tron.core.ChainBaseManager.getGenesisBlockId(ChainBaseManager.java:349) at org.tron.common.overlay.server.HandshakeHandler.sendHelloMsg(HandshakeHandler.java:123) at org.tron.common.overlay.server.HandshakeHandler.channelActive(HandshakeHandler.java:81) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:213) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:199) at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:192) at io.netty.channel.ChannelInboundHandlerAdapter.channelActive(ChannelInboundHandlerAdapter.java:64) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:213) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:199) at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:192) at io.netty.channel.ChannelInboundHandlerAdapter.channelActive(ChannelInboundHandlerAdapter.java:64) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:213) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:199) at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:192) at io.netty.channel.ChannelInboundHandlerAdapter.channelActive(ChannelInboundHandlerAdapter.java:64) at io.netty.handler.timeout.IdleStateHandler.channelActive(IdleStateHandler.java:271) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:213) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:199) at io.netty.channel.AbstractChannelHandlerContext.fireChannelActive(AbstractChannelHandlerContext.java:192) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelActive(DefaultChannelPipeline.java:1422) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:213) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelActive(AbstractChannelHandlerContext.java:199) at io.netty.channel.DefaultChannelPipeline.fireChannelActive(DefaultChannelPipeline.java:941) at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:311) at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:341) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:634) at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:546) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:500) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) at java.base/java.lang.Thread.run(Thread.java:834) 05:36:08.989 INFO [TronJClientWorker-17] [net](TronChannelInitializer.java:48) Close channel:/47.90.247.55:18888 | b8ce5bd82261ed9cf921a675b945b6ed810d0924124d1918ab7e14ed38c92b486a612d7e420345c7f65eb8c7b282041de90431588b1f9be86ad9ab02a74a4431

@areebmajeed
Copy link
Author

Even without any fast sync. backups, it shows the same errors.

@areebmajeed
Copy link
Author

And, some more errors.

`06:14:45.273 INFO [nioEventLoopGroup-6-1] net channel active, /47.52.157.251:52752
06:14:45.428 INFO [nioEventLoopGroup-6-1] net Handshake receive from /47.52.157.251:52752, type: P2P_HELLO
from {
address: "47.52.157.251"
port: 18888
nodeId: "\301\205\336\026\377\b<\325rZ\315\313\205Jj\204^\327\a,\003\206_\305O\b}V\036\006q.V\317\200\316\201:#\372\2779e \002\237\200b\336\353\033\230l\271\301\2603<\355\001\352Ozc"
}
version: 11111
timestamp: 1605762885086
genesisBlockId {
hash: "\000\000\000\000\000\000\000\000\036\277\210P\212\003\206\q\324R\342_MQ\031A\226\241\322+fS\334"
}
solidBlockId {
hash: "\000\000\000\000\001T\016\346T\313\324[5\226s\t\031s\352\370Y\325\270pa_\354\263\341\021\277\301"
number: 22286054
}
headBlockId {
hash: "\000\000\000\000\001T\016\374\032\304\362c\315\367\335c\001p2'\002\037\020\237\\252\021\025\260\311\253\214"
number: 22286076
}

06:14:45.535 ERROR [nioEventLoopGroup-6-1] net Close peer /47.52.157.251:52752, exception caught
io.netty.handler.codec.DecoderException: java.lang.NullPointerException
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:459)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at org.tron.common.overlay.server.WireTrafficStats$TrafficStatHandler.channelRead(WireTrafficStats.java:80)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:646)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:546)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:500)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NullPointerException: null
at org.tron.core.ChainBaseManager.getGenesisBlockId(ChainBaseManager.java:349)
at org.tron.common.overlay.server.HandshakeHandler.handleHelloMsg(HandshakeHandler.java:159)
at org.tron.common.overlay.server.HandshakeHandler.decode(HandshakeHandler.java:96)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
... 30 common frames omitted
06:14:45.537 INFO [nioEventLoopGroup-6-1] net Close channel:/47.52.157.251:52752 | c185de16ff083cd5725acdcb854a6a845ed7072c03865fc54f087d561e06712e56cf80ce813a23fabf396520029f8062deeb1b986cb9c1b0333ced01ea4f7a63
06:14:46.113 INFO [qtp1911860918-34] DB headNumber:25111164
06:14:46.115 INFO [qtp1911860918-34] DB syncBeginNumber:25111164
06:14:46.116 INFO [qtp1911860918-34] DB solidBlockNumber:25111146
06:14:46.838 INFO [nioEventLoopGroup-6-2] net channel active, /211.72.175.250:33756
06:14:46.978 INFO [nioEventLoopGroup-6-2] net Handshake receive from /211.72.175.250:33756, type: P2P_HELLO
from {
address: "211.72.175.250"
port: 18888
nodeId: "-\231u\236\P\033h\005=\230\205\367\031\315r.\030\211\207\244e^\177\022I\332\004\004\310G\263N\360\354\331\2174\266^\244u}\354XnU\331gs\331\371\352\334\v\3015P\213i\v\223\201\301"
}
version: 11111
timestamp: 1605762886678
genesisBlockId {
hash: "\000\000\000\000\000\000\000\000\036\277\210P\212\003\206\q\324R\342_MQ\031A\226\241\322+fS\334"
}
solidBlockId {
hash: "\000\000\000\000\001~\336\276\327\232\346\266b\034\312\370]b\370_\310W&\316\330\266\345Y\257\243fI"
number: 25091774
}
headBlockId {
hash: "\000\000\000\000\001~\336\320\361\0320@\000\263\341\3377n=\347hfa\254\2633Q\n,K\222\342"
number: 25091792
}

06:14:46.980 ERROR [nioEventLoopGroup-6-2] net Close peer /211.72.175.250:33756, exception caught
io.netty.handler.codec.DecoderException: java.lang.NullPointerException
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:459)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at org.tron.common.overlay.server.WireTrafficStats$TrafficStatHandler.channelRead(WireTrafficStats.java:80)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:646)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:546)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:500)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NullPointerException: null
at org.tron.core.ChainBaseManager.getGenesisBlockId(ChainBaseManager.java:349)
at org.tron.common.overlay.server.HandshakeHandler.handleHelloMsg(HandshakeHandler.java:159)
at org.tron.common.overlay.server.HandshakeHandler.decode(HandshakeHandler.java:96)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
... 30 common frames omitted`

@areebmajeed
Copy link
Author

Fixed! I was using the wrong JDK version. Please note that you need to use JDK 1.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant