Hyperledger Fabric docker-compose CORE_PEER_GOSSIP_BOOTSTRAP











up vote
1
down vote

favorite












I have some organizations with more than 2 peers. When I was editing the docker-compose-base.yaml, I am not sure how to define CORE_PEER_GOSSIP_BOOTSTRAP. Below is what I did, but the log showed that the peer fails to connect to the gossip peers. What is the correct way to do so? Thank you in advance!



docker-compose-base.yaml



peer0.caseManager.snts.com:
container_name: peer0.caseManager.snts.com
extends:
file: peer-base.yaml
service: peer-base
environment:
- CORE_PEER_ID=peer0.caseManager.snts.com
- CORE_PEER_ADDRESS=peer0.caseManager.snts.com:7051
- CORE_PEER_GOSSIP_BOOTSTRAP=[peer1.caseManager.snts.com:7051 peer2.caseManager.snts.com:7051]
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.caseManager.snts.com:7051
- CORE_PEER_LOCALMSPID=CaseManagerMSP
volumes:
- /var/run/:/host/var/run/
- ../crypto-config/peerOrganizations/caseManager.snts.com/peers/peer0.caseManager.snts.com/msp:/etc/hyperledger/fabric/msp
- ../crypto-config/peerOrganizations/caseManager.snts.com/peers/peer0.caseManager.snts.com/tls:/etc/hyperledger/fabric/tls
- peer0.caseManager.snts.com:/var/hyperledger/production
ports:
- 9051:7051
- 9053:7053


log of "docker-compose -p docker-compose.yaml up"



peer0.caseManager.snts.com    | 2018-11-15 16:21:18.420 UTC [gossip/discovery] func1 -> WARN 023 Could not connect to {peer2.caseManager.snts.com:7051]   peer2.caseManager.snts.com:7051] <nil> <nil>} : context deadline exceeded
peer0.caseManager.snts.com | 2018-11-15 16:21:18.420 UTC [gossip/discovery] func1 -> WARN 024 Could not connect to {[peer1.caseManager.snts.com:7051 [peer1.caseManager.snts.com:7051 <nil> <nil>} : context deadline exceeded









share|improve this question


























    up vote
    1
    down vote

    favorite












    I have some organizations with more than 2 peers. When I was editing the docker-compose-base.yaml, I am not sure how to define CORE_PEER_GOSSIP_BOOTSTRAP. Below is what I did, but the log showed that the peer fails to connect to the gossip peers. What is the correct way to do so? Thank you in advance!



    docker-compose-base.yaml



    peer0.caseManager.snts.com:
    container_name: peer0.caseManager.snts.com
    extends:
    file: peer-base.yaml
    service: peer-base
    environment:
    - CORE_PEER_ID=peer0.caseManager.snts.com
    - CORE_PEER_ADDRESS=peer0.caseManager.snts.com:7051
    - CORE_PEER_GOSSIP_BOOTSTRAP=[peer1.caseManager.snts.com:7051 peer2.caseManager.snts.com:7051]
    - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.caseManager.snts.com:7051
    - CORE_PEER_LOCALMSPID=CaseManagerMSP
    volumes:
    - /var/run/:/host/var/run/
    - ../crypto-config/peerOrganizations/caseManager.snts.com/peers/peer0.caseManager.snts.com/msp:/etc/hyperledger/fabric/msp
    - ../crypto-config/peerOrganizations/caseManager.snts.com/peers/peer0.caseManager.snts.com/tls:/etc/hyperledger/fabric/tls
    - peer0.caseManager.snts.com:/var/hyperledger/production
    ports:
    - 9051:7051
    - 9053:7053


    log of "docker-compose -p docker-compose.yaml up"



    peer0.caseManager.snts.com    | 2018-11-15 16:21:18.420 UTC [gossip/discovery] func1 -> WARN 023 Could not connect to {peer2.caseManager.snts.com:7051]   peer2.caseManager.snts.com:7051] <nil> <nil>} : context deadline exceeded
    peer0.caseManager.snts.com | 2018-11-15 16:21:18.420 UTC [gossip/discovery] func1 -> WARN 024 Could not connect to {[peer1.caseManager.snts.com:7051 [peer1.caseManager.snts.com:7051 <nil> <nil>} : context deadline exceeded









    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I have some organizations with more than 2 peers. When I was editing the docker-compose-base.yaml, I am not sure how to define CORE_PEER_GOSSIP_BOOTSTRAP. Below is what I did, but the log showed that the peer fails to connect to the gossip peers. What is the correct way to do so? Thank you in advance!



      docker-compose-base.yaml



      peer0.caseManager.snts.com:
      container_name: peer0.caseManager.snts.com
      extends:
      file: peer-base.yaml
      service: peer-base
      environment:
      - CORE_PEER_ID=peer0.caseManager.snts.com
      - CORE_PEER_ADDRESS=peer0.caseManager.snts.com:7051
      - CORE_PEER_GOSSIP_BOOTSTRAP=[peer1.caseManager.snts.com:7051 peer2.caseManager.snts.com:7051]
      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.caseManager.snts.com:7051
      - CORE_PEER_LOCALMSPID=CaseManagerMSP
      volumes:
      - /var/run/:/host/var/run/
      - ../crypto-config/peerOrganizations/caseManager.snts.com/peers/peer0.caseManager.snts.com/msp:/etc/hyperledger/fabric/msp
      - ../crypto-config/peerOrganizations/caseManager.snts.com/peers/peer0.caseManager.snts.com/tls:/etc/hyperledger/fabric/tls
      - peer0.caseManager.snts.com:/var/hyperledger/production
      ports:
      - 9051:7051
      - 9053:7053


      log of "docker-compose -p docker-compose.yaml up"



      peer0.caseManager.snts.com    | 2018-11-15 16:21:18.420 UTC [gossip/discovery] func1 -> WARN 023 Could not connect to {peer2.caseManager.snts.com:7051]   peer2.caseManager.snts.com:7051] <nil> <nil>} : context deadline exceeded
      peer0.caseManager.snts.com | 2018-11-15 16:21:18.420 UTC [gossip/discovery] func1 -> WARN 024 Could not connect to {[peer1.caseManager.snts.com:7051 [peer1.caseManager.snts.com:7051 <nil> <nil>} : context deadline exceeded









      share|improve this question













      I have some organizations with more than 2 peers. When I was editing the docker-compose-base.yaml, I am not sure how to define CORE_PEER_GOSSIP_BOOTSTRAP. Below is what I did, but the log showed that the peer fails to connect to the gossip peers. What is the correct way to do so? Thank you in advance!



      docker-compose-base.yaml



      peer0.caseManager.snts.com:
      container_name: peer0.caseManager.snts.com
      extends:
      file: peer-base.yaml
      service: peer-base
      environment:
      - CORE_PEER_ID=peer0.caseManager.snts.com
      - CORE_PEER_ADDRESS=peer0.caseManager.snts.com:7051
      - CORE_PEER_GOSSIP_BOOTSTRAP=[peer1.caseManager.snts.com:7051 peer2.caseManager.snts.com:7051]
      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.caseManager.snts.com:7051
      - CORE_PEER_LOCALMSPID=CaseManagerMSP
      volumes:
      - /var/run/:/host/var/run/
      - ../crypto-config/peerOrganizations/caseManager.snts.com/peers/peer0.caseManager.snts.com/msp:/etc/hyperledger/fabric/msp
      - ../crypto-config/peerOrganizations/caseManager.snts.com/peers/peer0.caseManager.snts.com/tls:/etc/hyperledger/fabric/tls
      - peer0.caseManager.snts.com:/var/hyperledger/production
      ports:
      - 9051:7051
      - 9053:7053


      log of "docker-compose -p docker-compose.yaml up"



      peer0.caseManager.snts.com    | 2018-11-15 16:21:18.420 UTC [gossip/discovery] func1 -> WARN 023 Could not connect to {peer2.caseManager.snts.com:7051]   peer2.caseManager.snts.com:7051] <nil> <nil>} : context deadline exceeded
      peer0.caseManager.snts.com | 2018-11-15 16:21:18.420 UTC [gossip/discovery] func1 -> WARN 024 Could not connect to {[peer1.caseManager.snts.com:7051 [peer1.caseManager.snts.com:7051 <nil> <nil>} : context deadline exceeded






      docker docker-compose hyperledger-fabric hyperledger blockchain






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 15 at 17:00









      lmc1913

      183




      183
























          2 Answers
          2






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          From a peer's perspective, the Bootstrap peer is another peer from the same Organization, who it can reach out to during bootstrap and get some necessary info to get communication going. (see here)



          Your setup looks correct, and its perfectly plausible that your Peer0 started up earlier than Peer1 and Peer2 and was unable to find these during startup, but that's not out of ordinary. Did you end up having any error? If not, this looks like normal operation.






          share|improve this answer























          • So can the peers still know each other after bootstrap, like in the normal app operations?
            – lmc1913
            Nov 16 at 1:03










          • Btw if I hide the log, it is all running ok
            – lmc1913
            Nov 16 at 1:17










          • From what you have shared, yes, they should know each other. It should be visible in the logs too. And as you said there were no errors, I think you can ignore these warning messages, as they most probably have reconciled eventually.
            – adnan.c
            Nov 16 at 14:43












          • And if this answer helped you, please consider up-voting it or selecting it as the correct answer. :)
            – adnan.c
            Nov 16 at 14:46


















          up vote
          0
          down vote













          - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.caseManager.snts.com:7051 peer2.caseManager.snts.com:7051






          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53324477%2fhyperledger-fabric-docker-compose-core-peer-gossip-bootstrap%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote



            accepted










            From a peer's perspective, the Bootstrap peer is another peer from the same Organization, who it can reach out to during bootstrap and get some necessary info to get communication going. (see here)



            Your setup looks correct, and its perfectly plausible that your Peer0 started up earlier than Peer1 and Peer2 and was unable to find these during startup, but that's not out of ordinary. Did you end up having any error? If not, this looks like normal operation.






            share|improve this answer























            • So can the peers still know each other after bootstrap, like in the normal app operations?
              – lmc1913
              Nov 16 at 1:03










            • Btw if I hide the log, it is all running ok
              – lmc1913
              Nov 16 at 1:17










            • From what you have shared, yes, they should know each other. It should be visible in the logs too. And as you said there were no errors, I think you can ignore these warning messages, as they most probably have reconciled eventually.
              – adnan.c
              Nov 16 at 14:43












            • And if this answer helped you, please consider up-voting it or selecting it as the correct answer. :)
              – adnan.c
              Nov 16 at 14:46















            up vote
            0
            down vote



            accepted










            From a peer's perspective, the Bootstrap peer is another peer from the same Organization, who it can reach out to during bootstrap and get some necessary info to get communication going. (see here)



            Your setup looks correct, and its perfectly plausible that your Peer0 started up earlier than Peer1 and Peer2 and was unable to find these during startup, but that's not out of ordinary. Did you end up having any error? If not, this looks like normal operation.






            share|improve this answer























            • So can the peers still know each other after bootstrap, like in the normal app operations?
              – lmc1913
              Nov 16 at 1:03










            • Btw if I hide the log, it is all running ok
              – lmc1913
              Nov 16 at 1:17










            • From what you have shared, yes, they should know each other. It should be visible in the logs too. And as you said there were no errors, I think you can ignore these warning messages, as they most probably have reconciled eventually.
              – adnan.c
              Nov 16 at 14:43












            • And if this answer helped you, please consider up-voting it or selecting it as the correct answer. :)
              – adnan.c
              Nov 16 at 14:46













            up vote
            0
            down vote



            accepted







            up vote
            0
            down vote



            accepted






            From a peer's perspective, the Bootstrap peer is another peer from the same Organization, who it can reach out to during bootstrap and get some necessary info to get communication going. (see here)



            Your setup looks correct, and its perfectly plausible that your Peer0 started up earlier than Peer1 and Peer2 and was unable to find these during startup, but that's not out of ordinary. Did you end up having any error? If not, this looks like normal operation.






            share|improve this answer














            From a peer's perspective, the Bootstrap peer is another peer from the same Organization, who it can reach out to during bootstrap and get some necessary info to get communication going. (see here)



            Your setup looks correct, and its perfectly plausible that your Peer0 started up earlier than Peer1 and Peer2 and was unable to find these during startup, but that's not out of ordinary. Did you end up having any error? If not, this looks like normal operation.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 16 at 15:27

























            answered Nov 15 at 20:37









            adnan.c

            471112




            471112












            • So can the peers still know each other after bootstrap, like in the normal app operations?
              – lmc1913
              Nov 16 at 1:03










            • Btw if I hide the log, it is all running ok
              – lmc1913
              Nov 16 at 1:17










            • From what you have shared, yes, they should know each other. It should be visible in the logs too. And as you said there were no errors, I think you can ignore these warning messages, as they most probably have reconciled eventually.
              – adnan.c
              Nov 16 at 14:43












            • And if this answer helped you, please consider up-voting it or selecting it as the correct answer. :)
              – adnan.c
              Nov 16 at 14:46


















            • So can the peers still know each other after bootstrap, like in the normal app operations?
              – lmc1913
              Nov 16 at 1:03










            • Btw if I hide the log, it is all running ok
              – lmc1913
              Nov 16 at 1:17










            • From what you have shared, yes, they should know each other. It should be visible in the logs too. And as you said there were no errors, I think you can ignore these warning messages, as they most probably have reconciled eventually.
              – adnan.c
              Nov 16 at 14:43












            • And if this answer helped you, please consider up-voting it or selecting it as the correct answer. :)
              – adnan.c
              Nov 16 at 14:46
















            So can the peers still know each other after bootstrap, like in the normal app operations?
            – lmc1913
            Nov 16 at 1:03




            So can the peers still know each other after bootstrap, like in the normal app operations?
            – lmc1913
            Nov 16 at 1:03












            Btw if I hide the log, it is all running ok
            – lmc1913
            Nov 16 at 1:17




            Btw if I hide the log, it is all running ok
            – lmc1913
            Nov 16 at 1:17












            From what you have shared, yes, they should know each other. It should be visible in the logs too. And as you said there were no errors, I think you can ignore these warning messages, as they most probably have reconciled eventually.
            – adnan.c
            Nov 16 at 14:43






            From what you have shared, yes, they should know each other. It should be visible in the logs too. And as you said there were no errors, I think you can ignore these warning messages, as they most probably have reconciled eventually.
            – adnan.c
            Nov 16 at 14:43














            And if this answer helped you, please consider up-voting it or selecting it as the correct answer. :)
            – adnan.c
            Nov 16 at 14:46




            And if this answer helped you, please consider up-voting it or selecting it as the correct answer. :)
            – adnan.c
            Nov 16 at 14:46












            up vote
            0
            down vote













            - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.caseManager.snts.com:7051 peer2.caseManager.snts.com:7051






            share|improve this answer

























              up vote
              0
              down vote













              - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.caseManager.snts.com:7051 peer2.caseManager.snts.com:7051






              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.caseManager.snts.com:7051 peer2.caseManager.snts.com:7051






                share|improve this answer












                - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.caseManager.snts.com:7051 peer2.caseManager.snts.com:7051







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 16 at 13:53









                nekia

                148




                148






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53324477%2fhyperledger-fabric-docker-compose-core-peer-gossip-bootstrap%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to change which sound is reproduced for terminal bell?

                    Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

                    Can I use Tabulator js library in my java Spring + Thymeleaf project?