Hyperledger Fabric Cant create channel on peer

0 votes

 I want to create the channel using command as follows:

export FABRIC_CFG_PATH=$PWD
export CHANNEL_NAME=my_channel
export CORE_PEER_LOCALMSPID="Org1MSP"

export CORE_PEER_TLS_ROOTCERT_FILE=crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt

export CORE_PEER_MSPCONFIGPATH=crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp

export CORE_PEER_ADDRESS=127.0.0.1:7001

peer channel create -o 127.0.0.1:7040 -c $CHANNEL_NAME -f channel-artifacts/channel.tx --tls true --cafile $ORDERER_CA >&log.txt

I am getting this error:

Error: Error connecting due to  rpc error: code = Internal desc = connection error: desc = "transport: authentication handshake failed: x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs"

Oct 26, 2018 in Blockchain by slayer
• 29,370 points
1,336 views

1 answer to this question.

0 votes

Add host entries to your /etc/hosts should resolve your issue:

127.0.0.1       localhost orderer peer0.org1.example.com peer0.org2.example.com

And then make sure to use the hostnames rather than IP addresses:

export FABRIC_CFG_PATH=$PWD
export CHANNEL_NAME=my_channel
export CORE_PEER_LOCALMSPID="Org1MSP"

export CORE_PEER_TLS_ROOTCERT_FILE=crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt

export CORE_PEER_MSPCONFIGPATH=crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp

export CORE_PEER_ADDRESS=peer0.org1.example.com:7001

peer channel create -o orderer:7040 -c $CHANNEL_NAME -f channel-artifacts/channel.tx --tls true --cafile $ORDERER_CA >&log.txt
answered Oct 26, 2018 by Omkar
• 69,220 points

Related Questions In Blockchain

+1 vote
0 answers
0 votes
1 answer

How to join a peer to a channel in Hyperledger Fabric?

When you run the command: peer channel create ...READ MORE

answered Jul 31, 2018 in Blockchain by digger
• 26,740 points
2,089 views
0 votes
1 answer
0 votes
1 answer

Channel fails to create Hyperledger Fabric

Hi, @Sara, I guess this error is happening ...READ MORE

answered May 26, 2020 in Blockchain by Gitika
• 65,770 points
2,103 views
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
1,456 views
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,010 views
+1 vote
1 answer
0 votes
3 answers

Hyperledger fabric: Cant connect peer to channel

Open the hosts file: $ gedit /etc/hosts And add the IP ...READ MORE

answered May 8, 2019 in Blockchain by John
4,381 views
+2 votes
3 answers
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP