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

前端 未结 2 1821
猫巷女王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:51

    I also faced the same problem and in my case, the issue was that I made some changes to the local directory files and apparently those changes were not successfully reflected while mounting those files back into the docker containers. What fixed the problem for me was

    docker volume rm $(docker volume ls)

    I restarted the network again and didn't see any more certificate errors. Worth a try.

    0 讨论(0)
  • 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
    
    0 讨论(0)
提交回复
热议问题