超级账本Fabric生成Orderer创世区块失败。

8

我使用fn.sh创建了我的第一个网络,但是configtxgen无法生成创世块。

我的错误信息如下:

[root@demo first-network]# ./byfn.sh generate
Generating certs and genesis block for with channel 'mychannel' and CLI timeout of '10' seconds and CLI delay of '3' seconds
Continue? [Y/n] y
proceeding ...
/storage/u01/hyperledger/bin/cryptogen

##########################################################
##### Generate certificates using cryptogen tool #########
##########################################################
org1.example.com
org2.example.com

/storage/u01/hyperledger/bin/configtxgen
##########################################################
#########  Generating Orderer Genesis block ##############
##########################################################
2018-02-26 11:00:08.152 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2018-02-26 11:00:08.155 CST [common/configtx/tool/localconfig] Load -> CRIT 002 Error unmarshaling config into struct:  4 error(s) decoding:

* '' has invalid keys: capabilities
* 'Profiles[TwoOrgsChannel].Application' has invalid keys: Capabilities
* 'Profiles[TwoOrgsOrdererGenesis]' has invalid keys: Capabilities
* 'Profiles[TwoOrgsOrdererGenesis].Orderer' has invalid keys: Capabilities
Failed to generate orderer genesis block...

我的 Docker 版本:

Docker version 17.03.1-ce

我的Go版本:

go version go1.8.3 linux/amd64

我的操作系统版本:

CentOS 7.2

我的configtx.yaml文件如下图所示:

configtx.yaml截图

3个回答

9

重新下载特定平台的二进制文件,使用1.1.0版本(而不是1.0.6) -> OK

curl -sSL [下载脚本][1] | bash -s 1.1.0


我正在使用 1.1.0 版本 curl -sSL [google url] | bash -s 1.1.0 1.1.0 0.4.6,但仍然遇到相同的错误。 - Syed Zain Ali

8

Capabilities 关键字是在 v1.1.0-preview 及更高版本中引入的。因此,我猜测您正在尝试使用 v1.0.0 版本的二进制文件与 v1.1.0 的配置文件。


1
我也遇到了同样的问题,但是在使用不同版本的fabric-samples代码库时,“git checkout -b v1.0.6”对我有用,谢谢! - Ameer Deen
大家好,我遇到了与此处描述的同样的问题。我的configtx.yaml文件中有Capabilities部分,并且我正在使用1.1版本。非常感谢任何帮助。 - Haroon Hassan

0

欢迎来到 SO!请将第三方源的必要部分嵌入到您的答案中,因为第三方资源可能会消失。 - m02ph3u5

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接