Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hyperledger configtxgen error

I am actually trying to build two blockchains on two diffents VPS. The first one is working but after many hours of research, i didn't find why the second blockchain don't want to build.

I built the crypto-config folder, it is OK, but when I try to build the channel-artifacts folder it is not working and I have exactly the same approach. Here is the log :

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

My configtx.yaml file is basically the same as the first-network with just the paths changed.

Any help?

like image 989
karl vignon Avatar asked Feb 04 '23 23:02

karl vignon


1 Answers

This seems to be related to the 1.2.0 release. I was able to get CLI running again by downgrading to 1.1.0 (hyperledger/fabric-ca-tools:x86_64-1.1.0).

Ref: https://hub.docker.com/r/hyperledger/fabric-ca-tools/tags/

Edit: https://github.com/hyperledger/fabric/releases/tag/v1.2.0

My fix was to make sure the Organizations section is at the top. I think all you need to do is move the section containing &ChannelCapabilities higher in your configtx.yaml.

like image 139
Mike Emery Avatar answered Mar 20 '23 18:03

Mike Emery