Hyperledger Fabric channel block is not getting created using golang but successfully created using manual...











up vote
1
down vote

favorite












I have a program in Go which automatically generates a channel configuration block. If I do it manually using a terminal it generates a block successfully as shown below:



export CORE_PEER_ADDRESS=peer0.debutinfotech.com:7051
export CORE_PEER_LOCALMSPID=debutinfotechMSP
export CORE_PEER_MSPCONFIGPATH=/home/akshay/go/src/ConfigTool/Go/network/crypto-config/peerOrganizations/debutinfotech.com/users/Admin@debutinfotech.com/msp
export FABRIC_CFG_PATH=/home/akshay/.fabdep/config
peer channel create -o orderer0.example.com:7050 -f network/channel-artifacts/mychannel.tx -c mychannel
2018-11-19 16:28:16.162 IST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-11-19 16:28:16.205 IST [cli/common] readBlock -> INFO 002 Got status: &{NOT_FOUND}
2018-11-19 16:28:16.205 IST [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2018-11-19 16:28:16.413 IST [cli/common] readBlock -> INFO 004 Received block: 0


and I can see the mychannel.block in the directory.



But When I do the same thing using a Go Program. It throws an error as shown below:



2018-11-19 16:22:42.639 IST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-11-19 16:22:42.644 IST [common/tools/configtxgen/localconfig] Load -> CRIT 002 Error reading configuration: Unsupported Config Type ""
panic: Error reading configuration: Unsupported Config Type ""

goroutine 1 [running]:
github.com/hyperledger/fabric/vendor/github.com/op/go-logging.(*Logger).Panic(0xc42015b6e0, 0xc420586220,0x2, 0x2)
/w/workspace/fabric-nightly-release-job-release-1.2-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(0x1494bb9, 0x16, 0x0, 0x0, 0x0, 0xbef4c35ea622c17d)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/localconfig/config.go:277 +0x469
github.com/hyperledger/fabric/peer/channel.createChannelFromDefaults(0xc4204088c0, 0x0, 0x0, 0x0)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:72 +0x65
github.com/hyperledger/fabric/peer/channel.sendCreateChainTransaction(0xc4204088c0, 0x0, 0x0)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:153 +0x21a
github.com/hyperledger/fabric/peer/channel.executeCreate(0xc4204088c0, 0xc4204088c0, 0x0)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:175 +0x2f
github.com/hyperledger/fabric/peer/channel.create(0xc4204aeb40, 0xc4203ff2c0, 0x0, 0x6, 0x0, 0x0, 0x0)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:243 +0x4c
github.com/hyperledger/fabric/peer/channel.createCmd.func1(0xc4204aeb40, 0xc4203ff2c0, 0x0, 0x6, 0x0, 0x0)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:57 +0x52
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0xc4204aeb40, 0xc4203ff200, 0x6, 0x6, 0xc4204aeb40, 0xc4203ff200)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:698 +0x46d
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x1c9e320, 0x1d86c30, 0xf, 0x4)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:783 +0x2e4
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute(0x1c9e320, 0x4, 0xffffffffffffffff)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:736 +0x2b
main.main()
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/main.go:97 +0x5bf


The source code of the program is shown below:



dir := utils.GetRootDir()

os.Setenv("CORE_PEER_MSPCONFIGPATH", *peerOrg.UserDir+"/Admin@"+peerOrg.OrgDomain+"/msp")
os.Setenv("CORE_PEER_LOCALMSPID", peerOrg.MSPID)
os.Setenv("CORE_PEER_ADDRESS", "peer0."+peerOrg.OrgDomain+":7051")
os.Setenv("FABRIC_CFG_PATH", os.ExpandEnv("$HOME")+"/.fabdep/config")
command := exec.Command("peer", "channel", "create", "-o", "orderer0."+ordererOrg.OrgDomain+":7050", "-c", channel.Name, "--outputBlock", dir+"/network/"+channel.Name+".block")
command.Env = os.Environ()

result, err := command.CombinedOutput()


I have set path of FABRIC_CFG_PATH same as I did in terminal but still I have no idea what is wrong in this.



Any suggestion/comment would be really appreciated.










share|improve this question
























  • if i understand it correctly you are trying to generate the genesis block right?
    – mohor chatt
    2 days ago










  • I am trying to generate channel configuration block. mychannel.block
    – Akshay Sood
    2 days ago















up vote
1
down vote

favorite












I have a program in Go which automatically generates a channel configuration block. If I do it manually using a terminal it generates a block successfully as shown below:



export CORE_PEER_ADDRESS=peer0.debutinfotech.com:7051
export CORE_PEER_LOCALMSPID=debutinfotechMSP
export CORE_PEER_MSPCONFIGPATH=/home/akshay/go/src/ConfigTool/Go/network/crypto-config/peerOrganizations/debutinfotech.com/users/Admin@debutinfotech.com/msp
export FABRIC_CFG_PATH=/home/akshay/.fabdep/config
peer channel create -o orderer0.example.com:7050 -f network/channel-artifacts/mychannel.tx -c mychannel
2018-11-19 16:28:16.162 IST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-11-19 16:28:16.205 IST [cli/common] readBlock -> INFO 002 Got status: &{NOT_FOUND}
2018-11-19 16:28:16.205 IST [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2018-11-19 16:28:16.413 IST [cli/common] readBlock -> INFO 004 Received block: 0


and I can see the mychannel.block in the directory.



But When I do the same thing using a Go Program. It throws an error as shown below:



2018-11-19 16:22:42.639 IST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-11-19 16:22:42.644 IST [common/tools/configtxgen/localconfig] Load -> CRIT 002 Error reading configuration: Unsupported Config Type ""
panic: Error reading configuration: Unsupported Config Type ""

goroutine 1 [running]:
github.com/hyperledger/fabric/vendor/github.com/op/go-logging.(*Logger).Panic(0xc42015b6e0, 0xc420586220,0x2, 0x2)
/w/workspace/fabric-nightly-release-job-release-1.2-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(0x1494bb9, 0x16, 0x0, 0x0, 0x0, 0xbef4c35ea622c17d)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/localconfig/config.go:277 +0x469
github.com/hyperledger/fabric/peer/channel.createChannelFromDefaults(0xc4204088c0, 0x0, 0x0, 0x0)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:72 +0x65
github.com/hyperledger/fabric/peer/channel.sendCreateChainTransaction(0xc4204088c0, 0x0, 0x0)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:153 +0x21a
github.com/hyperledger/fabric/peer/channel.executeCreate(0xc4204088c0, 0xc4204088c0, 0x0)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:175 +0x2f
github.com/hyperledger/fabric/peer/channel.create(0xc4204aeb40, 0xc4203ff2c0, 0x0, 0x6, 0x0, 0x0, 0x0)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:243 +0x4c
github.com/hyperledger/fabric/peer/channel.createCmd.func1(0xc4204aeb40, 0xc4203ff2c0, 0x0, 0x6, 0x0, 0x0)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:57 +0x52
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0xc4204aeb40, 0xc4203ff200, 0x6, 0x6, 0xc4204aeb40, 0xc4203ff200)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:698 +0x46d
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x1c9e320, 0x1d86c30, 0xf, 0x4)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:783 +0x2e4
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute(0x1c9e320, 0x4, 0xffffffffffffffff)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:736 +0x2b
main.main()
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/main.go:97 +0x5bf


The source code of the program is shown below:



dir := utils.GetRootDir()

os.Setenv("CORE_PEER_MSPCONFIGPATH", *peerOrg.UserDir+"/Admin@"+peerOrg.OrgDomain+"/msp")
os.Setenv("CORE_PEER_LOCALMSPID", peerOrg.MSPID)
os.Setenv("CORE_PEER_ADDRESS", "peer0."+peerOrg.OrgDomain+":7051")
os.Setenv("FABRIC_CFG_PATH", os.ExpandEnv("$HOME")+"/.fabdep/config")
command := exec.Command("peer", "channel", "create", "-o", "orderer0."+ordererOrg.OrgDomain+":7050", "-c", channel.Name, "--outputBlock", dir+"/network/"+channel.Name+".block")
command.Env = os.Environ()

result, err := command.CombinedOutput()


I have set path of FABRIC_CFG_PATH same as I did in terminal but still I have no idea what is wrong in this.



Any suggestion/comment would be really appreciated.










share|improve this question
























  • if i understand it correctly you are trying to generate the genesis block right?
    – mohor chatt
    2 days ago










  • I am trying to generate channel configuration block. mychannel.block
    – Akshay Sood
    2 days ago













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have a program in Go which automatically generates a channel configuration block. If I do it manually using a terminal it generates a block successfully as shown below:



export CORE_PEER_ADDRESS=peer0.debutinfotech.com:7051
export CORE_PEER_LOCALMSPID=debutinfotechMSP
export CORE_PEER_MSPCONFIGPATH=/home/akshay/go/src/ConfigTool/Go/network/crypto-config/peerOrganizations/debutinfotech.com/users/Admin@debutinfotech.com/msp
export FABRIC_CFG_PATH=/home/akshay/.fabdep/config
peer channel create -o orderer0.example.com:7050 -f network/channel-artifacts/mychannel.tx -c mychannel
2018-11-19 16:28:16.162 IST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-11-19 16:28:16.205 IST [cli/common] readBlock -> INFO 002 Got status: &{NOT_FOUND}
2018-11-19 16:28:16.205 IST [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2018-11-19 16:28:16.413 IST [cli/common] readBlock -> INFO 004 Received block: 0


and I can see the mychannel.block in the directory.



But When I do the same thing using a Go Program. It throws an error as shown below:



2018-11-19 16:22:42.639 IST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-11-19 16:22:42.644 IST [common/tools/configtxgen/localconfig] Load -> CRIT 002 Error reading configuration: Unsupported Config Type ""
panic: Error reading configuration: Unsupported Config Type ""

goroutine 1 [running]:
github.com/hyperledger/fabric/vendor/github.com/op/go-logging.(*Logger).Panic(0xc42015b6e0, 0xc420586220,0x2, 0x2)
/w/workspace/fabric-nightly-release-job-release-1.2-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(0x1494bb9, 0x16, 0x0, 0x0, 0x0, 0xbef4c35ea622c17d)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/localconfig/config.go:277 +0x469
github.com/hyperledger/fabric/peer/channel.createChannelFromDefaults(0xc4204088c0, 0x0, 0x0, 0x0)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:72 +0x65
github.com/hyperledger/fabric/peer/channel.sendCreateChainTransaction(0xc4204088c0, 0x0, 0x0)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:153 +0x21a
github.com/hyperledger/fabric/peer/channel.executeCreate(0xc4204088c0, 0xc4204088c0, 0x0)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:175 +0x2f
github.com/hyperledger/fabric/peer/channel.create(0xc4204aeb40, 0xc4203ff2c0, 0x0, 0x6, 0x0, 0x0, 0x0)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:243 +0x4c
github.com/hyperledger/fabric/peer/channel.createCmd.func1(0xc4204aeb40, 0xc4203ff2c0, 0x0, 0x6, 0x0, 0x0)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:57 +0x52
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0xc4204aeb40, 0xc4203ff200, 0x6, 0x6, 0xc4204aeb40, 0xc4203ff200)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:698 +0x46d
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x1c9e320, 0x1d86c30, 0xf, 0x4)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:783 +0x2e4
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute(0x1c9e320, 0x4, 0xffffffffffffffff)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:736 +0x2b
main.main()
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/main.go:97 +0x5bf


The source code of the program is shown below:



dir := utils.GetRootDir()

os.Setenv("CORE_PEER_MSPCONFIGPATH", *peerOrg.UserDir+"/Admin@"+peerOrg.OrgDomain+"/msp")
os.Setenv("CORE_PEER_LOCALMSPID", peerOrg.MSPID)
os.Setenv("CORE_PEER_ADDRESS", "peer0."+peerOrg.OrgDomain+":7051")
os.Setenv("FABRIC_CFG_PATH", os.ExpandEnv("$HOME")+"/.fabdep/config")
command := exec.Command("peer", "channel", "create", "-o", "orderer0."+ordererOrg.OrgDomain+":7050", "-c", channel.Name, "--outputBlock", dir+"/network/"+channel.Name+".block")
command.Env = os.Environ()

result, err := command.CombinedOutput()


I have set path of FABRIC_CFG_PATH same as I did in terminal but still I have no idea what is wrong in this.



Any suggestion/comment would be really appreciated.










share|improve this question















I have a program in Go which automatically generates a channel configuration block. If I do it manually using a terminal it generates a block successfully as shown below:



export CORE_PEER_ADDRESS=peer0.debutinfotech.com:7051
export CORE_PEER_LOCALMSPID=debutinfotechMSP
export CORE_PEER_MSPCONFIGPATH=/home/akshay/go/src/ConfigTool/Go/network/crypto-config/peerOrganizations/debutinfotech.com/users/Admin@debutinfotech.com/msp
export FABRIC_CFG_PATH=/home/akshay/.fabdep/config
peer channel create -o orderer0.example.com:7050 -f network/channel-artifacts/mychannel.tx -c mychannel
2018-11-19 16:28:16.162 IST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-11-19 16:28:16.205 IST [cli/common] readBlock -> INFO 002 Got status: &{NOT_FOUND}
2018-11-19 16:28:16.205 IST [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2018-11-19 16:28:16.413 IST [cli/common] readBlock -> INFO 004 Received block: 0


and I can see the mychannel.block in the directory.



But When I do the same thing using a Go Program. It throws an error as shown below:



2018-11-19 16:22:42.639 IST [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2018-11-19 16:22:42.644 IST [common/tools/configtxgen/localconfig] Load -> CRIT 002 Error reading configuration: Unsupported Config Type ""
panic: Error reading configuration: Unsupported Config Type ""

goroutine 1 [running]:
github.com/hyperledger/fabric/vendor/github.com/op/go-logging.(*Logger).Panic(0xc42015b6e0, 0xc420586220,0x2, 0x2)
/w/workspace/fabric-nightly-release-job-release-1.2-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(0x1494bb9, 0x16, 0x0, 0x0, 0x0, 0xbef4c35ea622c17d)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/localconfig/config.go:277 +0x469
github.com/hyperledger/fabric/peer/channel.createChannelFromDefaults(0xc4204088c0, 0x0, 0x0, 0x0)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:72 +0x65
github.com/hyperledger/fabric/peer/channel.sendCreateChainTransaction(0xc4204088c0, 0x0, 0x0)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:153 +0x21a
github.com/hyperledger/fabric/peer/channel.executeCreate(0xc4204088c0, 0xc4204088c0, 0x0)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:175 +0x2f
github.com/hyperledger/fabric/peer/channel.create(0xc4204aeb40, 0xc4203ff2c0, 0x0, 0x6, 0x0, 0x0, 0x0)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:243 +0x4c
github.com/hyperledger/fabric/peer/channel.createCmd.func1(0xc4204aeb40, 0xc4203ff2c0, 0x0, 0x6, 0x0, 0x0)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:57 +0x52
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0xc4204aeb40, 0xc4203ff200, 0x6, 0x6, 0xc4204aeb40, 0xc4203ff200)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:698 +0x46d
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x1c9e320, 0x1d86c30, 0xf, 0x4)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:783 +0x2e4
github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute(0x1c9e320, 0x4, 0xffffffffffffffff)
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:736 +0x2b
main.main()
/w/workspace/fabric-nightly-release-job-release-1.2-x86_64/gopath/src/github.com/hyperledger/fabric/peer/main.go:97 +0x5bf


The source code of the program is shown below:



dir := utils.GetRootDir()

os.Setenv("CORE_PEER_MSPCONFIGPATH", *peerOrg.UserDir+"/Admin@"+peerOrg.OrgDomain+"/msp")
os.Setenv("CORE_PEER_LOCALMSPID", peerOrg.MSPID)
os.Setenv("CORE_PEER_ADDRESS", "peer0."+peerOrg.OrgDomain+":7051")
os.Setenv("FABRIC_CFG_PATH", os.ExpandEnv("$HOME")+"/.fabdep/config")
command := exec.Command("peer", "channel", "create", "-o", "orderer0."+ordererOrg.OrgDomain+":7050", "-c", channel.Name, "--outputBlock", dir+"/network/"+channel.Name+".block")
command.Env = os.Environ()

result, err := command.CombinedOutput()


I have set path of FABRIC_CFG_PATH same as I did in terminal but still I have no idea what is wrong in this.



Any suggestion/comment would be really appreciated.







hyperledger-fabric hyperledger






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago









Volker

19.6k24756




19.6k24756










asked 2 days ago









Akshay Sood

711925




711925












  • if i understand it correctly you are trying to generate the genesis block right?
    – mohor chatt
    2 days ago










  • I am trying to generate channel configuration block. mychannel.block
    – Akshay Sood
    2 days ago


















  • if i understand it correctly you are trying to generate the genesis block right?
    – mohor chatt
    2 days ago










  • I am trying to generate channel configuration block. mychannel.block
    – Akshay Sood
    2 days ago
















if i understand it correctly you are trying to generate the genesis block right?
– mohor chatt
2 days ago




if i understand it correctly you are trying to generate the genesis block right?
– mohor chatt
2 days ago












I am trying to generate channel configuration block. mychannel.block
– Akshay Sood
2 days ago




I am trying to generate channel configuration block. mychannel.block
– Akshay Sood
2 days ago












1 Answer
1






active

oldest

votes

















up vote
1
down vote













The CORE_PEER_MSPCONFIGPATH was not correct. Setting up a correct path fixed my issue






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53373192%2fhyperledger-fabric-channel-block-is-not-getting-created-using-golang-but-success%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    The CORE_PEER_MSPCONFIGPATH was not correct. Setting up a correct path fixed my issue






    share|improve this answer

























      up vote
      1
      down vote













      The CORE_PEER_MSPCONFIGPATH was not correct. Setting up a correct path fixed my issue






      share|improve this answer























        up vote
        1
        down vote










        up vote
        1
        down vote









        The CORE_PEER_MSPCONFIGPATH was not correct. Setting up a correct path fixed my issue






        share|improve this answer












        The CORE_PEER_MSPCONFIGPATH was not correct. Setting up a correct path fixed my issue







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 4 hours ago









        Akshay Sood

        711925




        711925






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53373192%2fhyperledger-fabric-channel-block-is-not-getting-created-using-golang-but-success%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

            SQL update select statement

            WPF add header to Image with URL pettitions [duplicate]