Hyperledger Fabric: Error cryptogen tool

+1 vote

I am trying to install and run Hyperledger Fabric on OSX. 

I have installed it properly but when I run the cryptogen tool I am getting the following warnings:

Apples-MacBook-Pro:e2e mycomputer$ ./../../$os_arch/bin/cryptogen generate --config=./crypto-config.yaml
org1.example.com
2017-04-27 15:46:27.940 PDT [bccsp] GetDefault -> WARN 001 Before using BCCSP, please call InitFactories(). Falling back to bootBCCSP.
2017-04-27 15:46:27.963 PDT [bccsp] GetDefault -> WARN 002 Before using BCCSP, please call InitFactories(). Falling back to bootBCCSP.
2017-04-27 15:46:27.966 PDT [bccsp] GetDefault -> WARN 003 Before using BCCSP, please call InitFactories(). Falling back to bootBCCSP.
2017-04-27 15:46:27.967 PDT [bccsp] GetDefault -> WARN 004 Before using BCCSP, please call InitFactories(). Falling back to bootBCCSP.
2017-04-27 15:46:27.969 PDT [bccsp] GetDefault -> WARN 005 Before using BCCSP, please call InitFactories(). Falling back to bootBCCSP.
org2.example.com
2017-04-27 15:46:27.973 PDT [bccsp] GetDefault -> WARN 006 Before using BCCSP, please call InitFactories(). Falling back to bootBCCSP.
2017-04-27 15:46:27.975 PDT [bccsp] GetDefault -> WARN 007 Before using BCCSP, please call InitFactories(). Falling back to bootBCCSP.
2017-04-27 15:46:27.977 PDT [bccsp] GetDefault -> WARN 008 Before using BCCSP, please call InitFactories(). Falling back to bootBCCSP.
2017-04-27 15:46:27.979 PDT [bccsp] GetDefault -> WARN 009 Before using BCCSP, please call InitFactories(). Falling back to bootBCCSP.
2017-04-27 15:46:27.980 PDT [bccsp] GetDefault -> WARN 00a Before using BCCSP, please call InitFactories(). Falling back to bootBCCSP.
2017-04-27 15:46:27.984 PDT [bccsp] GetDefault -> WARN 00b Before using BCCSP, please call InitFactories(). Falling back to bootBCCSP.
2017-04-27 15:46:27.989 PDT [bccsp] GetDefault -> WARN 00c Before using BCCSP, please call InitFactories(). Falling back to bootBCCSP.
2017-04-27 15:46:27.992 PDT [bccsp] GetDefault -> WARN 00d Before using BCCSP, please call InitFactories(). Falling back to bootBCCSP.

When i run the configtxgen tool, I get the following error:

2017-04-27 12:23:57.202 PDT [common/configtx/tool] main -> INFO 001 Loading configuration
2017-04-27 12:23:57.203 PDT [configtx/tool/localconfig] Load -> CRIT 002 Error reading configuration: Unsupported Config Type ""
panic: Error reading configuration: Unsupported Config Type ""

goroutine 1 [running]:
panic(0x490d00, 0xc420175f50)
    /opt/go/go1.7.linux.amd64/src/runtime/panic.go:500 +0x1a1
github.com/hyperledger/fabric/vendor/github.com/op/go-logging.(*Logger).Panicf(0xc4201da240, 0x5663ea, 0x1f, 0xc420175e70, 0x1, 0x1)
    /w/workspace/fabric-verify-x86_64_1/gopath/src/github.com/hyperledger/fabric/vendor/github.com/op/go-logging/logger.go:194 +0x127
github.com/hyperledger/fabric/common/configtx/tool/localconfig.Load(0x7fff5fbffbfe, 0x7, 0x0)
    /w/workspace/fabric-verify-x86_64_1/gopath/src/github.com/hyperledger/fabric/common/configtx/tool/localconfig/config.go:195 +0x79c
main.main()
    /w/workspace/fabric-verify-x86_64_1/gopath/src/github.com/hyperledger/fabric/common/configtx/tool/configtxgen/main.go:204 +0x405

The result is that no orderer.block is output into the e2e directory.

Can someone tell me how to solve this?

Oct 24, 2018 in Blockchain by digger
• 27,630 points

edited Oct 25, 2018 by digger 452 views

5 answers to this question.

+1 vote
Make the following changes to the Genesis Block:

    Do not pass ORDERER_CFG_PATH=$PWD
    instead, pass the following: FABRIC_CFG_PATH=$PWD

    In the network_setup.sh script, make the same change.
    It should be: export FABRIC_CFG_PATH=$PWD
answered Oct 24, 2018 by Omkar
• 67,380 points
+1 vote

The right way to set the path is to export it like this:

export FABRIC_CFG_PATH=$PWD

or you can add the PATH at the beginning of command, like this:

FABRIC_CFG_PATH=$PWD ./bin/configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block
answered Oct 25, 2018 by Zaid
+1 vote

Maybe you're facing this error because you dont have cryptogen tool installed or because you dont have the latest version installed. To get the latest version, run the following command:

curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap-1.0.1.sh | bash

After the execution of this command, you will see a folder named bin. You have to copy these files to GOROOT like this:

cp ./bin/*  $GOROOT/bin

To check if this was successful, run the following command:

which cryptogen

It should show you the version of cryptogen tool

answered Oct 25, 2018 by Abdul
+1 vote

I faced the same error. It was working fine with my previous network but i got this error when i implemented a new network. I realized that the path in the .bashrc file was pointing to some other folder. I changed the PATH in the .bashrc file to the folder where my cryptogen tool was and then it worked fine. 

export PATH=$PATH:~/fabric-samples/network
answered Oct 25, 2018 by Prabhu
+1 vote

I got same error on Windows. 

The solution that worked for me is passing same environment variable on same line as command execution.

$ FABRIC_CFG_PATH=$PWD ./bin/configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-arti
facts/genesis.block
2017-05-24 15:56:29.811 IST [common/configtx/tool] main -> INFO 001 Loading configuration
2017-05-24 15:56:29.831 IST [msp] getMspConfig -> INFO 002 intermediate certs folder not found at [D
:\test\fabric-alpha2\release\windows-amd64\crypto-config\ordererOrganizations\example.com\msp\interm
ediatecerts]. Skipping.: [GetFileAttributesEx D:\test\fabric-alpha2\release\windows-amd64\crypto-con
fig\ordererOrganizations\example.com\msp\intermediatecerts: The system cannot find the file specifie
d.]
2017-05-24 15:56:29.855 IST [msp] getMspConfig -> INFO 003 crls folder not found at [D:\test\fabric-
alpha2\release\windows-amd64\crypto-config\ordererOrganizations\example.com\msp\intermediatecerts].
Skipping.: [GetFileAttributesEx D:\test\fabric-alpha2\release\windows-amd64\crypto-config\ordererOrg
anizations\example.com\msp\crls: The system cannot find the file specified.]
2017-05-24 15:56:29.860 IST [msp] getMspConfig -> INFO 004 MSP configuration file not found at [D:\t
est\fabric-alpha2\release\windows-amd64\crypto-config\ordererOrganizations\example.com\msp\config.ya
ml]: [GetFileAttributesEx D:\test\fabric-alpha2\release\windows-amd64\crypto-config\ordererOrganizat
ions\example.com\msp\config.yaml: The system cannot find the file specified.]
2017-05-24 15:56:29.892 IST [msp] getMspConfig -> INFO 005 intermediate certs folder not found at [D
:\test\fabric-alpha2\release\windows-amd64\crypto-config\peerOrganizations\org1.example.com\msp\inte
rmediatecerts]. Skipping.: [GetFileAttributesEx D:\test\fabric-alpha2\release\windows-amd64\crypto-c
onfig\peerOrganizations\org1.example.com\msp\intermediatecerts: The system cannot find the file spec
ified.]
2017-05-24 15:56:29.897 IST [msp] getMspConfig -> INFO 006 crls folder not found at [D:\test\fabric-
alpha2\release\windows-amd64\crypto-config\peerOrganizations\org1.example.com\msp\intermediatecerts]
. Skipping.: [GetFileAttributesEx D:\test\fabric-alpha2\release\windows-amd64\crypto-config\peerOrga
nizations\org1.example.com\msp\crls: The system cannot find the file specified.]
2017-05-24 15:56:29.904 IST [msp] getMspConfig -> INFO 007 MSP configuration file not found at [D:\t
est\fabric-alpha2\release\windows-amd64\crypto-config\peerOrganizations\org1.example.com\msp\config.
yaml]: [GetFileAttributesEx D:\test\fabric-alpha2\release\windows-amd64\crypto-config\peerOrganizati
ons\org1.example.com\msp\config.yaml: The system cannot find the file specified.]
2017-05-24 15:56:29.918 IST [msp] getMspConfig -> INFO 008 intermediate certs folder not found at [D
:\test\fabric-alpha2\release\windows-amd64\crypto-config\peerOrganizations\org2.example.com\msp\inte
rmediatecerts]. Skipping.: [GetFileAttributesEx D:\test\fabric-alpha2\release\windows-amd64\crypto-c
onfig\peerOrganizations\org2.example.com\msp\intermediatecerts: The system cannot find the file spec
ified.]
2017-05-24 15:56:29.924 IST [msp] getMspConfig -> INFO 009 crls folder not found at [D:\test\fabric-
alpha2\release\windows-amd64\crypto-config\peerOrganizations\org2.example.com\msp\intermediatecerts]
. Skipping.: [GetFileAttributesEx D:\test\fabric-alpha2\release\windows-amd64\crypto-config\peerOrga
nizations\org2.example.com\msp\crls: The system cannot find the file specified.]
2017-05-24 15:56:29.928 IST [msp] getMspConfig -> INFO 00a MSP configuration file not found at [D:\t
est\fabric-alpha2\release\windows-amd64\crypto-config\peerOrganizations\org2.example.com\msp\config.
yaml]: [GetFileAttributesEx D:\test\fabric-alpha2\release\windows-amd64\crypto-config\peerOrganizati
ons\org2.example.com\msp\config.yaml: The system cannot find the file specified.]
2017-05-24 15:56:29.936 IST [common/configtx/tool] doOutputBlock -> INFO 00b Generating genesis bloc
k
2017-05-24 15:56:29.941 IST [common/configtx/tool] doOutputBlock -> INFO 00c Writing genesis block

Genesis block was created (As described in documentation we need to ignore logs regarding intermediate certs.

answered Oct 25, 2018 by Mahesh

Related Questions In Blockchain

0 votes
1 answer

REQUEST_TIMEOUT error in Hyperledger Fabric, Linux

My docker version was 1.7. And its ...READ MORE

answered Jul 6, 2018 in Blockchain by Christine
• 15,790 points
424 views
0 votes
3 answers

Hyperledger fabcar sample fabric error: sendPeersProposal - Promise is rejected: Error: Connect Failed

Open the datasources.json file and replace the grpcs:// with grpc://. This solution worked ...READ MORE

answered Apr 30 in Blockchain by Reshma
838 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 27,630 points
67 views
+1 vote
1 answer
0 votes
1 answer

Hyperledger Fabric: "No go in PATH" error.

The error is because the go path ...READ MORE

answered Jun 27, 2018 in Blockchain by Omkar
• 67,380 points
302 views
0 votes
1 answer

Hyperledger Fabric peer command not found error.

This error occurs when the system can ...READ MORE

answered Jul 2, 2018 in Blockchain by Omkar
• 67,380 points
452 views