Hyperledger Fabric Not able to create the channel Channel creation failed error

+2 votes

When I run the command

./byfn.sh -m up

I am getting the following error while creating the channel:

018-02-27 19:34:51.325 UTC [bccsp_sw] loadPrivateKey ->
ERRO 001 Failed loading private key [ec1f4a4699b91d9e6010e30aea31c0d1ba60f4e1787b84a5e03bb7aafc730b5a]: [open /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/ec1f4a4699b91d9e6010e30aea31c0d1ba60f4e1787b84a5e03bb7aafc730b5a_sk: permission denied].
2018-02-27 19:34:51.325 UTC [main] main ->
ERRO 002 Cannot run peer because error when setting up MSP of type bccsp from directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp:
KeyMaterial not found in SigningIdentityInfo
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!

How to fix this?

Nov 2, 2018 in Blockchain by digger
• 26,740 points

3 answers to this question.

+3 votes
Best answer

Seems like you have not set the right PATH. Set the Correct path of Go in environment variable.

sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt-get update
sudo apt-get install -y golang-go make
cd $GOPATH/src/github.com/hyperledger/fabric
make docker

This should work

Join our Blockchain course today to learn more about it.


answered Nov 2, 2018 by Omkar
• 69,230 points

selected May 6, 2019 by digger
+3 votes

You need to set the proper go path:

export GOPATH=$HOME/go export PATH=$PATH:$GOPATH/bin
answered May 6, 2019 by Karan
+2 votes

Hello every one. 

I have the same problem. I fixed the following way. 

sudo  chmod -R 777 path_to_first_network_folder

For example

sudo chmod -R 777 /Users/name/chapter15/fabric-samples/first-network

answered Nov 8, 2019 by Hiếu
• 180 points
Thanks a lot! I have upvoted your answer..
When i try to run sample fabcar application in fabric, i get the following error... kindly help

do i need to set anygo path variable??

cse@system:~/hyperledger/fabric-samples/fabcar$ ./startFabric.sh

# don't rewrite paths for Windows Git Bash users

docker-compose -f docker-compose.yml down
Stopping peer0.org1.example.com ... done
Stopping couchdb                ... done
Stopping ca.example.com         ... done
Stopping orderer.example.com    ... done
Removing peer0.org1.example.com ... done
Removing couchdb                ... done
Removing ca.example.com         ... done
Removing orderer.example.com    ... done
Removing network net_basic

docker-compose -f docker-compose.yml up -d ca.example.com orderer.example.com peer0.org1.example.com couchdb
Creating couchdb ... done
Creating peer0.org1.example.com ... done
Creating couchdb ...
Creating ca.example.com ...
Creating peer0.org1.example.com ...
docker ps -a
CONTAINER ID        IMAGE                        COMMAND                  CREATED             STATUS                  PORTS                                            NAMES
799ee31c64f0        hyperledger/fabric-peer      "peer node start"        1 seconds ago       Up Less than a second>7051/tcp,>7053/tcp   peer0.org1.example.com
39b9bbde86f1        hyperledger/fabric-ca        "sh -c 'fabric-ca-ser"   1 seconds ago       Up Less than a second>7054/tcp                           ca.example.com
109b5b884582        hyperledger/fabric-couchdb   "tini -- /docker-entr"   1 seconds ago       Up Less than a second   4369/tcp, 9100/tcp,>5984/tcp       couchdb
78dbe2187844        hyperledger/fabric-orderer   "orderer"                1 seconds ago       Up Less than a second>7050/tcp                           orderer.example.com

# wait for Hyperledger Fabric to start
# incase of errors when running later commands, issue export FABRIC_START_TIMEOUT=<larger number>

# Create the channel
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
flag provided but not defined: -e
See 'docker exec --help'.
very good!!!!

Related Questions In Blockchain

0 votes
2 answers
0 votes
2 answers
+2 votes
4 answers

"failed to create new connection context deadline exceeded." error in Hyperledger Fabric

Try remove previous docker containers(have mentioned the ...READ MORE

answered Apr 24, 2019 in Blockchain by Kiran
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 26,740 points
+1 vote
1 answer
+2 votes
3 answers

Hyperledger Fabric: Peer Connection error: Failed obtaining connection: Could not connect to any of the endpoints.

 You can extend your /etc/hosts file and make orderer.example.com domain name ...READ MORE

answered Nov 13, 2018 in Blockchain by Omkar
• 69,230 points
0 votes
1 answer

Hyperledger Fabric:Promise is rejected:Error:Failed to deserialize creator identity,The supplied identity is not valid.

 This error happens because basic-network/docker-compose.yaml has CA ...READ MORE

answered Nov 14, 2018 in Blockchain by Omkar
• 69,230 points
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP