我实际上正在尝试在两个不同的VPS上构建两个区块链。第一个正在工作,但是经过许多小时的研究,我没有找到为什么第二个区块链不想构建的原因。
我建立了crypto-config文件夹,没关系,但是当我尝试建立channel-artifacts文件夹时,它不起作用,并且我使用完全相同的方法。这是日志:
2018-07-05 17:05:43.046 CEST [common/tools/configtxgen] main -> WARN 001 Omitting the channel ID for configtxgen is deprecated. Explicitly passing the channel ID will be required in the future, defaulting to 'testchainid'.
2018-07-05 17:05:43.046 CEST [common/tools/configtxgen] main -> INFO 002 Loading configuration
2018-07-05 17:05:43.046 CEST [common/tools/configtxgen/localconfig] Load -> CRIT 003 Error reading configuration: While parsing config: yaml: unknown anchor 'ChannelCapabilities' referenced
2018-07-05 17:05:43.047 CEST [common/tools/configtxgen] func1 -> CRIT 004 Error reading configuration: While parsing config: yaml: unknown anchor 'ChannelCapabilities' referenced
panic: Error reading configuration: While parsing config: yaml: unknown anchor 'ChannelCapabilities' referenced [recovered]
panic: Error reading configuration: While parsing config: yaml: unknown anchor 'ChannelCapabilities' referenced
goroutine 1 [running]:
github.com/hyperledger/fabric/vendor/github.com/op/go-logging.(*Logger).Panic(0xc420199e00, 0xc420414390, 0x1, 0x1)
/w/workspace/fabric-nightly-release-job-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/github.com/op/go-logging/logger.go:188 +0xbd
main.main.func1()
/w/workspace/fabric-nightly-release-job-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:254 +0x1ae
panic(0xc6ed20, 0xc420414380)
/opt/go/go1.10.linux.amd64/src/runtime/panic.go:505 +0x229
github.com/hyperledger/fabric/vendor/github.com/op/go-logging.(*Logger).Panic(0xc420199c50, 0xc4201916a0, 0x2, 0x2)
/w/workspace/fabric-nightly-release-job-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/github.com/op/go-logging/logger.go:188 +0xbd
github.com/hyperledger/fabric/common/tools/configtxgen/localconfig.Load(0x7ffdd627483b, 0x15, 0x0, 0x0, 0x0, 0x1)
/w/workspace/fabric-nightly-release-job-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/localconfig/config.go:277 +0x469
main.main()
/w/workspace/fabric-nightly-release-job-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:265 +0xce7
我的configtx.yaml文件与第一个网络基本相同,只是路径有所更改。
有帮助吗?
答案 0 :(得分:10)
这似乎与1.2.0版本有关。通过降级到1.1.0(hyperledger / fabric-ca-tools:x86_64-1.1.0),我能够使CLI再次运行。
参考:https://hub.docker.com/r/hyperledger/fabric-ca-tools/tags/
编辑:https://github.com/hyperledger/fabric/releases/tag/v1.2.0
我的解决方法是确保Organizations
部分位于顶部。我认为您需要做的就是将configtx.yaml中包含&ChannelCapabilities
的部分移到更高位置。