如何解决Hyperledger Fabric网络-使用JAVA SDK-创建频道时出错
环境:
- MacOS:10.13.6
- Golang:1.11.8
- 超级账本面料:1.4
- Java:1.8
说明:
我尝试运行official JavaSDK Fabric app example。
我可以使用默认配置正常部署和运行该应用程序。
然后,我在i <- is.na(df$R1) | (is.na(df$RC) | df$RC != "ACC")
df1 <- df[!i,]
df2 <- df[i,]
中进行一些更改(只是一些有关生成块的规则)并生成二进制工具configtx.yaml
,然后使用:
-
configtxgen
-
./configtxgen -profile TwoOrgsOrdererGenesis -outputBlock genesis.block
用于重新生成./configtxgen -profile TwoOrgsChannel -outputCreateChannelTx channel.tx -channelID mychannel
和channel.tx
的命令。
我使用这些新文件来启动结构网络,并遵循this page的步骤,但是在创建频道时出现以下错误:
genesis.block
订购者容器的日志说:
*org.hyperledger.fabric.sdk.exception.TransactionException: Channel mychannel,send transaction failed on orderer OrdererClient{id: 4,channel: mychannel,name: orderer.example.com,url: grpc://localhost:7050}. Reason: Channel mychannel orderer orderer.example.com status returned failure code 400 (BAD_REQUEST) during orderer next
Caused by: org.hyperledger.fabric.sdk.exception.TransactionException: Channel mychannel orderer orderer.example.com status returned failure code 400 (BAD_REQUEST) during orderer next*
有人知道解决方案吗?
解决方法
您也必须像在脚本中所说的那样更新Anchor伙伴。
cryptogen generate --config=./crypto-config.yaml
mkdir config
configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./config/genesis.block
configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./config/channel.tx -channelID mychannel
configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./config/Org1MSPanchors.tx -channelID $CHANNEL_NAME -asOrg Org1MSP
configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./config/Org2MSPanchors.tx -channelID $CHANNEL_NAME -asOrg Org2MSP
您可以在build.sh脚本中找到详细信息,而不必取消注释这些行。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。