bnb-chain / bsc

A BNB Smart Chain client based on the go-ethereum fork
GNU Lesser General Public License v3.0
2.75k stars 1.57k forks source link

find no peer after restart #2763

Open BomaxChen opened 1 week ago

BomaxChen commented 1 week ago

Our bsc fullnode encountered a 'Bsc extension Handshake failed' issue. After restarting the node, we are unable to find any peers. How can we resolve this?

geth command

/geth --config /etc/bsc/config.toml \
                --datadir /var/lib/bsc-data  --cache 8192 \
                --rpc.allow-unprotected-txs --history.transactions 0 \
                --rpc.batch-request-limit 2000 \
                --pprof.addr 0.0.0.0 --metrics --pprof \
                --syncmode snap \
        --db.engine pebble

config.toml


[Eth]
NetworkId = 56
NoPruning = false
NoPrefetch = false
LightPeers = 100
TrieTimeout = 100000000000
EnablePreimageRecording = false
EWASMInterpreter = ""
EVMInterpreter = ""
DisablePeerTxBroadcast = true
DatabaseCache = 512
TrieCleanCache = 256
TrieDirtyCache = 256

[Eth.Miner]
GasFloor = 30000000
GasCeil = 40000000
GasPrice = 1000000000
Recommit = 10000000000

[Eth.TxPool]
Locals = []
NoLocals = true
Journal = "transactions.rlp"
Rejournal = 3600000000000
PriceLimit = 1000000000
PriceBump = 10
AccountSlots = 512
GlobalSlots = 10000
AccountQueue = 256
GlobalQueue = 5000
Lifetime = 10800000000000

[Eth.GPO]
Blocks = 20
Percentile = 60
OracleThreshold = 20

[Node]
IPCPath = "geth.ipc"
HTTPHost = "192.168.205.125"
NoUSB = true
InsecureUnlockAllowed = false
HTTPPort = 8545
HTTPVirtualHosts = ["bsc02"]
HTTPModules = ["eth", "net", "web3", "txpool", "parlia", "admin"]
WSPort = 8546
WSModules = ["net", "web3", "eth"]

[Node.P2P]
MaxPeers = 130
NoDiscovery = false
BootstrapNodes = ["enode://1cc4534b14cfe351ab740a1418ab944a234ca2f702915eadb7e558a02010cb7c5a8c295a3b56bcefa7701c07752acd5539cb13df2aab8ae2d98934d712611443@52.71.43.172:30311","enode://28b1d16562dac280dacaaf45d54516b85bc6c994252a9825c5cc4e080d3e53446d05f63ba495ea7d44d6c316b54cd92b245c5c328c37da24605c4a93a0d099c4@34.246.65.14:30311","enode://5a7b996048d1b0a07683a949662c87c09b55247ce774aeee10bb886892e586e3c604564393292e38ef43c023ee9981e1f8b335766ec4f0f256e57f8640b079d5@35.73.137.11:30311"]
StaticNodes = ["enode://9e424a47df101e48ee5659e14b98d1130988a27ec37809e48fbf87768446cebd043976dcf296c69ed2afe9e4e96f62906d17386a4a46d070fc39a17a8a5e9e60@34.246.200.12:30311","enode://67ec1f3df346e0aef401175119172e86a20e7ee1442cba4a2074519405cdae3708be3fdcb5e139094408b5d6f6c8e85f89ebb77d04833f7aa251c91344dbd4c9@3.249.178.199:30311","enode://d69853daf3057cc191514afdf56df4769238fde4f261fab80c6e089480abb9916d61180e783d1cc9e5ae56d30ce6261d9954702dc73c41cd47e4b3961830b2dc@184.73.34.17:30311","enode://8428650e034341479d0ca3142bcd412f400ba47454bb7caeb88cfeb9bb60c21e45153eddf3e334d5d94ae67609ec2ac44816b346a2b3216d94a7c095883141e3@54.195.188.155:30311","enode://c307b4cddec0aea2188eafddedb0a076b9289402c63217b4c81eb7f34761c7cfaf6b075e93d7357169e226ff1bb4aa3bd71869b4c76cf261e2991005ddb4d4aa@3.81.81.182:30311","enode://c434798805586c72c30925c2fcd02783607be0f1a56e10b5b68d9222a401c95c32c188f264fd6cc63e379b82c8b3145ebcb86309ba783442a8d064e42c112f58@44.200.158.193:30311","enode://71ef36f019bbdaa2a7b4676a61d014d0be81958e2c60dd95c66a5e1af10de6f3a62ecf9ad0c26b6c5789b81ac22f774abb4735cd9e259185773ebfd1efded5de@54.170.254.50:30311","enode://760b5fde9bc14155fa2a87e56cf610701ad6c1adcf44555a7b839baf71f86f11cdadcaf925e50b17c98cc28e20e0df3c3463caad7c6658a76ab68389af639f33@34.243.1.225:30311","enode://93a47b4de28dfd716a3de5481a72916f326b7c31c137d72ac12950c61ec3ee143312d903dbfab916ac0d7a92fedad6fc6f646c16ea009ca893089c9c2f64ec83@18.204.55.80:30311","enode://fe0bb07eae29e8cfaa5bb15b0db8c386a45b7da2c94e1dabd7ca58b6327eee0c27bdcea4f08db19ea07b9a1391e5496a28c675c6eee578154edae4fa44640c5d@54.228.2.74:30311","enode://16da0f1ddce62361822ae97e77a17cced5f3566cb96d741adf7da809cd796e5a1e9ceeba6dba512f4beebc6796a3dfbd853c139bdc1837509bc2231aa0fc65ef@44.196.47.109:30311","enode://62c516645635f0389b4c851bfc4545720fac0607de74942e4ea7e923f4fa2ac0c438c146e2f0721c8ce06dca4e7f30f5c0136569d9f4b6a827c62b980fd53272@52.215.57.20:30311","enode://7f1041a439f0ecdb9b9c0625e1b84bf097331e0f5017dad9429de5fb239f6a171f80237e294974940810adbbd6c70d338130eac6be5d34bf3c2d9076aede677f@34.243.44.86:30311","enode://41d57b0f00d83016e1bb4eccff0f3034aa49345301b7be96c6bb23a0a852b9b87b9ed11827c188ad409019fb0e578917d722f318665f198340b8a15ae8beff36@34.252.87.229:30311"]
ListenAddr = ":30311"
EnableMsgEvents = false

[Node.HTTPTimeouts]
ReadTimeout = 30000000000
WriteTimeout = 30000000000
IdleTimeout = 120000000000

[Node.LogConfig]
FilePath = "bsc.log"
MaxBytesSize = 10485760
Level = "info"
FileRoot = "/var/lib/bsc-data/logs"
zzzckck commented 5 days ago

Although 'Bsc extension Handshake failed' is en error log, it only indicates the remote peers is not BSC compatible and will it be rejected. It is common log, It should not block finding other good BSC peers. Could you try update your nodeid by:

# replace <datadir> with your local data directory.
mv <datadir>/geth/nodekey mv <datadir>/geth/nodekey.bak
# restart your node, it will generate a new nodeid

See if it can help