Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2022-08-13 09:01:17.971 UTC 0001 ERRO [main] InitCmd -> Fatal error when initializing core config : FABRIC_CFG_PATH /etc/hyperledger/peercfg does not exist #814

Open
451735773 opened this issue Aug 13, 2022 · 4 comments

Comments

@451735773
Copy link

When I use the latest version of fabric2.4, I try to add a new peer under rog1, and then add a new container in docker compose. However, an error is reported when I start it. Does anyone tell me the reason and how to solve it?
image
image

@ArpanaGupta
Copy link

ArpanaGupta commented Sep 12, 2022

Hello,

I also ran into same issue while testing addOrg functionality under fabric-samples/test-network.
The problem location:
FABRIC_CFG_PATH=/etc/hyperledger/peercfg

Actually, etc/hyperledger/peercfg is not mapped to any volume on local machine. So, if we map this location to a location in our local env and it should have core.yaml file present (Information of the new peer that is to be added), then it works.
Before creating container for peer, do make sure you have your relevant certs present under mapped msp folder.

Hope that helps.

@osazeejedi
Copy link

Hello,

i ran into this error while trying to install fabric-chaincode-evm on fabric 2.4...

can someone help with this
Screenshot 2022-09-14 at 13 15 52

@ArpanaGupta
Copy link

ArpanaGupta commented Sep 14, 2022

Can you check your docker compose file which has service to create peer node container.
As we set env variable FABRIC_CFG_PATH at the time of container creation.
There may be a
- FABRIC_CFG_PATH=/etc/hyperledger/peercfg under environment section of peer node service.
We need to map the "/etc/hyperledger/peercfg" to a location in host machine that has core.yaml.

For your reference, similar way setting fabric config path can be seen in docker compose files in fabric-samples.
There, we have 2 sets of compose file. one is base compose file where under peer container service FABRIC_CFG_PATH as /etc/hyperledger/peercfg is set as env variables.
And other extension/child compose file that has mapping of "/etc/hyperledger/peercfg" to an actual location on the host machine.
You can refer to compose files present in
"https://github.com/hyperledger/fabric-samples/tree/main/test-network/addOrg3/compose"

  • Base Compose file = compose-org3.yaml
  • Child Compose file = docker/docker-compose-org3.yaml
  • And docker/peercfg/core.yaml is also present under same parent directory

Then we use following command to create our containers
docker-compose -f base_compose_file -f child_compose_file up -d

@kangkang333
Copy link

I also ran into this error, but I am a little confused about the above answer, I don't know how to solve it operational

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants