hyperledger-fabrichyperledger-explorerhyperledger-fabric-sdk-js

Issue in starting up Hyperledger Explorer


I have created a multipeer network. I have created 3 orgs StancOrg , StancOrgA ,StancOrgB.Here's the configtx.yaml file.

       Organizations:
        - &StancOrg
           Name: StancOrgMSP
           ID: StancOrgMSP
           MSPDir: crypto-config/peerOrganizations/peerStanc.com/msp
           AnchorPeers:
              - Host: HOSTA.peerStanc.com
                Port: 7051

       - &StancOrgA
            Name: StancOrgAMSP
            ID: StancOrgAMSP
            MSPDir: crypto-config/peerOrganizations/peerStancA.com/msp
            AnchorPeers:
               - Host: HOSTA.peerStancA.com
                 Port: 7051

       - &StancOrgB
            Name: StancOrgBMSP
            ID: StancOrgBMSP
            MSPDir: crypto-config/peerOrganizations/peerStancB.com/msp
            AnchorPeers:
                - Host: HOSTA.peerStancB.com
                  Port: 7051

       - &OrdererOrg
             Name: StancOrderer
             ID: StancOrdererMSP
             MSPDir: crypto-config/ordererOrganizations/StancOrdr.com/msp

    Capabilities:
        Global: &ChannelCapabilities
            V1_1: true
        Orderer: &OrdererCapabilities
            V1_1: true
       Application: &ApplicationCapabilities
            V1_2: true

   Application: &ApplicationDefaults
       Organizations:

   Orderer: &OrdererDefaults
        OrdererType: solo
        Addresses:
             - StancOrderer.StancOrdr.com:7050
        BatchTimeout: 0.1s
        BatchSize:
            MaxMessageCount: 10
            AbsoluteMaxBytes: 99 MB
            PreferredMaxBytes: 512 KB
       Kafka:
           Brokers:
            - 127.0.0.1:9092
           Organizations:

   Profiles:

I have created a masterchannel on my network.

I am trying to setup Hyperledger Explorer for the created fabric network. I have also updated the config.json based on the created fabric network.

{
  "network-configs": {
    "network-1": {
      "version": "1.0",
      "clients": {
        "client-1": {
          "tlsEnable": false,
          "organization": "StancOrgMSP",
          "channel": "masterchannel",
          "credentialStore": {
            "path": "./tmp/credentialStore_Org1/credential",
            "cryptoStore": {
              "path": "./tmp/credentialStore_Org1/crypto"
            }
          }
        }
      },
      "channels": {
        "masterchannel": {
          "peers": {
            "HOSTA.peerStanc.com": {}
          },
          "connection": {
            "timeout": {
              "peer": {
                "endorser": "6000",
                "eventHub": "6000",
                "eventReg": "6000"
              }
            }
          }
        }
      },
      "organizations": {
        "StancOrgMSP": {
          "mspid": "StancOrgMSP",
          "fullpath": false,
          "adminPrivateKey": {
            "path": "~/Documents/Application/fabric-multipeer/crypto-config/peerOrganizations/peerStanc.com/users/Admin@peerStanc.com/msp/keystore"
          },
          "signedCert": {
            "path": "~/Documents/Application/fabric-multipeer/crypto-config/peerOrganizations/peerStanc.com/users/Admin@peerStanc.com/msp/signcerts"
          }
        },
        "StancOrgAMSP": {
          "mspid": "StancOrgAMSP",
          "adminPrivateKey": {
            "path": "~/Documents/Application/fabric-multipeer/crypto-config/peerOrganizations/peerStancA.com/users/Admin@peerStanc.com/msp/keystore"
          }
        },
        "StancOrgBMSP": {
          "mspid": "StancOrgBMSP",
          "adminPrivateKey": {
            "path": "~/Documents/Application/fabric-multipeer/crypto-config/peerOrganizations/peerStancB.com/users/Admin@peerStanc.com/msp/keystore"
          }
        },
        "StancOrdererMSP": {
          "mspid": "StancOrdererMSP",
          "adminPrivateKey": {
            "path": "~/Documents/Application/fabric-multipeer/crypto-config/ordererOrganizations/StancOrdr.com/users/Admin@StancOrdr.com/msp/keystore"
          }
        }
      },
      "peers": {
        "HOSTA.peerStanc.com": {
          "tlsCACerts": {
            "path": "~/Documents/Application/fabric-multipeer/crypto-config/peerOrganizations/peerStanc.com/peers/HOSTA.peerStanc.com/tls/ca.crt"
          },
          "url": "grpc://localhost:7051",
          "eventUrl": "grpc://localhost:7053",
          "grpcOptions": {
            "ssl-target-name-override": "HOSTA.peerStanc.com"
          }
        },
        "HOSTA.peerStancA.com": {
          "url": "grpc://localhost:8051"
        },
        "HOSTA.peerStancB.com": {
          "url": "grpc://localhost:9051"
        }
      },
      "orderers": {
        "StancOrderer.StancOrdr.com": {
          "url": "grpc://localhost:7050"
        }
      }
    },
    "network-2": {}
  },
  "configtxgenToolPath": "~/Documents/Application/bin",
  "license": "Apache-2.0"
}

I got the successful build.But it fails to start the explorer application.

I got the follwing error.

postgres://hppoc:password@127.0.0.1:5432/fabricexplorer

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

(node:10952) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead
<<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>>
Error :  [ 'Default client peer is down and no channel details available database' ]
Received kill signal, shutting down gracefully
Closed out connections

I have provided tls as false and updated grpc. And also the network is up on specified ports.

Help is appreciated.


Solution

  • Paths should be set using the full path /home/user/yourPath instead of the shortcut ~/yourPath.

    Anyway, remember always to check the app logs and not just the console since sometimes they show much more information.