user1584887
user1584887

Reputation: 377

launching hyperledger orderer fails

The official hyperledger fabric v1.0.0 gives a simple demo by using docker. Here is the link.

What i am doing is to avoid docker and directly run them on the machine. However, when i try to launch the orderer using the following cmd and environment variables:

export CHANNEL_NAME=my_channel 
export TIMEOUT=10000
export DELAY=3
export FABRIC_CFG_PATH=$PWD
export ORDERER_GENERAL_LOGLEVEL=debug
export ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
export ORDERER_GENERAL_GENESISMETHOD=file
export ORDERER_GENERAL_GENESISFILE=./channel-artifacts/genesis.block
export ORDERER_GENERAL_LOCALMSPID=OrdererMSP
export ORDERER_GENERAL_LOCALMSPDIR=./crypto-config/ordererOrganizations/example.com/msp
export ORDERER_GENERAL_TLS_ENABLED=true
export ORDERER_GENERAL_TLS_PRIVATEKEY=./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.key
export ORDERER_GENERAL_TLS_CERTIFICATE=./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt
export ORDERER_GENERAL_TLS_ROOTCAS=[./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt]

./orderer

The bash console reports the failure of loading config from orderer:

2017-09-07 20:20:56.358 SGT [orderer/main] main -> INFO 001 Starting orderer:
 Version: development build
 Go version: go1.7
 OS/Arch: linux/amd64
2017-09-07 20:20:56.358 SGT [orderer/localconfig] Load -> CRIT 002 Error reading configuration: Unsupported Config Type ""
panic: Error reading configuration:Unsupported Config Type ""

goroutine 1 [running]:
panic(0xa488e0, 0xc4201ff1a0)
    /opt/go/go1.7.linux.amd64/src/runtime/panic.go:500 +0x1a1
github.com/hyperledger/fabric/vendor/github.com/op/go-logging.(*Logger).Panic(0xc42019f9b0, 0xc4201cf9e0, 0x2, 0x2)
    /w/workspace/fabric-binaries-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/github.com/op/go-logging/logger.go:188 +0xd0
github.com/hyperledger/fabric/orderer/localconfig.Load(0xc42022c480)
    /w/workspace/fabric-binaries-x86_64/gopath/src/github.com/hyperledger/fabric/orderer/localconfig/config.go:231 +0x640
main.main()
    /w/workspace/fabric-binaries-x86_64/gopath/src/github.com/hyperledger/fabric/orderer/main.go:69 +0x309

Anyone know to solve this simple problem, Thank you!

Upvotes: 3

Views: 995

Answers (1)

ajp
ajp

Reputation: 401

It looks like the orderer can't find the config files. When you run:

export FABRIC_CFG_PATH=$PWD

where are you running that from? If you're running it from within the orderer directory in fabric, that's not where the config files are located, they're actually located one directory up in a folder called sampleconfig. You should set FABRIC_CFG_PATH to that.

Upvotes: 6

Related Questions