Welcome to the Linux Foundation Forum!

Need some help with lab 8, can't get past first step

After working on Lab 7 for a while and running through it multiple times, I moved on to Lab 8. As far as I can tell everything in the network should be set up correctly, I had one isssue in Lab 7 where I couldn't do the Chaincode instantiate/upgrade from Org2, I can only do it from Org1.

Anyhow, when I go into Lab 8, first step is to Open the​ configtx.yaml​ file, and append this to the ​ profiles​ section:

OrgTwoChannel:
Consortium: SampleConsortium
Application:
<<: *ApplicationDefaults
Organizations:

  • *Org2

AllAreWelcomeTwo:
Consortium: SampleConsortium
Application:
<<: *ApplicationDefaults
Organizations:

  • *Org1
  • *Org2

The next step is to run ../bin/configtxgen -profile OrgTwoChannel -outputCreateChannelTx ./config/OrgTwoChannel.tx -channelID orgtwochannel

I immediately get an error for configtxgen that I have invalid keys. Note that I can no longer run any configtxgen commands they all result in the same error message. If I edit configtx.yaml file and remove the content from Lab 8, it goes back to working and I can run basic configtxgen commands again.

This is the output when I try to run it with the Lab 8 edits.

student@ubuntu:~/Desktop/fabric-samples/startFiles$ ../bin/configtxgen -profile OrgTwoChannel -outputCreateChannelTx ./config/OrgTwoChannel.tx -channelID orgtwochannel
2020-05-31 14:24:23.788 EDT [common.tools.configtxgen] main -> INFO 001 Loading configuration
2020-05-31 14:24:23.791 EDT [common.tools.configtxgen.localconfig] Load -> PANI 002 Error unmarshaling config into struct: 1 error(s) decoding:

  • '' has invalid keys: ​ allarewelcometwo, ​ orgtwochannel
    2020-05-31 14:24:23.791 EDT [common.tools.configtxgen] func1 -> PANI 003 Error unmarshaling config into struct: 1 error(s) decoding:

  • '' has invalid keys: ​ allarewelcometwo, ​ orgtwochannel
    panic: Error unmarshaling config into struct: 1 error(s) decoding:

  • '' has invalid keys: ​ allarewelcometwo, ​ orgtwochannel [recovered]
    panic: Error unmarshaling config into struct: 1 error(s) decoding:

  • '' has invalid keys: ​ allarewelcometwo, ​ orgtwochannel

goroutine 1 [running]:
github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(CheckedEntry).Write(0xc000121970, 0x0, 0x0, 0x0)
/w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x515
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(
SugaredLogger).log(0xc0000b2248, 0xc00046d804, 0xc000378240, 0x82, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0xf6
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(SugaredLogger).Panicf(0xc0000b2248, 0xc000378240, 0x82, 0x0, 0x0, 0x0)
/w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 +0x79
github.com/hyperledger/fabric/common/flogging.(
FabricLogger).Panic(0xc0000b2250, 0xc00046d938, 0x1, 0x1)
/w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:73 +0x75
main.main.func1()
/w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:250 +0x1a9
panic(0xd4fc40, 0xc000471ce0)
/opt/go/go1.11.1.linux.amd64/src/runtime/panic.go:513 +0x1b9
github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(CheckedEntry).Write(0xc000121970, 0x0, 0x0, 0x0)
/w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x515
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(
SugaredLogger).log(0xc0000b2228, 0xc00046dc04, 0xc000378090, 0x82, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0xf6
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(SugaredLogger).Panicf(0xc0000b2228, 0xc000378090, 0x82, 0x0, 0x0, 0x0)
/w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 +0x79
github.com/hyperledger/fabric/common/flogging.(
FabricLogger).Panic(0xc0000b2230, 0xc00046dd98, 0x2, 0x2)
/w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:73 +0x75
github.com/hyperledger/fabric/common/tools/configtxgen/localconfig.Load(0x7fffda6f61d3, 0xd, 0x0, 0x0, 0x0, 0xc000458540)
/w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/localconfig/config.go:282 +0x580
main.main()
/w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:261 +0xb2f
student@ubuntu:~/Desktop/fabric-samples/startFiles$

Has anyone run into this or have a suggestion how to resolve?

Note that I even tried to remove all references to Org2, assuming that was the issue but I still had a problem. I updated configtx.yaml and added just the following.

​ AllAreWelcomeTwo:
Consortium: SampleConsortium
Application:
<<: *ApplicationDefaults
Organizations:
- *Org1

Then I ran ../bin/configtxgen -profile AllAreWelcomeTwo -outputCreateChannelTx ./config/AllAreWelcomeTwo.tx -channelID allarewelcometwo

and I got the same error. So it appears any edit to configtx.yaml has resulted in an issue.

As a last ditch effort I thought perhaps it had something to do with editing the file so I threw a hail Mary and did a chmod 777 configtx.yaml

No luck....

Comments

  • Are you sure your indentation is correct?

  • Niklaskkkk
    Niklaskkkk Posts: 113

    @LogarithmicTC said:
    Are you sure your indentation is correct?

    @garycris ,
    Hi, as @LogarithmicTC points out be sure to be presice in your YAML-file, as the position of all characters need to be perfect. It might also be an earlier error in what you did in Lab7 or previous labs that is generating this error.

    Since it says you have invalid keys I would assume maybe you did not update the key numbers in your config file? You might have generated new keys during previous labs.

    I just ran trough the Lab8, without any issues. But I have to say, when I learned Fabric myself I encountered many errors similar to you. The best help is to tear down the network, and go over it again. Every time I did this, I saw the mistake I did, I got more comfortable with the commands, and most importantly, I understood why the error messages had occured.

    If you still want to continue from where you are in Lab 8, these two suggestions might help you:

    • Check that you run configtxgen from the same path you have configtx.yaml
    • It could be a version mismatch. Check that your version of binaries match the configuration files
  • garycris
    garycris Posts: 13

    I had to teardown the network again. Eventually got past it. Thanks

Categories

Upcoming Training