首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >盖斯跑得很好,但突然卡住了,不知道原因

盖斯跑得很好,但突然卡住了,不知道原因
EN

Ethereum用户
提问于 2021-07-09 06:12:49
回答 1查看 2K关注 0票数 2

我在看我的Macbook。我的版本是这样的。

代码语言:javascript
复制
Geth
Version: 1.10.3-stable
Architecture: amd64
Go Version: go1.16.3
Operating System: darwin

它完成同步和运行良好的接收块。它运行得很好,几乎两个月。但它现在卡住了,我不知道它为什么突然被塞起来了。我在命令下跑了林克比。

代码语言:javascript
复制
geth --rinkeby --http --http.addr 0.0.0.0 --http.api eth,net,web3,personal,txpool,admin --ws --ws.addr 0.0.0.0 --ws.origins="*" --ws.api personal,admin,eth,net,web3,txpool,debug --allow-insecure-unlock --syncmode fast --cache 2048 --maxpeers 100 2>> ./logs/geth.log

我的日志如下所示。

代码语言:javascript
复制
INFO [07-08|10:27:18.158] Imported new chain segment               blocks=1     txs=13   mgas=0.874   elapsed=15.973ms    mgasps=54.718   number=8,897,987 hash=d2df74..48ba4e dirty=496.76MiB
INFO [07-08|10:27:18.160] Unindexed transactions                   blocks=1     txs=6    tail=6,547,988 elapsed=2.467ms
INFO [07-08|10:27:21.284] Looking for peers                        peercount=1 tried=5  static=1
INFO [07-08|10:27:31.286] Looking for peers                        peercount=1 tried=5  static=1
INFO [07-08|10:27:41.286] Looking for peers                        peercount=0 tried=8  static=1
INFO [07-08|10:27:51.287] Looking for peers                        peercount=1 tried=5  static=1
INFO [07-08|10:27:55.181] Deep froze chain segment                 blocks=2     elapsed=133.622ms   number=8,807,987 hash=23cfa7..830fa8
INFO [07-08|10:28:01.288] Looking for peers                        peercount=1 tried=7  static=1
INFO [07-08|10:28:11.288] Looking for peers                        peercount=1 tried=7  static=1
INFO [07-08|10:28:21.289] Looking for peers                        peercount=1 tried=6  static=1
INFO [07-08|10:28:31.292] Looking for peers                        peercount=1 tried=6  static=1
INFO [07-08|10:28:41.293] Looking for peers                        peercount=1 tried=5  static=1
INFO [07-08|10:28:51.294] Looking for peers                        peercount=2 tried=8  static=1
INFO [07-08|10:29:01.295] Looking for peers                        peercount=2 tried=4  static=1
INFO [07-08|10:29:11.294] Looking for peers                        peercount=2 tried=6  static=1
INFO [07-08|10:29:21.296] Looking for peers                        peercount=2 tried=6  static=1
INFO [07-08|10:29:31.296] Looking for peers                        peercount=2 tried=6  static=1
INFO [07-08|10:29:41.302] Looking for peers                        peercount=2 tried=5  static=1
INFO [07-08|10:29:51.304] Looking for peers                        peercount=2 tried=6  static=1
INFO [07-08|10:30:01.307] Looking for peers                        peercount=2 tried=7  static=1
INFO [07-08|10:30:11.309] Looking for peers                        peercount=2 tried=5  static=1
INFO [07-08|10:30:21.311] Looking for peers                        peercount=2 tried=6  static=1
INFO [07-08|10:30:31.311] Looking for peers                        peercount=2 tried=5  static=1
INFO [07-08|10:30:41.311] Looking for peers                        peercount=2 tried=6  static=1
INFO [07-08|10:30:51.313] Looking for peers                        peercount=2 tried=8  static=1
INFO [07-08|10:31:01.314] Looking for peers                        peercount=2 tried=6  static=1
INFO [07-08|11:13:29.673] Writing clean trie cache to disk         path=/Users/user/Library/Ethereum/rinkeby/geth/triecache threads=1
INFO [07-08|11:13:29.675] Regenerated local transaction journal    transactions=0 accounts=0
INFO [07-08|11:13:32.926] Persisted the clean trie cache           path=/Users/user/Library/Ethereum/rinkeby/geth/triecache elapsed=3.251s
INFO [07-08|12:13:29.760] Writing clean trie cache to disk         path=/Users/user/Library/Ethereum/rinkeby/geth/triecache threads=1
INFO [07-08|12:13:29.763] Regenerated local transaction journal    transactions=0 accounts=0
INFO [07-08|12:13:32.399] Persisted the clean trie cache           path=/Users/user/Library/Ethereum/rinkeby/geth/triecache elapsed=2.635s
INFO [07-08|13:13:29.731] Writing clean trie cache to disk         path=/Users/user/Library/Ethereum/rinkeby/geth/triecache threads=1
INFO [07-08|13:13:29.735] Regenerated local transaction journal    transactions=0 accounts=0
INFO [07-08|13:13:31.269] Persisted the clean trie cache           path=/Users/user/Library/Ethereum/rinkeby/geth/triecache elapsed=1.538s
INFO [07-08|14:13:29.835] Writing clean trie cache to disk         path=/Users/user/Library/Ethereum/rinkeby/geth/triecache threads=1
INFO [07-08|14:13:29.853] Regenerated local transaction journal    transactions=0 accounts=0
INFO [07-08|14:13:33.823] Persisted the clean trie cache           path=/Users/user/Library/Ethereum/rinkeby/geth/triecache elapsed=3.980s
INFO [07-08|15:13:29.795] Writing clean trie cache to disk         path=/Users/user/Library/Ethereum/rinkeby/geth/triecache threads=1
INFO [07-08|15:13:29.799] Regenerated local transaction journal    transactions=0 accounts=0
INFO [07-08|15:13:32.508] Persisted the clean trie cache           path=/Users/user/Library/Ethereum/rinkeby/geth/triecache elapsed=2.712s
INFO [07-08|16:13:29.927] Writing clean trie cache to disk         path=/Users/user/Library/Ethereum/rinkeby/geth/triecache threads=1
INFO [07-08|16:13:29.928] Regenerated local transaction journal    transactions=0 accounts=0
INFO [07-08|16:13:32.662] Persisted the clean trie cache           path=/Users/user/Library/Ethereum/rinkeby/geth/triecache elapsed=2.734s

正如日志所述,它运行良好,但突然停止接收来自其他对等方的块,并继续使用Looking for peers。然后,接下来的三条原木在重复。

代码语言:javascript
复制
INFO [07-08|11:13:29.673] Writing clean trie cache to disk         path=/Users/user/Library/Ethereum/rinkeby/geth/triecache threads=1
INFO [07-08|11:13:29.675] Regenerated local transaction journal    transactions=0 accounts=0
INFO [07-08|11:13:32.926] Persisted the clean trie cache           path=/Users/user/Library/Ethereum/rinkeby/geth/triecache elapsed=3.251s

所以我试着重新启动盖斯。(我刚刚终止了这个过程,并输入了geth命令,如下所示。)但是,它没有再次同步或接收块。日志只显示永久的Looking for peers。该节点已经有对等节点,但没有同步。日志如下所示。

代码语言:javascript
复制
...
INFO [07-08|16:38:37.212] IPC endpoint opened                      url=/Users/user/Library/Ethereum/rinkeby/geth.ipc
INFO [07-08|16:38:37.213] HTTP server started                      endpoint=[::]:8545 prefix= cors= vhosts=localhost
INFO [07-08|16:38:37.213] WebSocket enabled                        url=ws://[::]:8546
INFO [07-08|16:38:48.095] New local node record                    seq=287 id=9f26334289445bf1 ip=<my ipaddress> udp=30303 tcp=30303
INFO [07-08|16:38:48.216] Looking for peers                        peercount=0 tried=34 static=0
INFO [07-08|16:38:58.218] Looking for peers                        peercount=0 tried=30 static=0
INFO [07-08|16:39:08.286] Looking for peers                        peercount=0 tried=35 static=0
INFO [07-08|16:39:18.546] Looking for peers                        peercount=1 tried=27 static=0
INFO [07-08|16:39:28.552] Looking for peers                        peercount=1 tried=36 static=1
INFO [07-08|16:39:38.557] Looking for peers                        peercount=1 tried=33 static=1
INFO [07-08|16:39:48.879] Looking for peers                        peercount=1 tried=25 static=1
INFO [07-08|16:39:59.144] Looking for peers                        peercount=1 tried=33 static=1
INFO [07-08|16:40:09.211] Looking for peers                        peercount=1 tried=35 static=1
INFO [07-08|16:40:19.214] Looking for peers                        peercount=1 tried=31 static=1
INFO [07-08|16:40:29.531] Looking for peers                        peercount=1 tried=22 static=1
INFO [07-08|16:40:39.547] Looking for peers                        peercount=1 tried=33 static=1
INFO [07-08|16:40:49.878] Looking for peers                        peercount=1 tried=27 static=1
INFO [07-08|16:41:00.212] Looking for peers                        peercount=1 tried=37 static=1
INFO [07-08|16:41:10.215] Looking for peers                        peercount=1 tried=25 static=1
INFO [07-08|16:41:20.216] Looking for peers                        peercount=1 tried=20 static=1
...

这是我的问题。

  1. 为什么格特突然被绊倒了?
  2. 为什么盖斯在重新启动之后就不工作了?
  3. 有办法优雅地重新启动盖斯吗?我刚刚终止了进程,用我使用的命令再次启动了Geth,但是在重新启动Geth时,我总是必须删除leveldb。

谢谢。

更新

我用verbosity 4 (调试模式)重新启动了Geth,并在INFO Looking for peers日志之间附加了日志。调试日志如下所示。

代码语言:javascript
复制
...
DEBUG[07-15|09:48:23.173] Revalidated node                         b=4  id=9f2cb42ade264eea checks=1
DEBUG[07-15|09:48:23.178] Adding p2p peer                          peercount=3 id=8391c2401d336e64 conn=dyndial    addr=112.194.96.138:8502   name=OpenEthereum/v3.2.6-...
DEBUG[07-15|09:48:23.306] Ethereum handshake failed                id=7b3f212e39a05d39 conn=dyndial    err="fork ID rejected: remote needs update"
DEBUG[07-15|09:48:23.306] Removing p2p peer                        peercount=2 id=7b3f212e39a05d39 duration=147.554ms   req=true  err="subprotocol error"
DEBUG[07-15|09:48:23.335] Adding p2p peer                          peercount=3 id=84e07faffaf52840 conn=dyndial    addr=52.169.42.101:30303   name=Geth/v1.10.5-unstabl...
DEBUG[07-15|09:48:23.563] Ethereum handshake failed                id=84e07faffaf52840 conn=dyndial    err=EOF
DEBUG[07-15|09:48:23.563] Message handling failed in `snap`        peer=84e07faf err=EOF
DEBUG[07-15|09:48:23.563] Removing p2p peer                        peercount=2 id=84e07faffaf52840 duration=227.601ms   req=true  err="subprotocol error"
DEBUG[07-15|09:48:23.827] Recalculated downloader QoS values       rtt=20s confidence=1.000 ttl=1m0s
DEBUG[07-15|09:48:24.441] Adding p2p peer                          peercount=3 id=8ecc16f9400d6fc4 conn=dyndial    addr=63.34.52.202:33333    name=Geth/v1.9.24-stable-...
DEBUG[07-15|09:48:24.720] Ethereum handshake failed                id=8ecc16f9400d6fc4 conn=dyndial    err="network ID mismatch: 219913 (!= 4)"
DEBUG[07-15|09:48:24.721] Removing p2p peer                        peercount=2 id=8ecc16f9400d6fc4 duration=280.038ms   req=false err="network ID mismatch: 219913 (!= 4)"
DEBUG[07-15|09:48:25.729] Revalidated node                         b=7  id=9f4e2c6ea7153f79 checks=1
DEBUG[07-15|09:48:25.764] Adding p2p peer                          peercount=3 id=0e10a37bbbc33e44 conn=dyndial    addr=15.236.32.166:30303   name=Geth/v1.10.5-unstabl...
DEBUG[07-15|09:48:26.039] Ethereum handshake failed                id=0e10a37bbbc33e44 conn=dyndial    err="fork ID rejected: local incompatible or needs update"
DEBUG[07-15|09:48:26.039] Message handling failed in `snap`        peer=0e10a37b err=EOF
DEBUG[07-15|09:48:26.039] Removing p2p peer                        peercount=2 id=0e10a37bbbc33e44 duration=275.341ms   req=true  err="subprotocol error"
DEBUG[07-15|09:48:26.612] Adding p2p peer                          peercount=3 id=8ec7352b8985509b conn=dyndial    addr=159.65.254.146:30303  name=bor/v1.10.1-stable-1...
DEBUG[07-15|09:48:26.811] Ethereum handshake failed                id=8ec7352b8985509b conn=dyndial    err="network ID mismatch: 137 (!= 4)"
DEBUG[07-15|09:48:26.811] Removing p2p peer                        peercount=2 id=8ec7352b8985509b duration=198.985ms   req=false err="network ID mismatch: 137 (!= 4)"
DEBUG[07-15|09:48:27.843] Adding p2p peer                          peercount=3 id=8ec75fa18296fa0c conn=dyndial    addr=104.209.34.240:30306  name=Geth/validator4/v1.9...
DEBUG[07-15|09:48:27.975] Ethereum handshake failed                id=8ec75fa18296fa0c conn=dyndial    err="network ID mismatch: 1337 (!= 4)"
DEBUG[07-15|09:48:27.975] Removing p2p peer                        peercount=2 id=8ec75fa18296fa0c duration=132.793ms   req=false err="network ID mismatch: 1337 (!= 4)"
DEBUG[07-15|09:48:28.179] Ethereum handshake failed                id=8391c2401d336e64 conn=dyndial    err="read timeout"
DEBUG[07-15|09:48:28.179] Removing p2p peer                        peercount=1 id=8391c2401d336e64 duration=5.000s      req=false err="read timeout"
DEBUG[07-15|09:48:31.793] Adding p2p peer                          peercount=2 id=8ed611401e2afc34 conn=dyndial    addr=34.195.70.235:30303   name=besu/v21.1.7/linux-x...
DEBUG[07-15|09:48:31.793] Ethereum handshake failed                id=8ed611401e2afc34 conn=dyndial    err="network ID mismatch: 11297108109 (!= 4)"
DEBUG[07-15|09:48:31.793] Removing p2p peer                        peercount=1 id=8ed611401e2afc34 duration="406.245µs" req=false err="network ID mismatch: 11297108109 (!= 4)"
...

日志上写着Ethereum handshake failed。我怎样才能解决这个问题?第一次同步之后,盖斯总是要打开吗?为什么重启Geth会破坏Ethereum handshake

EN

回答 1

Ethereum用户

回答已采纳

发布于 2021-07-15 02:49:50

我发现是什么原因导致了我的案子。我在使用Geth版本的1.10.3-stable。所以我在围城的github页面寻找新的版本,如果新版本像这样解决问题的话。有两个新的稳定版本。1.10.4-stable版本说

Geth v1.10.4是一个特性发布版,它增加了与即将推出的伦敦硬分叉的兼容性。

因此,在1.10.3-stable版本发布后,出现了一个硬叉子。在关于伦敦变化部分的附加注释中,它说。

此版本包含伦敦硬分叉的testnet激活块号。数字是: Ropsten - 10499401,Goerli - 5062605,Rinkeby - 8897988。(#23041)

所以我查看了我的调试日志。在一些调试日志中,我找到了这个日志。

代码语言:javascript
复制
DEBUG[07-15|10:49:42.932] Ancient blocks frozen already            number=8,897,987 hash=d2df74..48ba4e frozen=8,807,988

看起来我的Geth节点被卡住了,因为它到达了硬叉之前的最后一个街区。于是我将Geth更新为1.10.5-stable,并重新启动了Geth。现在Geth正在进口新的区块。

结论

我的案子是因为叉子硬。当我将Geth升级到新发布的版本时,现在它正在接收在硬叉子之后创建的块。

票数 2
EN
页面原文内容由Ethereum提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://ethereum.stackexchange.com/questions/103219

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档