问题描述
我一直在超级分类帐网站上关注以下教程: https ://hyperledger-fabric.readthedocs.io/en/release/build_network.html#behind-scenes .
我能够跑步./byfn.sh -m生成./byfn.sh -m向上此安装过程一直显示到最后.像:
===================== All GOOD, BYFN execution completed =====================
_____ _ _ ____
| ____| | \ | | | _ \
| _| | \| | | | | |
| |___ | |\ | | |_| |
|_____| |_| \_| |____/
./byfn.sh -m down
然后,我开始进一步学习本教程,以手动执行每一行.我已经成功执行了:cryptogen生成--config =./crypto-config.yaml
export FABRIC_CFG_PATH = $ PWD
configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block
导出CHANNEL_NAME =我的频道
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 =我的频道
对等渠道创建-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/peer/crypto/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可以运行第一个样本而没有问题.但是无法手动创建频道.知道错什么了吗?
我已删除所有docker容器并重新运行,然后收到以下消息:错误:状态异常:BAD_REQUEST-授权更新错误:错误验证ReadSet:readset预期键[Group]/Channel/Application版本为0,但版本为1
对等更新似乎版本不匹配,该如何解决?
./byfn.sh -m restart -c(channelName)如果您之前已经运行过(./byfn.sh -m up),并且您是第一次运行,请使用./byfn.sh -m up(在first-network中的文件夹中)替换您自己的通道名. /p>
I have been following tutorial on hyper ledger website: https://hyperledger-fabric.readthedocs.io/en/release/build_network.html#behind-scenes.
I was able to run./byfn.sh -m generate./byfn.sh -m upThis setup run all the way through of showning the end.like:
===================== All GOOD, BYFN execution completed =====================
_____ _ _ ____
| ____| | \ | | | _ \
| _| | \| | | | | |
| |___ | |\ | | |_| |
|_____| |_| \_| |____/
./byfn.sh -m down
Then I begun to follow the tutorial further to execute each line manually.I have successfully executed:cryptogen generate --config=./crypto-config.yaml
export FABRIC_CFG_PATH=$PWD
configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block
export 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
By now, I should have all the certs, channel tx and anchor peers generated and started all necessary docker containers.
then I executed
export 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/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
in the cli container and got:
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:
Got no idea what when wrong here. There are no further or meaningful error message shown except BAD_REQUEST.
I was running it on a vagrant environment with box of ubuntu 16.04 x64.The fact that ./byfn.sh -m up went through means my env can run the first sample no problem. But cannot create channel manually. Any idea what when wrong?
I have deleted all docker containers and rerun, then got this message:Error: got unexpected status: BAD_REQUEST -- error authorizing update: error validating ReadSet: readset expected key [Group] /Channel/Application at version 0, but got version 1
It seem to be mismatched version for peer update, how to solve this?
./byfn.sh -m restart -c (channelName)replace channel name by your own channel name if u have ran (./byfn.sh -m up) previously and if its your first time doing it then use ./byfn.sh -m up(in first-network in folder)
这篇关于超级账本结构first_network示例创建渠道获得了BAD_REQUEST的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!