ERRO 0b1 TLS 握手失败,错误远程错误:tls: bad certificate server=Orderer remoteaddress=54.1.1.1:40057

时间:2021-02-22 06:03:35

标签: amazon-web-services hyperledger-fabric tls1.2

HLF 1.4.6 版本

我在启用部署在分布式 AWS 网络上的区块链系统的备份时遇到以下提到的错误,其中我有五个虚拟机 3 用于组织 1 用于订购者 1 用于 SDK。以下提到的错误出现在 orderer.network.com 中。

<块引用>

2021-02-22 04:51:59.576 UTC [core.comm] ServerHandshake -> 错误 0b1 TLS 握手失败,错误远程错误:tls: bad certificate 服务器=订购者远程地址=54.156.31.171:40054

但是仍然可以从 CLI 和 SDK 对区块链进行读写操作。但是这个错误仍然在后台,这让我很担心。

为在一个 VM 上运行的第一个 OU 添加 docker_compose_CLI 代码,为另外 2 个 VM 中的其他 2 个 OU 添加类似代码

version: '2'

volumes:
  peer0.notary.veritable.com:
  ca.notary.veritable.com:

networks:
  veritable-network:

services:
  ca.notary.veritable.com:
    image: hyperledger/fabric-ca
    environment:
      - FABRIC_CA_SERVER_TLS_ENABLED=true
      - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
      - FABRIC_CA_SERVER_CA_NAME=ca.notary.veritable.com
      - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.notary.veritable.com-cert.pem
      - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/5ac95636048f76831391e7112c75fe9200ef2d42a41234b8bab_sk
    ports:
      - "7054:7054"
    command: sh -c 'fabric-ca-server start -b admin:adminpw'
    volumes:
      - ./crypto-config/peerOrganizations/notary.veritable.com/ca/:/etc/hyperledger/fabric-ca-server-config
      - ./data/ca-notary/:/etc/hyperledger/fabric-ca-server/
    container_name: ca.notary.veritable.com
    networks:
      - veritable-network

  couchdb0:
    container_name: couchdb0
    image: hyperledger/fabric-couchdb
    environment:
      - COUCHDB_USER=adminN0
      - COUCHDB_PASSWORD=a1adminN0
    ports:
      - "5984:5984"
    networks:
      - veritable-network


  peer0.notary.veritable.com:
    container_name: peer0.notary.veritable.com
    extends:
      file:  base/docker-compose-base.yaml
      service: peer0.notary.veritable.com
    environment:
      - CORE_LEDGER_STATE_STATEDATABASE=CouchDB
      - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb0:5984
      - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=adminN0
      - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=a1adminN0
    networks:
      - veritable-network
    depends_on:
      - couchdb0

  cli:
    container_name: cli
    image: hyperledger/fabric-tools:1.4.6
    tty: true
    stdin_open: true
    environment:
      - SYS_CHANNEL=$SYS_CHANNEL
      - GOPATH=/opt/gopath
      - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
      - FABRIC_LOGGING_SPEC=DEBUG
      - FABRIC_LOGGING_SPEC=INFO
      - CORE_PEER_ID=cli
      - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:1.4
      - CORE_PEER_ADDRESS=peer0.notary.veritable.com:7051
      - CORE_PEER_LOCALMSPID=notaryMSP
      - CORE_PEER_TLS_ENABLED=true
      - CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/notary.veritable.com/peers/peer0.notary.veritable.com/tls/server.crt
      - CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/notary.veritable.com/peers/peer0.notary.veritable.com/tls/server.key
      - CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/notary.veritable.com/peers/peer0.notary.veritable.com/tls/ca.crt
      - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/notary.veritable.com/users/Admin@notary.veritable.com/msp
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
    command: /bin/bash
    volumes:
        - /var/run/:/host/var/run/
        - ./../veritable-chaincode/:/opt/gopath/src/github.com/chaincode
        - ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
        - ./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/
        - ./channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts
    depends_on:
      - peer0.notary.veritable.com
      - peer1.notary.veritable.com
      - ca.notary.veritable.com
    networks:
      - veritable-network




Adding docker_compose_etcdraft file code which is running on 2nd VM

version: '2'

volumes:
  orderer.veritable.com:
  orderer2.veritable.com:
  orderer3.veritable.com:

networks:
  veritable-network:

services:
  orderer.veritable.com:
    extends:
      file: base/peer-base.yaml
      service: orderer-base
    container_name: orderer.veritable.com
    networks:
    - veritable-network
    volumes:
        - ./channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
        - ./crypto-config/ordererOrganizations/veritable.com/orderers/orderer.veritable.com/msp:/var/hyperledger/orderer/msp
        - ./crypto-config/ordererOrganizations/veritable.com/orderers/orderer.veritable.com/tls/:/var/hyperledger/orderer/tls
        - orderer.veritable.com:/var/hyperledger/production/orderer
        - ./data/orderer:/var/hyperledger/production/orderer
    ports:
    - 7050:7050


  orderer2.veritable.com:
    extends:
      file: base/peer-base.yaml
      service: orderer-base
    container_name: orderer2.veritable.com
    networks:
    - veritable-network
    volumes:
        - ./channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
        - ./crypto-config/ordererOrganizations/veritable.com/orderers/orderer2.veritable.com/msp:/var/hyperledger/orderer/msp
        - ./crypto-config/ordererOrganizations/veritable.com/orderers/orderer2.veritable.com/tls/:/var/hyperledger/orderer/tls
        - orderer2.veritable.com:/var/hyperledger/production/orderer
        - ./data/orderer2:/var/hyperledger/production/orderer
    ports:
    - 8050:7050

  orderer3.veritable.com:
    extends:
      file: base/peer-base.yaml
      service: orderer-base
    container_name: orderer3.veritable.com
    networks:
    - veritable-network
    volumes:
        - ./channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
        - ./crypto-config/ordererOrganizations/veritable.com/orderers/orderer3.veritable.com/msp:/var/hyperledger/orderer/msp
        - ./crypto-config/ordererOrganizations/veritable.com/orderers/orderer3.veritable.com/tls/:/var/hyperledger/orderer/`enter code here`tls
        - orderer3.veritable.com:/var/hyperledger/production/orderer
        - ./data/orderer3:/var/hyperledger/production/orderer
    ports:
    - 9050:7050

0 个答案:

没有答案