Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Hyperledger fabric Hyperledger结构:grpc:Server.Serve无法完成来自“的安全握手”;172.27.0.1:55920“远程错误:tls:错误的证书_Hyperledger Fabric - Fatal编程技术网

Hyperledger fabric Hyperledger结构:grpc:Server.Serve无法完成来自“的安全握手”;172.27.0.1:55920“远程错误:tls:错误的证书

Hyperledger fabric Hyperledger结构:grpc:Server.Serve无法完成来自“的安全握手”;172.27.0.1:55920“远程错误:tls:错误的证书,hyperledger-fabric,Hyperledger Fabric,在启用tls的vm上尝试部署hyperledger fabric 1.2网络时,我遇到以下错误。如果不启用tls,它可以正常工作 来自订购方的日志 2019-02-06 07:21:48.629 UTC[grpc]Printf->DEBU 32c grpc: Server.Serve无法从完成安全握手 “172.28.0.1:60654”:远程错误:tls:错误证书2019-02-06 07:21:49.631 UTC[grpc]Printf->DEBU 32d grpc:Server.serv

在启用tls的vm上尝试部署hyperledger fabric 1.2网络时,我遇到以下错误。如果不启用tls,它可以正常工作

来自订购方的日志

2019-02-06 07:21:48.629 UTC[grpc]Printf->DEBU 32c grpc: Server.Serve无法从完成安全握手 “172.28.0.1:60654”:远程错误:tls:错误证书2019-02-06 07:21:49.631 UTC[grpc]Printf->DEBU 32d grpc:Server.service失败 要从“172.28.0.1:60658”完成安全握手:远程错误: tls:坏证书2019-02-06 07:21:51.242 UTC[grpc]打印F-> DEBU 32e grpc:服务器。Serve无法从完成安全握手 “172.28.0.1:60662”:远程错误:tls:错误证书

来自对等方的日志

2019-02-06 07:05:39.616 UTC[deliveryClient]try->WARN 048 Got 错误:无法连接到任何终结点:[10.200.10.97:7050] ,第7次尝试。在1分钟内重试2019-02-06 07:06:46.619 UTC [ConnProducer]新建连接->错误049无法连接到 10.200.10.97:7050,错误:上下文截止日期超过2019-02-06 07:06:46.619 UTC[deliveryClient]connect->ERRO 04a获取失败 连接:无法连接到任何端点: [10.200.10.97:7050]2019-02-06 07:06:46.619 UTC[deliveryClient]尝试 ->警告04b出现错误:在尝试8次时,无法连接到任何终结点:[10.200.10.97:7050]。在2m8s 2019-02-06中重试 07:08:57.622 UTC[ConnProducer]新建连接->错误04c失败 连接到10.200.10.97:7050,错误:超出上下文截止日期 2019-02-06 07:08:57.622 UTC[deliveryClient]connect->ERRO 04d 获取连接失败:无法连接到任何 端点:[10.200.10.97:7050]2019-02-06 07:08:57.622 UTC [deliveryClient]try->WARN 04e出现错误:无法连接到任何 端点的数目:[10.200.10.97:7050],尝试9次。重试 4m16s 2019-02-06 07:13:16.625 UTC[ConnProducer]新连接-> ERRO 04f连接到10.200.10.97:7050失败,错误:上下文 截止日期已超过2019-02-06 07:13:16.625 UTC[交付客户] 连接->ERRO 050获取连接失败:无法连接到 任何端点:[10.200.10.97:7050]2019-02-06 07:13:16.625 UTC [deliveryClient]尝试->警告051出现错误:无法连接到任何 端点的数目:[10.200.10.97:7050],尝试10次。重试 8m32s 2019-02-06 07:21:51.628 UTC[ConnProducer]新连接-> ERRO 052无法连接到10.200.10.97:7050,错误:上下文 截止日期超过2019-02-06 07:21:51.628 UTC[交付客户] 连接->ERRO 053获取连接失败:无法连接到 任何端点:[10.200.10.97:7050]2019-02-06 07:21:51.628 UTC [deliveryClient]尝试->警告054出现错误:无法连接到任何 端点的数目:[10.200.10.97:7050],尝试11次。重试 17m4s

我看过针对类似错误提供的解决方案,但似乎没有任何效果

下面是我的docker撰写文件

version: '2'

services:   ca.org1.example.com:
    image: hyperledger/fabric-ca:1.2.1
    environment:
      - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
      - FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com
      - FABRIC_CA_SERVER_TLS_ENABLED=true
      - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-tls/tlsca.org1.example.com-cert.pem
      - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-tls/0cb4817b6da79bc68fad2fa8ce4f87589e30f42bf942e05000743da51177c9c1_sk
    ports:
      - "7054:7054"
    command: sh -c 'fabric-ca-server start -b admin:adminpw -d --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem
--ca.keyfile /etc/hyperledger/fabric-ca-server-config/7500db7dc4fa2cd8be9c4808e24d1e0aa9afc96e046e6b8f91c570823dfbd787_sk'
    volumes:
      - ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
      - ./crypto-config/peerOrganizations/org1.example.com/tlsca/:/etc/hyperledger/fabric-ca-server-tls
    container_name: ca.org1.example.com

  orderer.example.com:
    container_name: orderer.example.com
    image: hyperledger/fabric-orderer:1.2.1
    environment:
      - ORDERER_GENERAL_LOGLEVEL=debug
      - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
      - ORDERER_GENERAL_LISTENPORT=7050
      - CONFIGTX_ORDERER_ADDRESSES=[127.0.0.1:7050]
      - ORDERER_HOST=orderer.example.com
      - ORDERER_GENERAL_GENESISMETHOD=file
      - ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/composer-genesis.block
      - ORDERER_GENERAL_LOCALMSPID=OrdererMSP
      - ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/msp/orderer/msp
      - ORDERER_GENERAL_TLS_ENABLED=true
      - ORDERER_GENERAL_TLS_PRIVATEKEY=/etc/hyperledger/msp/orderer/tls/server.key
      - ORDERER_GENERAL_TLS_CERTIFICATE=/etc/hyperledger/msp/orderer/tls/server.crt
      - ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/msp/orderer/tls/ca.crt]
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric
    command: orderer
    ports:
      - 7050:7050
    volumes:
        - ./:/etc/hyperledger/configtx
        - ./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/:/etc/hyperledger/msp/orderer

  peer0.org1.example.com:
    container_name: peer0.org1.example.com
    image: hyperledger/fabric-peer:1.2.1
    extra_hosts: 
      - "orderer.example.com:10.200.10.97"
    environment:
      - CORE_LOGGING_PEER=debug
      - CORE_CHAINCODE_LOGGING_LEVEL=DEBUG
      - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
      - CORE_PEER_ID=peer0.org1.example.com
      - CORE_PEER_ADDRESS=peer0.org1.example.com:7051
      - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=composer_default
      - CORE_PEER_NETWORKID=composer_default
      - CORE_PEER_LOCALMSPID=Org1MSP
      - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/peer/msp
      - CORE_PEER_TLS_ENABLED=true
      - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/peer/tls/server.key
      - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/peer/tls/server.crt
      - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/peer/tls/ca.crt
      - CORE_LEDGER_STATE_STATEDATABASE=CouchDB
      - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb.org1.example.com:5984
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric
    command: peer node start
    ports:
      - 7051:7051
      - 7053:7053
    volumes:
        - /var/run/:/host/var/run/
        - ./:/etc/hyperledger/configtx
        - ./crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/msp/users
        - ./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls:/etc/hyperledger/orderer/tls
        - ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/peer/msp
        - ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/peer/tls
    depends_on:
      - orderer.example.com
      - couchdb.org1.example.com

  couchdb.org1.example.com:
    container_name: couchdb.org1.example.com
    image: hyperledger/fabric-couchdb:0.4.10
    ports:
      - 5984:5984
    environment:
      DB_URL: http://localhost:5984/member_db