1

We are using Tuna-App to setup basicnetwork along with tuna-app, and trying to add additional peer. Here is the source code of tuna-app https://github.com/hyperledger/education/tree/master/LFS171x/fabric-material

We are able to add the Peer to the basicnetwork. We verified docker containers, all peer0, peer1, cli, ca, orderer, coughdb, coughdb2, and tuna-app-1.0 are running.

Peer0 sucessfully got added to channel with following command:

docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c mychannel -f /etc/hyperledger/configtx/channel.tx

docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer0.org1.example.com peer channel join -b mychannel.block

We are trying to add Peer1 to the same channel with command:

docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer1.org1.example.com peer channel join -b mychannel.block

it throws an error:

genesis block file not found open mychannel.block: no such file or directory

Please help me. How can we resolve this issue?

barbsan
  • 3,418
  • 11
  • 21
  • 28

3 Answers3

0

Enter the cli container: docker exec -it cli bash

In that terminal, export the required variables:

export CHANNEL_NAME=mychannel

CORE_PEER_LOCALMSPID="Org1MSP"

CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp

CORE_PEER_ADDRESS=peer1.org1.example.com:7051

Add the peer to the channel:

peer channel join -b mychannel.block

Shashank M
  • 306
  • 3
  • 11
0

Try the below commands:

docker exec peer1.org1.example.com peer channel fetch 0 mychannel.block -o orderer.example.com:7050 -c mychannel
docker exec -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@$org1.example.com/msp" peer1.org1.example-swarm.com peer channel join -b mychannel.block
double-beep
  • 5,031
  • 17
  • 33
  • 41
-1

Create channel from the CLI container. As in firstnetwork.

Because mychannel.block is available only in peer0.

You can't join the channel from peer1 since no mychannel.block file is available.

barbsan
  • 3,418
  • 11
  • 21
  • 28
Cibi
  • 1