Welcome to the new Linux Foundation Forum!

Lab7: join peers from org2 to channel

After starting containers of peer0 and peer1 from org2 they should join the channel: "allarewelcome"
This is supposed to happen through the CLI container.

peer channel fetch config Org2AddedConfig.pb \
-o orderer.example.com:7050 -c allarewelcome

After fetching the cfg:

peer channel join -b allarewelcome.block

but this does not work, because there is no allarewelcome.block in the cli container.

I then joined them by going into bash from peer0 and peer1 and type:

peer channel fetch oldest allarewelcome.block -c allarewelcome \ --orderer orderer.example.com:7050
peer channel join -b allarewelcome.block

Is this wrong? What does the "fetch config" supposed to do?

thx in advance.

Comments

  • NiklaskkkkNiklaskkkk Posts: 85
    edited February 15

    @atpc said:
    After starting containers of peer0 and peer1 from org2 they should join the channel: "allarewelcome"
    This is supposed to happen through the CLI container.

    peer channel fetch config Org2AddedConfig.pb \
    -o orderer.example.com:7050 -c allarewelcome

    After fetching the cfg:

    peer channel join -b allarewelcome.block

    but this does not work, because there is no allarewelcome.block in the cli container.

    I then joined them by going into bash from peer0 and peer1 and type:

    peer channel fetch oldest allarewelcome.block -c allarewelcome \ --orderer orderer.example.com:7050
    peer channel join -b allarewelcome.block

    Is this wrong? What does the "fetch config" supposed to do?

    thx in advance.

    Hi @atpc , seems like there is a small typo in the PDF document, as the correct command should be "peer channel join -b Org2AddedConfig.block" from the CLI.

    Well done finding a way around anyway!

    Here is some more information for you regarding the fetch command, from the official documentation (https://hyperledger-fabric.readthedocs.io/en/release-1.4/commands/peerchannel.html)

    Fetch a specified block, writing it to a file.

    Usage:
    peer channel fetch <newest|oldest|config|(number)> [outputfile] [flags]

    Flags:
    --bestEffort Whether fetch requests should ignore errors and return blocks on a best effort basis
    -c, --channelID string In case of a newChain command, the channel ID to create. It must be all lower case, less than 250 characters long and match the regular expression: [a-z][a-z0-9.-]*
    -h, --help help for fetch

    Global Flags:
    --cafile string Path to file containing PEM-encoded trusted certificate(s) for the ordering endpoint
    --certfile string Path to file containing PEM-encoded X509 public key to use for mutual TLS communication with the orderer endpoint
    --clientauth Use mutual TLS when communicating with the orderer endpoint
    --connTimeout duration Timeout for client to connect (default 3s)
    --keyfile string Path to file containing PEM-encoded private key to use for mutual TLS communication with the orderer endpoint
    -o, --orderer string Ordering service endpoint
    --ordererTLSHostnameOverride string The hostname override to use when validating the TLS connection to the orderer.
    --tls Use TLS when communicating with the orderer endpoint

Sign In or Register to comment.