0
votes

I have one error with Explorer 3.7 and fabric version 1.2.0.

The console display error:


    Sync process is started for the network : [dev] and client : [client]
    >>>>>>>>>>>>>>>>>>>>
    Error :  [ 'Failed to connect client peer, please check the configuration and peer status' ]
    >>>>>>>>>>>>>>>>>>>>

The blockchain-explorer/logs/sync/app/app.log display error


    [2018-09-28 13:41:10.692] [DEBUG] FabricClient - Channel genesis hash for channel [mychannel] >> e520121a6edb2794eb85505d5f5319d29286acb43d0280e0f0f75a130e79889c
    [2018-09-28 13:41:10.692] [DEBUG] FabricClient - Initialized channel >> mychannel
    [2018-09-28 13:41:10.723] [DEBUG] FabricClient - Set client [client-1] default orderer as  >> grpcs://orderer.yx.com:7050
    [2018-09-28 13:41:10.724] [DEBUG] FabricClient - Admin peer Not found for grpcs://peer0.org1.yx.com:7051
    [2018-09-28 13:49:22.980] [DEBUG] Sync - Start synchronizer

My config.json file is :


    {
      "network-configs": {
        "dev": {
          "version": "1.0",
          "clients": {
            "client": {
              "tlsEnable": true,
              "organization": "Org1MSP",
              "channel": "mychannel",
              "credentialStore": {
                "path": "./tmp/credentialStore_Org1/credential",
                "cryptoStore": {
                  "path": "./tmp/credentialStore_Org1/crypto"
                }
              }
            }
          },
          "channels": {
            "mychannel": {
              "peers": {
                "peer0.org1.yx.com": {}
              },
              "connection": {
                "timeout": {
                  "peer": {
                    "endorser": "6000",
                    "eventHub": "6000",
                    "eventReg": "6000"
                  }
                }
              }
            }
          },
          "organizations": {
            "Org1MSP": {
              "mspid": "Org1MSP",
              "fullpath": false,
              "adminPrivateKey": {
                "path": 
                  "/root/blockchain-explorer/examples/dockerConfig/crypto/peerOrganizations/org1.yx.com/users/[email protected]/msp/keystore"
              },
              "signedCert": {
                "path": 
                  "/root/blockchain-explorer/examples/dockerConfig/crypto/peerOrganizations/org1.yx.com/users/[email protected]/msp/signcerts"
              }
            },
            "OrdererMSP": {
              "mspid": "OrdererMSP",
              "adminPrivateKey": {
                "path": "/root/blockchain-explorer/examples/dockerConfig/crypto/ordererOrganizations/yx.com/users/[email protected]/msp/keystore"
              }
            }
          },
          "peers": {
            "peer0.org1.yx.com": {
              "tlsCACerts": {
                "path": "/root/blockchain-explorer/examples/dockerConfig/crypto/peerOrganizations/org1.yx.com/peers/peer0.org1.yx.com/tls/ca.crt"
              },
              "url": "grpcs://peer0.org1.yx.com:7051",
              "eventUrl": "grpcs://peer0.org1.yx.com:7053",
              "grpcOptions": {
                "ssl-target-name-override": "peer0.org1.yx.com"
              }
            }
          },
          "orderers": {
            "orderer.yx.com": {
              "url": "grpcs://orderer.yx.com:7050"
            }
          }
        },
        "configtxgenToolPath": "/root/blockchain-explorer/bin",
        "license": "Apache-2.0"
      }
    }

hosts file in CentOS7 is


    192.168.2.220   orderer.yx.com
    192.168.2.221   cli.yx.com
    192.168.2.222   peer0.org1.yx.com
    192.168.2.223   peer1.org1.yx.com
    192.168.2.224   peer0.org2.yx.com

2
I am facing a similar error. None of the following answers solved the issue. Could you please post an update if there is a fixKarthikeyan

2 Answers

1
votes

You could try change url, eventUrl of peers, orderer to ip address, like this:

"peer0.org1.yx.com": {
          "tlsCACerts": {
            "path": "/root/blockchain-explorer/examples/dockerConfig/crypto/peerOrganizations/org1.yx.com/peers/peer0.org1.yx.com/tls/ca.crt"
          },
          "url": "grpcs://192.168.2.222:7051",
          "eventUrl": "grpcs://192.168.2.222:7053",
          "grpcOptions": {
            "ssl-target-name-override": "peer0.org1.yx.com"
          }
        }
0
votes

make sure that CORE_PEER_GOSSIP_EXTERNALENDPOINT exists in your docker compose file for peers and also grpc and grpcs configured correctly.