How to join a peer to a channel in Hyperledger Fabric

0 votes

I am creating a network my following the steps on the Hyperledger Fabric documents.

I am running the following command:

peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/channel.tx --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

and I get the following response:

2018-02-26 12:59:03.263 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP

2018-02-26 12:59:03.263 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity

2018-02-26 12:59:03.271 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized

2018-02-26 12:59:03.273 UTC [msp] GetLocalMSP -> DEBU 004 Returning existing local MSP

2018-02-26 12:59:03.274 UTC [msp] GetDefaultSigningIdentity -> DEBU 005 Obtaining default signing identity

2018-02-26 12:59:03.274 UTC [msp] GetLocalMSP -> DEBU 006 Returning existing local MSP

2018-02-26 12:59:03.274 UTC [msp] GetDefaultSigningIdentity -> DEBU 007 Obtaining default signing identity

2018-02-26 12:59:03.274 UTC [msp/identity] Sign -> DEBU 008 Sign: plaintext: 0A8C060A074F7267314D53501280062D...53616D706C65436F6E736F727469756D 

2018-02-26 12:59:03.274 UTC [msp/identity] Sign -> DEBU 009 Sign: digest: 17C4AA38A89CFCCCEC5FF13E7F51BC4FF9C23F72E900454F30AE8ABB0A338DF8 

2018-02-26 12:59:03.274 UTC [msp] GetLocalMSP -> DEBU 00a Returning existing local MSP

2018-02-26 12:59:03.274 UTC [msp] GetDefaultSigningIdentity -> DEBU 00b Obtaining default signing identity

2018-02-26 12:59:03.275 UTC [msp] GetLocalMSP -> DEBU 00c Returning existing local MSP

2018-02-26 12:59:03.275 UTC [msp] GetDefaultSigningIdentity -> DEBU 00d Obtaining default signing identity

2018-02-26 12:59:03.275 UTC [msp/identity] Sign -> DEBU 00e Sign: plaintext: 0AC3060A1508021A06089789D0D40522...B4DCD533B8C5DA311196A1277CDC1204 

2018-02-26 12:59:03.275 UTC [msp/identity] Sign -> DEBU 00f Sign: digest: A1BC4CF64450BD26E28303C321E1E43658EF4C377E055121537863F4624BBB5E 

2018-02-26 12:59:03.385 UTC [msp] GetLocalMSP -> DEBU 010 Returning existing local MSP

2018-02-26 12:59:03.386 UTC [msp] GetDefaultSigningIdentity -> DEBU 011 Obtaining default signing identity

2018-02-26 12:59:03.386 UTC [msp] GetLocalMSP -> DEBU 012 Returning existing local MSP

2018-02-26 12:59:03.386 UTC [msp] GetDefaultSigningIdentity -> DEBU 013 Obtaining default signing identity

2018-02-26 12:59:03.386 UTC [msp/identity] Sign -> DEBU 014 Sign: plaintext: 0AC3060A1508021A06089789D0D40522...03C6A8CB79E812080A021A0012021A00 

2018-02-26 12:59:03.386 UTC [msp/identity] Sign -> DEBU 015 Sign: digest: 1803C7715AEA9E1C5DD8D1BEECF639C03233911A3AC437AF83114C91F52EB0D5 

2018-02-26 12:59:03.390 UTC [channelCmd] readBlock -> DEBU 016 Got status: &{NOT_FOUND}

2018-02-26 12:59:03.391 UTC [msp] GetLocalMSP -> DEBU 017 Returning existing local MSP

2018-02-26 12:59:03.391 UTC [msp] GetDefaultSigningIdentity -> DEBU 018 Obtaining default signing identity

2018-02-26 12:59:03.402 UTC [channelCmd] InitCmdFactory -> INFO 019 Endorser and orderer connections initialized

2018-02-26 12:59:03.604 UTC [msp] GetLocalMSP -> DEBU 01a Returning existing local MSP

2018-02-26 12:59:03.604 UTC [msp] GetDefaultSigningIdentity -> DEBU 01b Obtaining default signing identity

2018-02-26 12:59:03.604 UTC [msp] GetLocalMSP -> DEBU 01c Returning existing local MSP

2018-02-26 12:59:03.604 UTC [msp] GetDefaultSigningIdentity -> DEBU 01d Obtaining default signing identity

2018-02-26 12:59:03.604 UTC [msp/identity] Sign -> DEBU 01e Sign: plaintext: 0AC3060A1508021A06089789D0D40522...10B3951C861712080A021A0012021A00 

2018-02-26 12:59:03.604 UTC [msp/identity] Sign -> DEBU 01f Sign: digest: 1E71D72F8D5B50472EA46BC372866789252A02AEDC4D5299CD18FD6A0A08DF2F 

2018-02-26 12:59:03.608 UTC [channelCmd] readBlock -> DEBU 020 Received block: 0

2018-02-26 12:59:03.612 UTC [main] main -> INFO 021 Exiting.....

I cant find the block id too. And also tell me how to connect the peer to channel. Thanks in advance.

Jul 31, 2018 in Blockchain by slayer
• 29,370 points
2,107 views

1 answer to this question.

0 votes

When you run the command:

peer channel create -o pguxjkxkx.pgkdgsvrk.lgius.uk2.gsr.awhoer.net:7050 -c mychannel -f ./channel-artifacts/channel.tx --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/ggmoznah.lgius.uk2.gsr.awhoer.net/hyperledger/fabric/peer/crypto/ordererOrganizations/pgkdgsvrk.lgius.uk2.gsr.awhoer.net/orderers/pguxjkxkx.pgkdgsvrk.lgius.uk2.gsr.awhoer.net/msp/tlscacerts/tlsca.example.com-cert.pem

this command will return a genesis block named mychannel.block. To join the peer to channel, you need to run the following command:

peer channel join -b mychannel.block

To find out the block id you can use the -ls command.

answered Jul 31, 2018 by digger
• 26,740 points

Related Questions In Blockchain

0 votes
1 answer
+15 votes
5 answers
+1 vote
2 answers

How to return value from a chaincode in Hyperledger Fabric?

Hyperledger Fabric supports only 2 types of ...READ MORE

answered Jun 13, 2018 in Blockchain by Perry
• 17,100 points
3,000 views
0 votes
1 answer

How to store picture(s) in a hyperledger blockchain channel

You can hold images as encrypted characters ...READ MORE

answered Jun 16, 2018 in Blockchain by charlie_brown
• 7,720 points
1,366 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,470 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,037 views
+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer

How to control visibility of assets in Hyperledger Fabric?

you can use proof of Authority consensus ...READ MORE

answered Jul 10, 2018 in Blockchain by digger
• 26,740 points
822 views
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