chainHero / heroes-service

Short tutorial to build a blockchain application in Go with Hyperledger Fabric
https://chainhero.io/2018/06/tutorial-build-blockchain-app-v1-1-0/
Apache License 2.0
275 stars 147 forks source link

Unable to initialize the Fabric SDK #7

Closed akshitkrnagpal closed 6 years ago

akshitkrnagpal commented 6 years ago

When running make I am getting this error after Environnement Upin log.

Unable to initialize the Fabric SDK: failed to create new resource management client: unable to get client provider context: unable to retrieve configuration from SDK: must provide default organisation name in configuration

sshmaxime commented 6 years ago

Hello Sir,

Did you follow the tutorial step by step or did you directly clone the repository and execute the command make ?

Moreover can you please tell us on which distro are you.

akshitkrnagpal commented 6 years ago

@MaximeAubanel Thanks for the response. I am following the tutorial. Everything before this worked as described in the tutorial.

I am using macOS High Sierra 10.13.3 (Sorry I should have mentioned it earlier)

sshmaxime commented 6 years ago

Alright.

Can you tell me exactly at what step this message appeared ?

akshitkrnagpal commented 6 years ago

After creating Gopkg.toml, I created Makefile (Just copied and pasted). Then I executed make.

I didn't execute them stepwise at first but when I did, executing ./heroes-service gave me this error.

[fabric_sdk_go] 2018/04/01 00:33:46 UTC - config.initConfig -> INFO config fabric_sdk_go logging level is set to: INFO
Unable to initialize the Fabric SDK: failed to create channel: create channel failed: failed broadcast to orderer: Orderer Server Status Code: (400) BAD_REQUEST. Description: 
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x45a86dd]

goroutine 1 [running]:
github.com/chainHero/heroes-service/blockchain.(*FabricSetup).InstallAndInstantiateCC(0xc42019edd0, 0x28, 0xc420179e90)
    /Users/akshitkrnagpal/go/src/github.com/chainHero/heroes-service/blockchain/setup.go:102 +0x1ad
main.main()
    /Users/akshitkrnagpal/go/src/github.com/chainHero/heroes-service/main.go:37 +0x1f1

I cloned this GitHub repo also, I got the same error.

sshmaxime commented 6 years ago

Hang on. So you are telling me that when you clone the repository then execute make. You got this error too ?

akshitkrnagpal commented 6 years ago

Yes. Just cloned it when you asked me.

akshitkrnagpal commented 6 years ago

@MaximeAubanel I don't know what happened but my mac restarted and now both my code and the direct clone of this repo are working. Thanks for your help. I'll close this.