一文钱难倒英雄汉之【eos节点报错】

in #eos6 years ago

在工作中我们经常会碰到一些小问题,这些小问题在解决后来看都很简单容易,但是如果不知道解决方案可能得花费一天甚至几天的时间,解决过程经常让人抓狂,试图借“一文钱难倒英雄汉”这个标题来记录下这些问题和解决方案。

文章尽量短小精悍,不求甚解,看了能解决就好。

EOS节点同步数据报错

mac下多次同步数据报错,如下:

2410236ms thread-0   producer_plugin.cpp:290       on_incoming_block    ] Received block 9dfc5ac53a9e3ea1... #4422000 @ 2018-07-06T06:39:38.000 signed by eosnewyorkio [trxs: 17, lib: 4421671, conf: 0, latency: 507632236 ms]
2415526ms thread-0   net_plugin.cpp:1970           connect              ] host: 54.38.250.15 port: 19878 
2415526ms thread-0   net_plugin.cpp:1970           connect              ] host: mainnet.eospay.host port: 19876 
2415526ms thread-0   net_plugin.cpp:1970           connect              ] host: node.eosflare.io port: 1883 
2415526ms thread-0   net_plugin.cpp:1970           connect              ] host: eos.staked.us port: 9870 
2416526ms thread-0   net_plugin.cpp:2190           operator()           ] Peer mainnet.eospay.host:19876 closed connection
2416526ms thread-0   net_plugin.cpp:2190           operator()           ] Peer node.eosflare.io:1883 closed connection
2416771ms thread-0   net_plugin.cpp:2190           operator()           ] Peer 54.38.250.15:19878 closed connection
2440839ms thread-0   net_plugin.cpp:2190           operator()           ] Peer eos.staked.us:9870 closed connection
2445725ms thread-0   net_plugin.cpp:1970           connect              ] host: 54.38.250.15 port: 19878 
2445725ms thread-0   net_plugin.cpp:1970           connect              ] host: mainnet.eospay.host port: 19876 
2445725ms thread-0   net_plugin.cpp:1970           connect              ] host: node.eosflare.io port: 1883 
2445725ms thread-0   net_plugin.cpp:1970           connect              ] host: eos.staked.us port: 9870 
2446514ms thread-0   net_plugin.cpp:2190           operator()           ] Peer mainnet.eospay.host:19876 closed connection
2446774ms thread-0   net_plugin.cpp:2190           operator()           ] Peer node.eosflare.io:1883 closed connection
2447030ms thread-0   net_plugin.cpp:2190           operator()           ] Peer 54.38.250.15:19878 closed connection
libc++abi.dylib: terminating with uncaught exception of type boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::logic_error> >: Could not restore object, most likely a uniqueness constraint was violated
Abort trap: 6

EOS比较恶心的就是同步数据出错,再启动就告诉你要“replay”,但是“replay”也报错,只能“hard-reply”,400多万个块重新跑一遍这时间又一天两天的...

后来想到一个办法就是,同步几十万个区块就“正常中断”程序,把数据目录拷贝一份,下次再出错时把备份文件恢复过去,这样至少不要全部重来。

解决方案

此方案由oflyhigh提供,对此情况确定有效,感谢!

修改config.ini中参数“chain-state-db-size-mb”,缺省是1024,改为4096,至少440万块这个坑是过去了!

Sort:  

400多万个块重新跑一遍这时间又一天两天的... 太坑了。

都跑两遍了,后来实在没法过一阵备下份

你好吗?新人吗?《steemit指南》拿一份吧,以免迷路; 另外一定要去 @team-cn 的新手村看看,超级热闹的大家庭。如果不想再收到我的留言,请回复“取消”。

我也是听别人说的啦

我也是听你说的啦

Coin Marketplace

STEEM 0.35
TRX 0.12
JST 0.040
BTC 70753.86
ETH 3589.34
USDT 1.00
SBD 4.75