首页 文章

hyperledger fabric first_network示例创建通道获得BAD_REQUEST

提问于
浏览
2

我一直在关注超级分类帐网站上的教程:https://hyperledger-fabric.readthedocs.io/en/release/build_network.html#behind-scenes .

我能够运行./byfn.sh -m generate ./byfn.sh -m up这个设置一直运行显示结束 . 喜欢:

===================== All GOOD, BYFN execution completed =====================


 _____   _   _   ____
| ____| | \ | | |  _ \
|  _|   |  \| | | | | |
| |___  | |\  | | |_| |
|_____| |_| \_| |____/

./byfn.sh -m down

然后我开始进一步按照教程手动执行每一行 . 我已成功执行:cryptogen generate --config = . / crypto-config.yaml

export FABRIC_CFG_PATH = $ PWD

configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block

导出CHANNEL_NAME = mychannel

configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID $ CHANNEL_NAME -asOrg Org1MSP

configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org2MSPanchors.tx -channelID $ CHANNEL_NAME -asOrg Org2MSP

CHANNEL_NAME = $ CHANNEL_NAME DELAY = 600 TIMEOUT = 600 docker-compose -f docker-compose-cli.yaml up -d

docker exec -it cli bash

到目前为止,我应该生成所有证书,通道tx和锚点对等,并启动所有必需的docker容器 .

然后我执行了

导出CHANNEL_NAME = mychannel

peer channel create -o orderer.example.com:7050 -c $ CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls $ CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/对等体/加密/ ordererOrganizations / example.com / orderers / orderer.example.com / MSP / tlscacerts / tlsca.example.com-cert.pem

在cli容器中得到:

root@cfd35d38960d:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel create -o orderer.example.com:7050 -c my
hannel2 -f ./channel-artifacts/channel.tx --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabr c
c/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pemr/fabric
2018-02-05 15:27:27.735 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2018-02-05 15:27:27.735 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2018-02-05 15:27:27.742 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2018-02-05 15:27:27.745 UTC [msp] GetLocalMSP -> DEBU 004 Returning existing local MSP
2018-02-05 15:27:27.745 UTC [msp] GetDefaultSigningIdentity -> DEBU 005 Obtaining default signing identity
2018-02-05 15:27:27.746 UTC [msp] GetLocalMSP -> DEBU 006 Returning existing local MSP
2018-02-05 15:27:27.746 UTC [msp] GetDefaultSigningIdentity -> DEBU 007 Obtaining default signing identity
2018-02-05 15:27:27.746 UTC [msp/identity] Sign -> DEBU 008 Sign: plaintext: 0A8C060A074F7267314D53501280062D...53616D706C65436F6E736F727469756D
2018-02-05 15:27:27.746 UTC [msp/identity] Sign -> DEBU 009 Sign: digest: 6D62170E3A05EA175581C405D4BF43F642341165CBF12C6928FFE0473086E46A
2018-02-05 15:27:27.746 UTC [msp] GetLocalMSP -> DEBU 00a Returning existing local MSP
2018-02-05 15:27:27.747 UTC [msp] GetDefaultSigningIdentity -> DEBU 00b Obtaining default signing identity
2018-02-05 15:27:27.747 UTC [msp] GetLocalMSP -> DEBU 00c Returning existing local MSP
2018-02-05 15:27:27.747 UTC [msp] GetDefaultSigningIdentity -> DEBU 00d Obtaining default signing identity
2018-02-05 15:27:27.748 UTC [msp/identity] Sign -> DEBU 00e Sign: plaintext: 0AC4060A1608021A0608DFEFE1D30522...D6E581EFA0DA0888D40FDA924E65BEB6
2018-02-05 15:27:27.749 UTC [msp/identity] Sign -> DEBU 00f Sign: digest: BDDBD94262B4239B63ECFE98239E432FD354643B56DF6EBA23CBC08CDF1C5474
Error: Got unexpected status: BAD_REQUEST
Usage:

不知道什么时候出错了 . 除了BAD_REQUEST之外,没有显示更多或有意义的错误消息 .

我在带有ubuntu 16.04 x64盒子的流浪环境中运行它 . ./byfn.sh -m up经历的事实意味着我的env可以运行第一个样本没问题 . 但无法手动创建 Channels . 知道什么时候错了吗?

我已删除所有docker容器并重新运行,然后收到此消息:错误:出现意外状态:BAD_REQUEST - 错误授权更新:错误验证ReadSet:readset期望键[Group] / Channel / Application版本0,但获得版本1

对于同行更新似乎是不匹配的版本,如何解决这个问题?

4 回答

  • 0

    当我使用面料时,通常不会移除docker容器会产生很多问题 . 所以我建议删除docker-container,使用它

    docker ps -aq | xarge docker rm -f

    但是你要小心使用另一个docker容器 .

  • 0

    这可能是因为证书没有在正确的地方更换 . 我建议你拉下面的回购 . 并尝试从那里运行你的byfn .

    git clone -b issue-6978 https://github.com/sstone1/fabric-samples.git

  • 0

    对等通道创建命令中$ CORE_PEER_TLS_ENABLED的值是多少?

  • 0

    我有同样的问题,我通过这样做来修复它:

    $ docker rmi -f $(docker images -q)
    

    删除泊坞窗图像 . 然后,从官方网站上我下载了结构样本和二进制文件,我使用的命令是:

    git clone -b master https://github.com/hyperledger/fabric-samples.git
    curl -sSL [insert link from the website] | bash -s 1.1.0-rc1
    

    然后,它应该与你合作 .

相关问题