主动连接方提示:
info 2019-09-03T07:20:45.197 thread-0 net_plugin.cpp:2293 handle_message ] received a go away message from 17.1.0.9:7860, reason = authentication failure
被连接方提示:
error 2019-09-04T09:30:24.112 thread-0 net_plugin.cpp:2715 authenticate_peer ] Peer web0_92:6886 - 5a05387 sent a handshake with a timestamp skewed by more than 1 second.
error 2019-09-04T09:30:24.112 thread-0 net_plugin.cpp:2251 handle_message ] Peer not authenticated. Closing connection.
由于BP节点config设置了对等网络验证
allowed-connection = producers
allowed-connection = specified
此时被链接方已经添加了主动连接方的peer-key
peer-key = "FSC71Uiuk23RACZ2PKDZQUeAgyA4w8g9DYurjtBktNes382zn1tMP"
namespace sc = std::chrono;
sc::system_clock::duration msg_time(msg.time);
auto time = sc::system_clock::now().time_since_epoch();
if(time - msg_time > peer_authentication_interval) {
fc_elog( logger, "Peer ${peer} sent a handshake with a timestamp skewed by more than ${time}.",
("peer", msg.p2p_address)("time", "1 second")); // TODO Add to_variant for std::chrono::system_clock::duration
return false;
}
Peer clock may be no more than 1 second skewed from our clock, including network latency.
对等时钟与我们的时钟相差不超过1秒,包括网络延迟。
主动连接方发起连接时(当前机器本地时间)到被连接方处理时(被连方本地时间)不能超过1秒(peer_authentication_interval)
如果超时就直接拒绝
解决方案
各节点开启定时同步时间服务
sudo apt-get install chrony
参考:https://blog.csdn.net/kinglyjn/article/details/53606791
版权属于:区块链中文技术社区 / 转载原创者
本文链接:https://bcskill.com/index.php/archives/838.html
相关技术文章仅限于相关区块链底层技术研究,禁止用于非法用途,后果自负!本站严格遵守一切相关法律政策!