握手失败并发生致命错误SSL_ERROR_SSL:错误:1408F10B:SSL例程:SSL3_GET_RECORD:版本号错误

时间:2018-04-26 09:07:48

标签: hyperledger-fabric hyperledger hyperledger-composer

首先,我知道这是this link的副本,但提问者似乎不再回答了...... 所以, 当我执行composer install时出现此错误:

⠙ Installing business network. This may take a minute...E0426 10:56:40.033781775 24341 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number.

这是我的connection.json:

{
"name": "hlfv1",
"x-type": "hlfv1",
"x-commitTimeout": 300,
"version": "1.0.0",
"client": {
    "organization": "Org1",
    "connection": {
        "timeout": {
            "peer": {
                "endorser": "300",
                "eventHub": "300",
                "eventReg": "300"
            },
            "orderer": "300"
        }
    }
},
"channels": {
    "composerchannel": {
        "orderers": [
            "orderer.example.com"
        ],
        "peers": {
            "peer0.org1.example.com": {
                "endorsingPeer": true,
                "chaincodeQuery": true,
                "eventSource": true
            }
        }
    }
},
"organizations": {
    "Org1": {
        "mspid": "Org1MSP",
        "peers": [
            "peer0.org1.example.com"
        ],
        "certificateAuthorities": [
            "ca.org1.example.com"
        ]
    }
},
"orderers": {
    "orderer.example.com": {
        "url": "grpcs://<My_IP>:7050",
        "grpcOptions": {
            "ssl-target-name-override": "orderer.example.com"
        },
        "tlsCACerts": {
            "pem": "INSERT_ORDERER_CA_CERT"
        }
    }
},
"peers": {
    "peer0.org1.example.com": {
        "url": "grpcs://<My_IP>:7051",
        "eventUrl": "grpcs://<My_IP>:7053",
        "grpcOptions": {
            "ssl-target-name-override": "peer0.org1.example.com"
        },
        "tlsCACerts": {
            "pem": "INSERT_ORG1_CA_CERT"
        }
    }
},
"certificateAuthorities": {
    "ca.org1.example.com": {
        "url": "https://<My_IP>:7054",
        "caName": "ca.org1.example.com",
        "httpOptions": {
            "verify": false
        }
    }
}

}

这是我的docker-compose.yaml:

version: '2'

服务:   ca.org1.example.com:     image:hyperledger / fabric-ca:$ ARCH-1.1.0     环境:        - FABRIC_CA_HOME = / etc / hyperledger / fabric-ca-server        - FABRIC_CA_SERVER_CA_NAME = ca.org1.example.com     端口:        - “7054:7054”     命令:sh -c'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem --ca.keyfile / etc / hyperledger / fabric-ca-server-config / CA1_PRIVATE_KEY -b admin:adminpw -d'     卷:        - ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config     container_name:ca.org1.example.com   orderer.example.com:     container_name:orderer.example.com     image:hyperledger / fabric-orderer:$ ARCH-1.1.0     环境:        - ORDERER_GENERAL_LOGLEVEL = debug        - ORDERER_GENERAL_LISTENADDRESS = 0.0.0.0        - ORDERER_GENERAL_GENESISMETHOD =文件        - ORDERER_GENERAL_GENESISFILE = / etc / hyperledger / configtx / composer-genesis.block        - ORDERER_GENERAL_LOCALMSPID = OrdererMSP        - ORDERER_GENERAL_LOCALMSPDIR = / etc / hyperledger / msp / orderer / msp     working_dir:/opt/gopath/src/github.com/hyperledger/fabric     命令:orderer     端口:        - 7050:7050     卷:          - ./:/etc/hyperledger/configtx          - ./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/etc/hyperledger/msp/orderer/msp   peer0.org1.example.com:     container_name:peer0.org1.example.com     image:hyperledger / fabric-peer:$ ARCH-1.1.0     环境:        - CORE_LOGGING_LEVEL = 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_LOCALMSPID = Org1MSP        - CORE_PEER_MSPCONFIGPATH = / etc / hyperledger / peer / msp        - CORE_LEDGER_STATE_STATEDATABASE = CouchDB        - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS = couchdb:5984     working_dir:/opt/gopath/src/github.com/hyperledger/fabric     命令:peer node start     端口:        - 7051:7051        - 7052:7052        - 7053:7053     卷:          - / var / run /:/ host / var / run /          - ./:/etc/hyperledger/configtx          - ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/peer/msp          - ./crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/msp/users          - ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/peer/tls     依赖于取决于:        - orderer.example.com        - couchdb   CouchDB的:     container_name:couchdb     image:hyperledger / fabric-couchdb:$ ARCH-0.4.6     端口:        - 5984:5984     环境:       DB_URL:http://localhost:5984/member_db

我真的需要帮助。

由于

1 个答案:

答案 0 :(得分:0)

如果您在结构设置中禁用了TLS,则将所有出现的grpc更改为grpc,将https更改为http。它应该工作。 我也有同样的错误,这对我有用。