Cannot run peer because cannot init crypto

扶醉桌前 提交于 2019-11-28 14:10:40

This is a problem with mingw64 which is messing with the filepaths. The solution is to set the following environment variable before running startFabric.sh :

export MSYS_NO_PATHCONV=1

A fix was just submitted to fabric to do that for you so if you pull the latest version from the master branch it should work. Otherwise, just set that variable and that should solve your problem.

Arnaud

The problem is incorrect path to certificates (look for windows path string between /fabric and /etc) /etc/hyperledger/fabric/C:/ProgramFiles/Git/etc/hyperledger/msp/users/Admin@org1.example.com/msp

You can try next :

  • add path to certificate as environment variable to docker compose file at peer section
  • start network using docker-compose -f "path_to_file"
  • manually run instructions in startFabric.sh at peer and cli.
  • then you can successfully run node query.js for testing network work

The double // in the path will fix this. Update in all the places where docker exec command used for e.g. MSPCONFIGPATH=//etc/hyperledger....

Also certificates have to be generated before you could get your network running

Before you run the fabcar-samples, I think that you have to execute some steps from the "Building Your First Network" chapter. It seems that you haven't got the required certificates to start the network. Also, you should generate the genesis block, the channel configuration transaction and the anchor peers.

You can do it by executing the ./byfn.sh -m generate command. For more information: http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html#generate-network-artifacts

Could someone explain further what this means:

"add path to certificate as environment variable to docker compose file at peer section"

What certificate?

@Vlad

Do this ./byfn.sh -m down first and then run ./byfn.sh generate then ./byfn.sh -m up

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!