创建第一个Fabric创世区块,遇坑Failed to generate orderer genesis block

按上篇步骤到了创建创世区块了,然后失败了,报错如下

/Users/yiyunyue/fabric/demo1/fabric-samples/first-network/../bin/configtxgen

##########################################################

#########  Generating Orderer Genesis block ##############

##########################################################

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

2018-10-31 15:59:56.607 CST [common/configtx/tool] main -> INFO 001 Loading configuration

2018-10-31 15:59:56.637 CST [common/configtx/tool/localconfig] Load -> CRIT 002 Error unmarshaling config into struct:  17 error(s) decoding:

 

* '' has invalid keys: capabilities, channel

* 'Application' has invalid keys: Capabilities, Policies

* 'Orderer' has invalid keys: Capabilities, Policies

* 'Organizations[0]' has invalid keys: Policies

* 'Organizations[1]' has invalid keys: Policies

* 'Organizations[2]' has invalid keys: Policies

* 'Organizations[3]' has invalid keys: MSPType, Policies

* 'Profiles[TwoOrgsChannel].Application' has invalid keys: Capabilities, Policies

* 'Profiles[TwoOrgsChannel].Application.Organizations[0]' has invalid keys: Policies

* 'Profiles[TwoOrgsChannel].Application.Organizations[1]' has invalid keys: Policies

* 'Profiles[TwoOrgsChannel].Application.Organizations[2]' has invalid keys: MSPType, Policies

* 'Profiles[TwoOrgsOrdererGenesis]' has invalid keys: Capabilities, Policies

* 'Profiles[TwoOrgsOrdererGenesis].Consortiums[SampleConsortium].Organizations[0]' has invalid keys: Policies

* 'Profiles[TwoOrgsOrdererGenesis].Consortiums[SampleConsortium].Organizations[1]' has invalid keys: Policies

* 'Profiles[TwoOrgsOrdererGenesis].Consortiums[SampleConsortium].Organizations[2]' has invalid keys: MSPType, Policies

* 'Profiles[TwoOrgsOrdererGenesis].Orderer' has invalid keys: Capabilities, Policies

* 'Profiles[TwoOrgsOrdererGenesis].Orderer.Organizations[0]' has invalid keys: Policies

+ res=1

+ set +x

Failed to generate orderer genesis block...

 

google,stackflow,csdn,意见总结

就是 hyperledger-fabric-darwin-amd64-1.0.5.tar.gz版本与fabric samples新版(git clone https://github.com/hyperledger/fabric-samples.git)不符合,得下载最新版的hyperledger-fabric-darwin-amd64 ,以下是所有版本的地址,自己调对应系统的新版本吧

https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric/

接着就是将解压后的bin,config文件夹都放入fabric samples里,以前的bin删掉。

重新运行 ./byfn.sh -m generate ,搞定如下:

Generating certs and genesis block for channel 'mychannel' with CLI timeout of '10' seconds and CLI delay of '3' seconds

Continue? [Y/n] y

proceeding ...

/Users/yiyunyue/fabric/demo1/fabric-samples/first-network/../bin/cryptogen

 

##########################################################

##### Generate certificates using cryptogen tool #########

##########################################################

+ cryptogen generate --config=./crypto-config.yaml

org1.example.com

org2.example.com

+ res=0

+ set +x

 

/Users/yiyunyue/fabric/demo1/fabric-samples/first-network/../bin/configtxgen

##########################################################

#########  Generating Orderer Genesis block ##############

##########################################################

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

2018-10-31 18:28:01.172 CST [common/tools/configtxgen] main -> WARN 001 Omitting the channel ID for configtxgen for output operations is deprecated.  Explicitly passing the channel ID will be required in the future, defaulting to 'testchainid'.

2018-10-31 18:28:01.173 CST [common/tools/configtxgen] main -> INFO 002 Loading configuration

2018-10-31 18:28:01.222 CST [common/tools/configtxgen] doOutputBlock -> INFO 003 Generating genesis block

2018-10-31 18:28:01.224 CST [common/tools/configtxgen] doOutputBlock -> INFO 004 Writing genesis block

+ res=0

+ set +x

 

#################################################################

### Generating channel configuration transaction 'channel.tx' ###

#################################################################

+ configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID mychannel

2018-10-31 18:28:01.291 CST [common/tools/configtxgen] main -> INFO 001 Loading configuration

2018-10-31 18:28:01.318 CST [common/tools/configtxgen] doOutputChannelCreateTx -> INFO 002 Generating new channel configtx

2018-10-31 18:28:01.320 CST [common/tools/configtxgen] doOutputChannelCreateTx -> INFO 003 Writing new channel tx

+ res=0

+ set +x

 

#################################################################

#######    Generating anchor peer update for Org1MSP   ##########

#################################################################

+ configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID mychannel -asOrg Org1MSP

2018-10-31 18:28:01.362 CST [common/tools/configtxgen] main -> INFO 001 Loading configuration

2018-10-31 18:28:01.382 CST [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update

2018-10-31 18:28:01.382 CST [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update

+ res=0

+ set +x

 

#################################################################

#######    Generating anchor peer update for Org2MSP   ##########

#################################################################

+ configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org2MSPanchors.tx -channelID mychannel -asOrg Org2MSP

2018-10-31 18:28:01.421 CST [common/tools/configtxgen] main -> INFO 001 Loading configuration

2018-10-31 18:28:01.444 CST [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update

2018-10-31 18:28:01.444 CST [common/tools/configtxgen] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update

+ res=0

+ set +x

 

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
### 回答1: "failed to generate imgdiff for"是一个错误消息,通常会在图像处理或比较工具中出现。这个错误消息意味着在生成图像差异或比较两张图片时出现了问题。 可能的原因包括以下几点: 1. 图像格式问题:图片可能是无效的或不支持的格式。一些工具只能处理特定的图像格式,如果图片不符合要求就会出现无法生成图像差异的错误。 2. 图片损坏:如果图片本身损坏或缺失关键信息,生成图像差异时可能会出现问题。 3. 文件路径错误:工具找不到所需的图像文件。确保文件路径正确并且图像文件存在。 4. 内存不足:生成图像差异可能需要大量的计算资源和内存。如果计算机的内存不足,就可能无法生成差异图片。 解决此错误的方法包括: 1. 检查图像格式:确保使用支持的图像格式,并使用合适的图像处理工具。 2. 修复或替换损坏的图片:如果图片本身损坏,可以尝试修复或替换为有效的图片。 3. 检查文件路径:确认图像文件存在于正确的路径中,并且路径是正确的。 4. 增加内存:如果内存不足,可以尝试增加计算机的内存或关闭其他占用内存的程序。 总而言之,"failed to generate imgdiff for"错误通常是由于图像格式、损坏的图片、文件路径或内存不足等原因造成的。解决该错误需要检查并修复这些潜在问题。 ### 回答2: "failed to generate imgdiff for" 是一个错误提示信息,意思是无法为某个图像生成imgdiff。 这个错误可能有几种可能的原因: 1. 图像文件损坏:如果图像文件本身已损坏或损坏,请尝试使用其他图像文件或修复文件以解决问题。 2. 图像格式不受支持:imgdiff可能不支持或无法处理该特定格式的图像。尝试将图像转换为更常见的格式如JPEG或PNG,并再次生成imgdiff。 3. 系统错误:这个错误可能是由于操作系统或计算机上的其他错误导致的。请尝试重新启动计算机并再次尝试生成imgdiff。 4. 缺少必要的软件或库:生成imgdiff可能需要特定的软件或库的支持。确保您的计算机上安装了所有必需的软件和库,并确保它们是最新版本。 如果上述方法仍然无法解决问题,建议向软件开发者或技术支持人员寻求帮助,他们可以更具体地诊断和解决问题。 ### 回答3: "failed to generate imgdiff for"是一种错误信息,意思是生成图像差异失败。这通常发生在尝试比较两个图像并生成差异图时。生成差异图的目的是突出两个图像之间的不同之处,通常用于图像处理或比较的应用程序中。 造成生成图像差异失败的原因可能有很多。其中一种可能是图像文件损坏或格式不受支持,这会导致无法正确加载图像并比较它们。另外,如果图像的质量很差,或者图像之间的差异太小,也可能导致无法生成明显的差异图。 此外,生成图像差异失败还可能是由于系统或软件问题引起的。例如,可能存在图像处理库或算法的错误,或者可能需要更新软件版本以解决已知的问题。 要解决这个问题,可以尝试以下几种方法。首先,确认图像文件是否正常,尝试打开文件并检查其是否能够正常显示。如果图像文件有问题,可以尝试使用其他文件或修复文件。其次,可以尝试使用不同的图像处理软件或库来生成差异图,以确保问题不是软件特定的。另外,检查系统和软件的更新,确保使用的是最新的版本,并查找有关类似问题解决方案的信息。 如果问题仍然存在,可能需要进一步的调查和诊断才能确定具体原因。在这种情况下,可以考虑寻求专业的图像处理领域的帮助,以便更好地理解和解决该问题。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值