【发布时间】:2020-03-06 10:58:03
【问题描述】:
我正在按照here 提供的步骤将新的 Orderer 节点添加到现有的 RAFT 订购服务。
- 我正在使用来自 fabric-samples(版本:master/latest)github 存储库的
first-network。 - 我修改了
first-network文件夹中的文件,以首先启动具有 3 个 ORDERERS 的 RAFT 服务。 - 在
byfn.sh脚本的端到端成功执行后,我docker exec进入CLI容器。在 CLI 中,我执行以下操作:
设置以下环境变量:
export CORE_PEER_ADDRESS=orderer.example.com:7050
export CORE_PEER_LOCALMSPID=OrdererMSP
export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/users/Admin@example.com/msp
export CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt
export ORDERER_CA=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
export ORDERER_CA=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt
export CHANNEL_NAME=byfn-sys-channel
然后我获取配置块,对其进行解码,并在解码后的 JSON 文件的 consenters 部分中的以下 JSON 段。
{
"client_tls_cert": "xxx",
"host": "orderer4.example.com",
"port": 10050,
"server_tls_cert": "xxx"
}
暂时隐藏了证书值。注意:我还没有修改OrdererAddresses 部分。
修改后的 JSON 用于更新 SYSTEM CHANNEL 配置。然后我为更新的byfn-sys-channel 获取最新的通道配置块。我退出 CLI 并执行 docker cp 以从 CLI 容器中获取最新的配置块到 channel-artifacts 目录中。
我使用与最新获取的配置块对应的引导文件路径启动名为 orderer4.example.com 的排序程序。但是容器崩溃并在调试模式下给我以下日志:
2020-03-06 10:48:58.535 UTC [orderer.common.cluster.replication] fetchLastBlockSeq -> INFO 5b6 orderer2.example.com:8050 is at block sequence of 2 channel=byfn-sys-channel
2020-03-06 10:48:58.536 UTC [orderer.common.cluster.replication] fetchLastBlockSeq -> INFO 5b7 orderer3.example.com:9050 is at block sequence of 2 channel=byfn-sys-channel
2020-03-06 10:48:58.539 UTC [orderer.common.cluster.replication] fetchLastBlockSeq -> INFO 5b8 orderer.example.com:7050 is at block sequence of 2 channel=byfn-sys-channel
2020-03-06 10:48:58.539 UTC [orderer.common.cluster.replication] connectToSomeEndpoint -> INFO 5b9 Connected to orderer.example.com:7050 with last block seq of 2 channel=byfn-sys-channel
2020-03-06 10:48:58.539 UTC [msp.identity] Sign -> DEBU 5ba Sign: plaintext: 0AF5060A3E08051A06089AD588F30522...0D1A0B08FFFFFFFFFFFFFFFFFF012001
2020-03-06 10:48:58.539 UTC [msp.identity] Sign -> DEBU 5bb Sign: digest: DFBDC201427E47056FA06F3E39B61750C8E874F6E09FE30BBFB38380F5F0A96D
2020-03-06 10:48:58.540 UTC [orderer.common.cluster.replication] obtainStream -> INFO 5bc Sending request for block [1] to orderer.example.com:7050 channel=byfn-sys-channel
2020-03-06 10:48:58.540 UTC [grpc] infof -> DEBU 5bd transport: loopyWriter.run returning. connection error: desc = "transport is closing"
2020-03-06 10:48:58.540 UTC [grpc] infof -> DEBU 5be transport: loopyWriter.run returning. connection error: desc = "transport is closing"
2020-03-06 10:48:58.546 UTC [orderer.common.cluster.replication] pullBlocks -> INFO 5bf Got block [1] of size 25 KB from orderer.example.com:7050 channel=byfn-sys-channel
2020-03-06 10:48:58.548 UTC [orderer.common.cluster.replication] pullBlocks -> INFO 5c0 Got block [2] of size 35 KB from orderer.example.com:7050 channel=byfn-sys-channel
2020-03-06 10:48:58.551 UTC [orderer.common.cluster] BlockCommitted -> DEBU 5c1 Committed block [1] for channel byfn-sys-channel that is not a config block
2020-03-06 10:48:58.551 UTC [orderer.common.cluster] appendBlock -> PANI 5c2 Failed to write block [1]: unexpected Previous block hash. Expected PreviousHash = [v1], PreviousHash referred in the latest block= [v2]
panic: Failed to write block [1]: unexpected Previous block hash. Expected PreviousHash = [v1], PreviousHash referred in the latest block= [v2]
我正在按照最新的 Hyperledger 文档中给出的步骤进行操作,但它仍然会抛出此错误。如果我在执行给定步骤时出错,请纠正我。
【问题讨论】:
标签: hyperledger-fabric hyperledger raft