Hyperledger Fabric Explorer config.json handshake error

2.9k Views Asked by At

Hi guys I'm using Hyperledger Fabric network and Blockchain explorer. I tested explorer for "first-network" and I succeeded. After that because I wanted to build multi-machine Fabric network, I referred to https://medium.com/@wahabjawed/hyperledger-fabric-on-multiple-hosts-a33b08ef24f And to do the test I ran all docker container(CA, ORDERER, 2PEERS, CLI) into local machine and edited config.json file as below

"network-configs": {
"network-1": {
  "version": "1.0",
  "clients": {
    "client-1": {
      "tlsEnable": true,
      "organization": "Org1MSP",
      "channel": "mychannel",
      "credentialStore": {
        "path": "./tmp/credentialStore_Org1/credential",
        "cryptoStore": {
          "path": "./tmp/credentialStore_Org1/crypto"
        }
      }
    }
  },
  "channels": {
    "mychannel": {
      "peers": {
        "peer0.org1.example.com": {},
        "peer1.org1.example.com": {}
      },
      "connection": {
        "timeout": {
          "peer": {
            "endorser": "6000",
            "eventHub": "6000",
            "eventReg": "6000"
          }
        }
      }
    }
  },
  "organizations": {
    "Org1MSP": {
      "mspid": "Org1MSP",
      "fullpath": false,
      "adminPrivateKey": {
        "path":
          "/home/ubuntu/fabric-samples/Build-Multi-Host-Network-Hyperledger/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/keystore"
      },
      "signedCert": {
        "path":
          "/home/ubuntu/fabric-samples/Build-Multi-Host-Network-Hyperledger/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp/signcerts"
      }
    },
    "OrdererMSP": {
      "mspid": "OrdererMSP",
      "adminPrivateKey": {
        "path":
          "/home/ubuntu/fabric-samples/Build-Multi-Host-Network-Hyperledger/crypto-config/ordererOrganizations/example.com/users/[email protected]/msp/keystore"
      }
    }
  },
  "peers": {
    "peer0.org1.example.com": {
      "tlsCACerts": {
        "path":
          "/home/ubuntu/fabric-samples/Build-Multi-Host-Network-Hyperledger/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
      },
      "url": "grpcs://localhost:8051",
      "eventUrl": "grpcs://localhost:8053",
      "grpcOptions": {
        "ssl-target-name-override": "peer0.org1.example.com"
      }
    },
    "peer1.org1.example.com": {
      "tlsCACerts": {
        "path":
          "/home/ubuntu/fabric-samples/Build-Multi-Host-Network-Hyperledger/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt"
      },
      "url": "grpcs://localhost:9051",
      "eventUrl": "grpcs://localhost:9053",
      "grpcOptions": {
        "ssl-target-name-override": "peer1.org1.example.com"
      }
    }
  },
  "orderers": {
    "orderer.example.com": {
      "url": "grpcs://localhost:7050"
    }
  }
},
"network-2": {}
},
"configtxgenToolPath": "/home/ubuntu/fabric-samples/bin",
"license": "Apache-2.0"
}

And I got error. there is error log below

postgres://hppoc:[email protected]:5432/fabricexplorer E0925 17:00:41.804738425 14014 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. E0925 17:00:42.805918378 14014 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. E0925 17:00:44.589563663 14014 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. [31merror[39m: [Remote.js]: Error: Failed to connect before the deadline [31merror[39m: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to connect before the deadline at checkState (/home/ubuntu/blockchain-explorer/node_modules/grpc/src/client.js:838:16)


Error : Failed to connect client peer, please check the configuration and peer status Info : Explorer will continue working with only DB data


Please open web browser to access :http://localhost:8080/

pid is 14014

<<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>> Error : [ 'Default client peer is down and no channel details available database' ] E0925 17:00:46.797189353 14014 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number. Received kill signal, shutting down gracefully <<<<<<<<<<<<<<<<<<<<<<<<<< Closing explorer >>>>>>>>>>>>>>>>>>>>> Closed out connections

Is there anybody who knows how to solve this problem?

1

There are 1 best solutions below

0
On

I was facing the same problem as you post when I tried to connect Hyperledger Explorer to basic-network example.

I found this post in link below and it can solve my problem, hope it can help you too.

Unable to setup hyperledger explorer with one node (like basic network example)