I'm running Hyperledger on an ubuntu virtual machine. After installing hyperledger prerequisites and binaries, when I try to execute the 'peer' command, it returns:
[main] main -> ERRO 001 Fatal error when initializing core config :
error when reading core config file: Unsupported Config Type "".
On my machine (MAC) the command runs perfectly and displays the command usage description.
Any ideas? I tried with 3 virtual machines and all result to to the same error.
Please refer to this link.
Possible solutions :
Set Path FABRIC_CFG_PATH=$PWD
Error in following configuration
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp CORE_PEER_ADDRESS=peer0.org1.example.com:7051 CORE_PEER_LOCALMSPID="Org1MSP" CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
There is typo mistake in your code.
Make sure FABRIC_CFG_PATH environment variable is set to a directory. In the Hyperledger Fabric docker containers, it is usually set to /etc/hyperledger/fabric.
Related
While generating the configtx peer block for Hyperledger Fabric Channel Creation in Amazon Managed Blockchain
Facing an error
CRIT 002 Error reading configuration: Unsupported Config Type ""
ERRO 003 Could not find configtx.yaml. Please make sure that FABRIC_CFG_PATH or --configPath is set to a path which contains configtx.yaml
Even though I tried export FABRIC_CFG_PATH=$PWD still facing same error.
Make sure you defined correctly the Fabric config directory. In terminal in the root folder of you HLF configuration just use the command:
export FABRIC_CFG_PATH=${PWD}/<folder-with-configtx.yaml-and-crypto-config.yaml>
This link gives tutorial on debugging javascript chaincode in hyperledger fabric. I was able to debug my chaincode following it but recently I updated to fabric 1.2 and the peer channel list command
CORE_PEER_LOCALMSPID=Org1MSP CORE_PEER_MSPCONFIGPATH=/home/bct/fabric-samples/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp peer channel list
fails with:
Fatal error when initializing core config : error when reading core
config file: Unsupported Config Type ""
I tried to go back to v1.1 but the problem persists. Can someone give me the complete list of configuration steps that may have been missed in tutorial video (which I was following) that make the debugging chaincode work.
Thanks in advance.
Finally, figured out that fabric sdk (https://github.com/hyperledger/fabric-sdk-node) has to be downloaded and configured before following the video tutorial in the question.
./createPeerAdminCard.sh
Development only script for Hyperledger Fabric control
Running 'createPeerAdminCard.sh'
FABRIC_VERSION is set to 'hlfv11'
FABRIC_START_TIMEOUT is unset, assuming 15 (seconds)
Using composer-cli at v0.19.5
Successfully created business network card file to
Output file: /tmp/PeerAdmin#hlfv1.card
Command succeeded
Error: No connection type provided, probably because the connection profile has no 'x-type' property defined.
Command failed
You might be using an older version of the card (Source:- https://github.com/hyperledger/composer/issues/4007)
I am trying to deploy chaincode in devmod on my ubuntu machine. I am following this tutorial.
The issue is when I use this command : CORE_CHAINCODE_LOGLEVEL=debug CORE_PEER_ADDRESS=localhost:7052 npm start
it shows the following error:
2018-09-20T16:27:18.292Z ERROR [lib/handler.js] uncaughtException: The "peer.address" program argument must be set to a legitimate value of <host>:<port>
Full logs can be found here:
https://hastebin.com/arerozesad.sql
I am following this tutorial:
https://hyperledger-fabric.readthedocs.io/en/v1.0.6/peer-chaincode-devmode.html
First, I hope you are using Fabric v1.1 or later as Node.js chaincode is not supported in v1.0.x.
The instructions you listed are for running Go chaincode.
For Node.js chaincode, your command should look like
CORE_CHAINCODE_ID_NAME="mycc:v0" node mycc.js --peer.address grpc://localhost:7052
You should be able to replace node mycc.js with npm start as well.
See https://github.com/hyperledger/fabric-chaincode-node#test-nodejs-chaincode for more information.
I am trying to configure hyperledger composer with multi peer. But when I have started the hyperledger fabric, getting following response.
amandai#ubuntultop:~/block chain/fabric-samples V1/ess-multipeer-sample /network$ ./byfn.sh -m up
Starting with channel 'essplchannel' and CLI timeout of '10000' seconand CLI delay of '3' seconds
Continue (y/n)? y
proceeding ...
WARNING: The COMPOSE_PROJECT_NAME variable is not set. Defaulting to a blank string.
Creating network "network_amsnetwork" with the default driver
Creating orderer.esspl.com ...
Creating peer0.ezone.esspl.com ...
Creating peer0.essbbsr.esspl.com ...
Creating ca_peerEssbbsr ...
Creating ca_peerezone ...
Creating peer0.ezone.esspl.com
Creating orderer.esspl.com
Creating ca_peerezone
Creating peer0.ezone.esspl.com ... done
Creating ca_peerEssbbsr ... done
Error response from daemon: No such container: cli
amandai#ubuntultop:~/block chain/fabric-samples V1/ess-multipeer-sample/network$
I have used COMPOSE_FILE=docker-compose.yaml instead of COMPOSE_FILE=docker-compose-cli.yaml due to this error came. After modifying it working as expected.
Is it possible your error may be captured by the answers posted here -> Error when try to instantiate chain-code on Hyperledger Fabric - perhaps making sure there's no 'space' in your directory name (as shown above) may help / setting the variable explicitly?
I had a similar error recently and it related to having some conflicting containers already active. In a section of the following it explains how to remove potentially conflicting containers which I followed to remove my occurrence of this issue. https://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html
upgrade the docker-compose or reinstall it
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
It solves the problem for me.
In my case, docker-composer was missing. Installing it solved the issue.