0

我正在尝试在不同的机器上建立一个有 4 个节点的 PBFT 网络。在 中core.yaml,我更改了以下参数:peer.id是 vp0- vp3,是节点的 IP 和端口peer.addresspeer.validator.consensus.plugin是 pbft,并且peer.discovery.rootnode是 vp0 节点的 IP 和端口。当我启动节点时,我在节点中看到警告和错误(我以 vp0 -> vp3 顺序启动它们)

VP0:

13:53:34.091 [main] serve -> INFO 032 Starting peer with id=name:"vp0" , network id=dev, address=172.31.45.37:30303, discovery.rootnode=, validator=true
13:53:34.091 [rest] StartOpenchainRESTServer -> INFO 033 Initializing the REST service on 0.0.0.0:5000, TLS is disabled.
13:53:39.833 [consensus/util] RegisterChannel -> INFO 034 Registering connection from <nil>
13:53:44.393 [consensus/util] RegisterChannel -> WARN 035 Received duplicate connection from <nil>, switching to new connection
13:56:45.008 [consensus/util] RegisterChannel -> WARN 036 Received duplicate connection from <nil>, switching to new connection

VP1:

13:53:38.827 [main] serve -> INFO 032 Starting peer with id=name:"vp1" , network id=dev, address=172.31.46.226:30303, discovery.rootnode=172.31.45.37:30303, validator=true
13:53:38.828 [rest] StartOpenchainRESTServer -> INFO 033 Initializing the REST service on 0.0.0.0:5000, TLS is disabled.
13:53:39.829 [consensus/util] RegisterChannel -> INFO 034 Registering connection from <nil>
13:53:45.832 [consensus/util] RegisterChannel -> WARN 035 Received duplicate connection from <nil>, switching to new connection
13:56:50.832 [consensus/util] RegisterChannel -> WARN 036 Received duplicate connection from <nil>, switching to new connection
13:56:51.007 [consensus/util] RegisterChannel -> WARN 037 Received duplicate connection from <nil>, switching to new connection
13:56:51.007 [peer] handleChat -> ERRO 038 Error handling message: Peer FSM failed while handling message (DISC_HELLO): current state: created, error: transition canceled with error: Error registering Handler: Duplicate Handler error: {name:"vp3"  172.31.43.65:30303 VALIDATOR }

VP2:

13:53:43.370 [main] serve -> INFO 032 Starting peer with id=name:"vp2" , network id=dev, address=172.31.37.75:30303, discovery.rootnode=172.31.45.37:30303, validator=true
13:53:43.370 [rest] StartOpenchainRESTServer -> INFO 033 Initializing the REST service on 0.0.0.0:5000, TLS is disabled.
13:53:44.372 [consensus/util] RegisterChannel -> INFO 034 Registering connection from <nil>
13:53:45.816 [consensus/util] RegisterChannel -> WARN 035 Received duplicate connection from <nil>, switching to new connection
13:56:50.376 [consensus/util] RegisterChannel -> WARN 036 Received duplicate connection from <nil>, switching to new connection
13:56:50.994 [consensus/util] RegisterChannel -> WARN 037 Received duplicate connection from <nil>, switching to new connection
13:56:50.994 [peer] handleChat -> ERRO 038 Error handling message: Peer FSM failed while handling message (DISC_HELLO): current state: created, error: transition canceled with error: Error registering Handler: Duplicate Handler error: {name:"vp3"  172.31.43.65:30303 VALIDATOR }

VP3:

13:56:44.000 [main] serve -> INFO 035 Starting peer with id=name:"vp3" , network id=dev, address=172.31.43.65:30303, discovery.rootnode=172.31.45.37:30303, validator=true
13:56:44.001 [rest] StartOpenchainRESTServer -> INFO 036 Initializing the REST service on 0.0.0.0:5000, TLS is disabled.
13:56:45.002 [consensus/util] RegisterChannel -> INFO 037 Registering connection from <nil>
13:56:50.388 [consensus/util] RegisterChannel -> WARN 038 Received duplicate connection from <nil>, switching to new connection
13:56:50.831 [consensus/util] RegisterChannel -> WARN 039 Received duplicate connection from <nil>, switching to new connection
13:56:51.006 [consensus/util] RegisterChannel -> WARN 03a Received duplicate connection from <nil>, switching to new connection
13:56:51.006 [consensus/util] RegisterChannel -> WARN 03b Received duplicate connection from <nil>, switching to new connection
13:56:51.006 [peer] handleChat -> ERRO 03c Error handling message: Peer FSM failed while handling message (DISC_HELLO): current state: created, error: transition canceled with error: Error registering Handler: Duplicate Handler error: {name:"vp2"  172.31.37.75:30303 VALIDATOR }
13:56:51.006 [peer] handleChat -> ERRO 03d Error handling message: Peer FSM failed while handling message (DISC_HELLO): current state: created, error: transition canceled with error: Error registering Handler: Duplicate Handler error: {name:"vp1"  172.31.46.226:30303 VALIDATOR }

可能是什么问题呢?

4

2 回答 2

1

我遇到了同样的问题,但是在更新hyperledger/fabric到新版本(它是 commit eb7605ea9a50f10ae7e275811b61c5b43ec239f2)之后它开始工作了。

对等点按以下顺序成功相互连接(使用pbft consensus插件中的默认设置):

vp3 -> vp2 -> vp1 -> vp0

(vp3 连接到 vp2 等)。

于 2016-06-09T07:00:11.617 回答
0

github上有几个相关问题

https://github.com/hyperledger/fabric/issues/1468
https://github.com/hyperledger/fabric/issues/685

我在 Amazon 中部署 Hyperledger Fabric 时遇到了类似的问题(1 个成员资格,4 个验证节点部署在不同的虚拟机上,PBFT 共识,启用了安全性)。

日志中出现“Peer FSM failed while handling message”错误消息时有两种情况:

  1. 如果具有 Validation Peers 的 EC2 实例之一已停止然后再次启动。
  2. 如果我试图将新节点添加到集群。即使它是全新的虚拟机,具有类似的 Fabric 配置和新的 peer id(之前在这个集群中没有使用过 id)

仅当首次将验证对等体添加到集群时,才有可能重现此问题。第二次,例如,如果“对等”进程被终止(Ctrl+C)然后再次启动,验证对等在启动时没有问题。

我仍在寻找为什么“Received duplicate connection from”消息出现在所有验证对等方的日志文件中的原因。至少这个警告不会对部署造成任何明显的问题。

于 2016-06-06T11:15:28.783 回答