Yaml Hyperledger Fabric configtxgen-读取配置时出错:映射合并需要映射或映射序列作为值
我正在尝试使用以下内容设置一个简单的结构网络:Yaml Hyperledger Fabric configtxgen-读取配置时出错:映射合并需要映射或映射序列作为值,yaml,hyperledger-fabric,blockchain,hyperledger,Yaml,Hyperledger Fabric,Blockchain,Hyperledger,我正在尝试使用以下内容设置一个简单的结构网络: 订购方组织[ABCCOINORDERS] 样本组织[ABC] 使用cryptogen工具生成所有必要文件后,运行configtxgen命令会出现以下错误: student@abc:~/Desktop/fabric/network$ configtxgen -profile DefaultBlockOrderingService -outputBlock ./config/genesis.block -configPath $PWD 20
- 订购方组织[ABCCOINORDERS]
- 样本组织[ABC]
student@abc:~/Desktop/fabric/network$ configtxgen -profile DefaultBlockOrderingService -outputBlock ./config/genesis.block -configPath $PWD
2019-12-26 12:35:42.131 MST [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'.
2019-12-26 12:35:42.136 MST [common.tools.configtxgen] main -> INFO 002 Loading configuration
2019-12-26 12:35:42.137 MST [common.tools.configtxgen.localconfig] Load -> PANI 003 Error reading configuration: While parsing config: yaml: map merge requires map or sequence of maps as the value
2019-12-26 12:35:42.137 MST [common.tools.configtxgen] func1 -> PANI 004 Error reading configuration: While parsing config: yaml: map merge requires map or sequence of maps as the value
panic: Error reading configuration: While parsing config: yaml: map merge requires map or sequence of maps as the value [recovered]
panic: Error reading configuration: While parsing config: yaml: map merge requires map or sequence of maps as the value
这是configtx.yaml
Organizations:
- &abccoinOrderers
Name: abccoinOrderersMSP
ID: abccoinOrderersMSP
MSPDir: crypto-config/ordererOrganizations/abccoin.com/msp
- &ABC
Name: ABCMSP
ID: ABCMSP
MSPDir: crypto-config/peerOrganizations/ABC.abccoin.com/msp
AnchorPeers:
- Host: Andy.ABC.abccoin.com
Port: 7051
Application: &ApplicationDefaults
Orderer:
- &DevModeOrdering
OrdererType: solo
Addresses:
- Devorderer.abccoin.com:7050
BatchTimeout: 2s
BatchSize:
MaxMessageCount: 1
Profiles:
DefaultBlockOrderingService:
Orderer:
<<: *DevModeOrdering
Organizations:
- *abccoinOrderers
Consortiums:
SampleConsortium:
Organizations:
- *ABC
abcMembersOnly:
Consortium: SampleConsortium
Application:
<<: *ApplicationDefaults
Organizations:
- *ABC
组织:
-&abccinorders
名称:ABCCOINORDERSMSP
ID:ABCCoinOrdersMSSP
MSPDir:crypto-config/orderOrganizations/abccoin.com/msp
-&ABC
姓名:ABCMSP
ID:ABCMSP
MSPDir:crypto-config/peerOrganizations/ABC.abccoin.com/msp
主持人:
-主持人:Andy.ABC.abccoin.com
港口:7051
应用程序:&ApplicationDefaults
订购方:
-&DevModeOrdering
订单类型:solo
地址:
-Devorder.abccoin.com:7050
批处理超时:2秒
批量大小:
MaxMessageCount:1
简介:
DefaultBlockOrderingService:
订购方:
configtx.yaml
中有2个错误
订购者:是映射类型或对象类型,而不是数组或切片类型。当您使用-
定义参数时,它在yaml中用作数组李>
应用程序:必须声明组织:
参数。它可以是空的。如果您没有在其中声明任何内容,它将不会编译。要进行检查,您应该尝试在任何在线转换器中将yaml转换为json李>
Orderer:
// remove -
&DevModeOrdering
OrdererType: solo
Addresses:
- Devorderer.abccoin.com:7050
BatchTimeout: 2s
BatchSize:
MaxMessageCount: 1
Application: &ApplicationDefaults
Organizations: