gpt4 book ai didi

hyperledger-fabric - hyperledger fabric first_network 示例创建 channel 得到 BAD_REQUEST

转载 作者:行者123 更新时间:2023-12-04 17:45:36 24 4
gpt4 key购买 nike

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

我能跑./byfn.sh -m 生成./byfn.sh -m up此设置一直运行到显示结束。喜欢:

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


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

./byfn.sh -m down

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

导出 FABRIC_CFG_PATH=$PWD

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

导出 CHANNEL_NAME=我的 channel

configtxgen -配置文件 TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID $CHANNEL_NAME -asOrg Org1MSP

configtxgen -配置文件 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

到现在为止,我应该已经生成了所有证书、 channel tx 和 anchor 节点,并启动了所有必要的 docker 容器。

然后我执行了

导出 CHANNEL_NAME=我的 channel

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

在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 通过的事实意味着我的环境可以毫无问题地运行第一个样本。但不能手动创建 channel 。知道什么时候出错了吗?

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

似乎是对等更新的版本不匹配,如何解决?

最佳答案

./byfn.sh -m restart -c (channelName)如果您之前运行过 (./byfn.sh -m up),则用您自己的 channel 名称替换 channel 名称,如果您是第一次这样做,则使用 ./byfn.sh -m up(in first-network in folder)

关于hyperledger-fabric - hyperledger fabric first_network 示例创建 channel 得到 BAD_REQUEST,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48626108/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com