问题 运行 Hyperledger fabric basic-network:验证 ReadSet 时出错

Problem running Hyperledger fabric basic-network: error validating ReadSet

我正在尝试 运行 hyperledger fabric 教程 documents 但是当我 运行 ./start.sh 命令时我得到这个错误:

docker-compose -f docker-compose.yml down
Removing network net_basic
WARNING: Network net_basic not found.

docker-compose -f docker-compose.yml up -d ca.example.com orderer.example.com peer0.org1.example.com couchdb
Creating network "net_basic" with the default driver
Creating ca.example.com      ... done
Creating couchdb             ... done
Creating orderer.example.com ... done
Creating peer0.org1.example.com ... done
docker ps -a
CONTAINER ID        IMAGE                        COMMAND                  CREATED             STATUS                  PORTS                                            NAMES
f799f0b5a94b        hyperledger/fabric-peer      "peer node start"        3 seconds ago       Up Less than a second   0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp   peer0.org1.example.com
036e92d414df        hyperledger/fabric-orderer   "orderer"                9 seconds ago       Up 5 seconds            0.0.0.0:7050->7050/tcp                           orderer.example.com
78255d10ae02        couchdb:2.3                  "tini -- /docker-ent…"   9 seconds ago       Up 3 seconds            4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp       couchdb
55f3ade84d52        hyperledger/fabric-ca        "sh -c 'fabric-ca-se…"   9 seconds ago       Up 4 seconds            0.0.0.0:7054->7054/tcp                           ca.example.com

# wait for Hyperledger Fabric to start
# incase of errors when running later commands, issue export FABRIC_START_TIMEOUT=<larger number>
export FABRIC_START_TIMEOUT=60
#echo ${FABRIC_START_TIMEOUT}
sleep ${FABRIC_START_TIMEOUT}

# Create the channel
docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c mychannel -f /etc/hyperledger/configtx/channel.tx
2019-12-21 09:24:37.078 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
Error: got unexpected status: BAD_REQUEST -- error validating channel creation transaction for new channel 'mychannel', could not succesfully apply update to template configuration: error authorizing update: error validating ReadSet: existing config does not contain element for [Group]  /Channel/Application/Org1MSP but was in the read set

首先我尝试将 FABRIC_START_TIMEOUT 更改为 60 秒(原来是 10 秒),但问题仍然存在。我试图查看 peer0.org1.example.com 的日志并收到此警告:

2019-12-21 09:36:05.735 UTC [couchdb] handleRequest -> WARN 00e Retrying couchdb request in 1m4s. Attempt:10  Error:Get http://couchdb:5984/: dial tcp 172.30.0.4:5984: connect: connection refused

所以我将 FABRIC_START_TIMEOUT 增加到 300 秒来修复连接被拒绝的问题,但我仍然收到 error validating ReadSet 错误。

我该如何解决这个问题?

我 运行 解决了这个问题,并通过检查最新的稳定标签 (v1.4.4) 和再次 运行 脚本解决了这个问题。

$ git checkout v1.4.4
$ ./start.sh