1

Working with the examples provided by the composer tools, what I get from the following link.

https://github.com/hyperledger/composer-tools/tree/master/packages/fabric-dev-servers

I was able to run the downloadFabric.sh file and get the docker images that I need to start the fabric network, after this, I run the startFabric.sh file and after a while, everything was working fine.

Now, I am trying to create my custom fabric network and what I did was edit the yaml files to use my configuration to generate the certs, the artifacts, and the docker container images.

I successfully change the files and start the network.

Then I proceed to create a channel and then join all the peers or at least the anchor peers to the channel, but doing this I got an error.

The first peer was able to join the channel but the second peer fails. This is the error that I got.

2018-03-13 23:13:31.737 UTC [main] main -> ERRO 001 Cannot run peer because cannot init crypto, missing /etc/hyperledger/fabric/users/Admin@manufacture.example.com/msp folder

I don't know what this error means, but looking for an answer I found the following article with a possible solution.

Cannot run peer because cannot init crypto

I tried but no luck.

At this point, I don't know what could be the real reason for this error.

If you want to replicate this problem just download the following repository and run 2 files.

https://github.com/osvaldovega/blockchain-fabric

  1. downloadFabric.sh
  2. startFabric.sh

The startFabric.sh is a file that I customize to do all this for me and then I don't have to execute the commands manually.

If you want you can check the startFabric.sh script and see what the functions execute.

The first command that I execute to join the first peers is this.

docker exec -e CORE_PEER_ADDRESS=peer0.portal.example.com:7051 -e CORE_PEER_LOCALMSPID='PortalMSP' -e CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt -e CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/users/Admin@portal.example.com/msp peer0.portal.example.com peer channel join -b composerchannel.block

This command works fine, however when I try to join the second peer for the second member is when I got the error.

The command is pretty similar.

docker exec -e CORE_PEER_ADDRESS=peer0.manufacture.example.com:7051 -e CORE_PEER_LOCALMSPID='ManufactureMSP' -e CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt -e CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/users/Admin@manufacture.example.com/msp peer0.portal.example.com peer channel join -b composerchannel.block

I know that the peer in this case should be peer0.manufacture.example.com however if I change it to this peer the error message is.

2018-03-14 16:29:50.122 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2018-03-14 16:29:50.122 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2018-03-14 16:29:50.124 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized Error: genesis block file not found open composerchannel.block: no such file or directory

But if I use the peer peer0.portal.example.com which is the peer that I used to create the channel I get this original error.

2018-03-14 16:32:08.995 UTC [main] main -> ERRO 001 Cannot run peer because cannot init crypto, missing /etc/hyperledger/fabric/users/Admin@manufacture.example.com/msp folder

Thanks.

  • This looks like an error with your volume mapping for the containers - look at the Volumes: lines in your docker-compose yaml files. – R Thatcher Mar 14 '18 at 09:54
  • I already checked it, and the volume paths are ok, I don't know if the environment variables has something to do. For example: docker exec -e CORE_PEER_ADDRESS=peer0.manufacture.example.com:7051 -e CORE_PEER_LOCALMSPID='ManufactureMSP' -e CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt -e CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/users/Admin@manufacture.example.com/msp peer0.portal.example.com peer channel join -b composerchannel.block – Osvaldo Vega Mar 14 '18 at 16:21
  • Did you try to login into the corresponding docker container and check if the needed volumes are actually mounted? – nmanh Mar 26 '18 at 14:54

0 Answers0