Pongal
Pongal

Reputation: 95

Cannot run fabcar example in Hyperledger Fabric on Windows

I am on Windows 10 home and have all the pre-requisites installed. I am having trouble running the Fabcar example of Hyperledger Fabric. I am in fabric-samples\fabcar folder and using Docker Quickstart Terminal of Docker Toolbox to run the terminal command ./startFabric.sh javascript

I am getting the error:

./startFabric.sh javascript
Stopping for channel 'mychannel' with CLI timeout of '10' seconds and CLI delay of '3' seconds
proceeding ...
WARNING: The BYFN_CA1_PRIVATE_KEY variable is not set. Defaulting to a blank string.
WARNING: The BYFN_CA2_PRIVATE_KEY variable is not set. Defaulting to a blank string.
Removing network net_byfn
WARNING: Network net_byfn not found.
Removing volume net_orderer.example.com
WARNING: Volume net_orderer.example.com not found.
Removing volume net_peer0.org1.example.com
WARNING: Volume net_peer0.org1.example.com not found.
Removing volume net_peer1.org1.example.com
WARNING: Volume net_peer1.org1.example.com not found.
Removing volume net_peer0.org2.example.com
WARNING: Volume net_peer0.org2.example.com not found.
Removing volume net_peer1.org2.example.com
WARNING: Volume net_peer1.org2.example.com not found.
Removing volume net_orderer2.example.com
WARNING: Volume net_orderer2.example.com not found.
Removing volume net_orderer3.example.com
WARNING: Volume net_orderer3.example.com not found.
Removing volume net_orderer4.example.com
WARNING: Volume net_orderer4.example.com not found.
Removing volume net_orderer5.example.com
WARNING: Volume net_orderer5.example.com not found.
Removing volume net_peer0.org3.example.com
WARNING: Volume net_peer0.org3.example.com not found.
Removing volume net_peer1.org3.example.com
WARNING: Volume net_peer1.org3.example.com not found.
---- No containers available for deletion ----
---- No images available for deletion ----

Starting for channel 'mychannel' with CLI timeout of '10' seconds and CLI delay of '3' seconds and using database 'couchdb'
proceeding ...
LOCAL_VERSION=1.4.4
DOCKER_IMAGE_VERSION=1.4.4
/c/users/vijay/ws/hf/fabric-samples/bin/cryptogen

##########################################################
##### Generate certificates using cryptogen tool #########
##########################################################
+ cryptogen generate --config=./crypto-config.yaml
org1.example.com
org2.example.com
+ res=0
+ set +x

Generate CCP files for Org1 and Org2
/c/users/vijay/ws/hf/fabric-samples/bin/configtxgen
##########################################################
#########  Generating Orderer Genesis block ##############
##########################################################
CONSENSUS_TYPE=solo
+ '[' solo == solo ']'
+ configtxgen -profile TwoOrgsOrdererGenesis -channelID byfn-sys-channel -outputBlock ./channel-artifacts/genesis.block
2020-01-27 07:27:17.442 IST [common.tools.configtxgen] main -> INFO 001 Loading configuration
2020-01-27 07:27:17.443 IST [common.tools.configtxgen.localconfig] Load -> PANI 002 Error reading configuration:  Unsupported Config Type ""
2020-01-27 07:27:17.444 IST [common.tools.configtxgen] func1 -> PANI 003 Error reading configuration:  Unsupported Config Type ""
panic: Error reading configuration:  Unsupported Config Type "" [recovered]
        panic: Error reading configuration:  Unsupported Config Type ""

goroutine 1 [running]:
github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc0000bdce0, 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 +0x54d
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc000006228, 0x4, 0xc00002cf00, 0x38, 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 +0x108
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(...)
        /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159
github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panic(0xc000006230, 0xc00015b9a8, 0x1, 0x1)
        /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:73 +0xa1
main.main.func1()
        /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:260 +0x17f
panic(0xa87ee0, 0xc000178bd0)
        /w/workspace/fabric-release-jobs-x86_64/golang/go/src/runtime/panic.go:522 +0x1c3
github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc0000bdce0, 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 +0x54d
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc000006208, 0x4, 0xc00002cd00, 0x38, 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 +0x108
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(...)
        /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159
github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panic(0xc000006210, 0xc00015bdb8, 0x2, 0x2)
        /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:73 +0xa1
github.com/hyperledger/fabric/common/tools/configtxgen/localconfig.Load(0xc000032600, 0x15, 0x0, 0x0, 0x0, 0x0)
        /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/localconfig/config.go:276 +0x4d0
main.main()
        /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:271 +0xff4
+ res=2
+ set +x
Failed to generate orderer genesis block...

Upvotes: 0

Views: 469

Answers (3)

Riki95
Riki95

Reputation: 726

Don't run Hyperledger Fabric on Windows, is not yet well supported. Run it on Linux.

If you want, you can run the SDK on Windows.

Upvotes: 2

david_k
david_k

Reputation: 5868

The first problem is because you are using Docker Toolbox. This has lots of limitations especially around file sharing between windows and linux containers. I believe it can be made to work and there are articles on google you can search around this area.

A recent release of fabric-node-sdk for client side applications has made client side development much better on windows meaning you shouldn't have to install the windows build tools.

My recommendation would be either

  1. upgrade to windows pro and use docker for windows
  2. use the virtual box environment you have installed already to support docker for toolbox and create a linux virtual machine and use that instead. I would recommend linux mint or ubuntu as a distribution to try.

Upvotes: 1

Narendranath Reddy
Narendranath Reddy

Reputation: 4133

2020-01-27 07:27:17.443 IST [common.tools.configtxgen.localconfig] Load -> PANI 002 Error reading configuration:  Unsupported Config Type ""
2020-01-27 07:27:17.444 IST [common.tools.configtxgen] func1 -> PANI 003 Error reading configuration:  Unsupported Config Type ""
panic: Error reading configuration:  Unsupported Config Type "" [recovered]
        panic: Error reading configuration:  Unsupported Config Type ""

It means it is unable to find the configtx.yml file

Please make sure the path to configtx.yml is mapped correctly

Upvotes: 1

Related Questions