TLS handshake failed with error remote error: tls: bad certificate server=Orderer

前端 未结 2 1831
猫巷女王i
猫巷女王i 2020-12-11 11:13

I am trying to set up a hyperledger fabric on a VM manually. I have generated all the artifacts and configured the orderer.yaml and core.yaml. I ha

2条回答
  •  盖世英雄少女心
    2020-12-11 11:59

    The issue is that the TLS server certificate used by the orderer does not have a SAN matching "127.0.0.1". You can add "localhost" and/or "127.0.0.1" to you TLS certificates by using a custom crypto-config.yaml when generating your artifacts with cryptogen:

    # ---------------------------------------------------------------------------
    # "OrdererOrgs" - Definition of organizations managing orderer nodes
    # ---------------------------------------------------------------------------
    OrdererOrgs:
      # ---------------------------------------------------------------------------
      # Orderer
      # ---------------------------------------------------------------------------
      - Name: Orderer
        Domain: example.com
        EnableNodeOUs: false
    
        # ---------------------------------------------------------------------------
        # "Specs" - See PeerOrgs below for complete description
        # ---------------------------------------------------------------------------
        Specs:
          - Hostname: orderer
            SANS:
              - "localhost"
              - "127.0.0.1"
    
    # ---------------------------------------------------------------------------
    # "PeerOrgs" - Definition of organizations managing peer nodes
    # ---------------------------------------------------------------------------
    PeerOrgs:
      # ---------------------------------------------------------------------------
      # Org1
      # ---------------------------------------------------------------------------
      - Name: org1
        Domain: org1.example.com
        EnableNodeOUs: true
        Template:
          Count: 2
          SANS:
             - "localhost"
             - "127.0.0.1"
        Users:
          Count: 1
    
      - Name: org2
        Domain: org2.example.com
        EnableNodeOUs: false
        Template:
          Count: 2
          SANS:
             - "localhost"
             - "127.0.0.1"
        Users:
          Count: 1
    

提交回复
热议问题