Issue in creating multiple peers in hyperledger explorer

假如想象 提交于 2019-12-23 04:53:42

问题


I am trying to setup hyperledger explorer for my fabric network. I have 3 Orgs with one peer in each.

Network Config:-

     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

Based on it I have updated the explorer config file.

{
  "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.peerStancA.com": {},
            "HOSTA.peerStanc.com": {},
            "HOSTA.peerStancB.com": {}
          },
          "connection": {
            "timeout": {
              "peer": {
                "endorser": "6000",
                "eventHub": "6000",
                "eventReg": "6000"
              }
            }
          }
        }
      },
      "organizations": {
        "StancOrgMSP": {
          "mspid": "StancOrgMSP",
          "fullpath": false,
          "adminPrivateKey": {
            "path": "/home/user/Documents/Application/fabric-multipeer/crypto-config/peerOrganizations/peerStanc.com/users/Admin@peerStanc.com/msp/keystore"
          },
          "signedCert": {
            "path": "/home/user/Documents/Application/fabric-multipeer/crypto-config/peerOrganizations/peerStanc.com/users/Admin@peerStanc.com/msp/signcerts"
          }
        },
        "StancOrgAMSP": {
          "mspid": "StancOrgAMSP",
          "fullpath": false,
          "adminPrivateKey": {
            "path": "/home/user/Documents/Application/fabric-multipeer/crypto-config/peerOrganizations/peerStancA.com/users/Admin@peerStancA.com/msp/keystore"
          },
          "signedCert": {
            "path": "/home/user/Documents/Application/fabric-multipeer/crypto-config/peerOrganizations/peerStancA.com/users/Admin@peerStancA.com/msp/signcerts"
          }
        },
        "StancOrgBMSP": {
          "mspid": "StancOrgBMSP",
          "fullpath": false,
          "adminPrivateKey": {
            "path": "/home/user/Documents/Application/fabric-multipeer/crypto-config/peerOrganizations/peerStancB.com/users/Admin@peerStancB.com/msp/keystore"
          },
          "signedCert": {
            "path": "/home/user/Documents/Application/fabric-multipeer/crypto-config/peerOrganizations/peerStancB.com/users/Admin@peerStancB.com/msp/signcerts"
          }
        },
        "StancOrdererMSP": {
          "mspid": "StancOrdererMSP",
          "fullpath": false,
          "adminPrivateKey": {
            "path": "/home/user/Documents/Application/fabric-multipeer/crypto-config/ordererOrganizations/StancOrdr.com/users/Admin@StancOrdr.com/msp/keystore"
          }
        }
      },
      "peers": {
        "HOSTA.peerStanc.com": {
          "tlsCACerts": {
            "path": "/home/user/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": {
           "tlsCACerts": {
            "path": "/home/user/Documents/Application/fabric-multipeer/crypto-config/peerOrganizations/peerStancA.com/peers/HOSTA.peerStancA.com/tls/ca.crt"
          },
          "url": "grpc://localhost:8051",
          "eventUrl": "grpc://localhost:8053",
          "grpcOptions": {
            "ssl-target-name-override": "HOSTA.peerStancA.com"
          }
        },
        "HOSTA.peerStancB.com": {
          "tlsCACerts": {
            "path": "/home/user/Documents/Application/fabric-multipeer/crypto-config/peerOrganizations/peerStancB.com/peers/HOSTA.peerStancB.com/tls/ca.crt"
          },
          "url": "grpc://localhost:9051",
          "eventUrl": "grpc://localhost:9053",
          "grpcOptions": {
            "ssl-target-name-override": "HOSTA.peerStancB.com"
          }
        }
      },
      "orderers": {
        "StancOrderer.StancOrdr.com": {
          "url": "grpc://localhost:7050"
        }
      }
    },
    "network-2": {}
  },
  "configtxgenToolPath": "/home/user/Documents/Application/bin",
  "license": "Apache-2.0"
}

I have successfull hosted the explorer application.But its does n't show the list of 3 orgs as well as peers.It displays only the HOSTA.peerStanc.com as running.How can I list all the peers and their status as running ? I have updated the explorer config file in different ways.Can anyone help please? Help is appreciated.

来源:https://stackoverflow.com/questions/54230775/issue-in-creating-multiple-peers-in-hyperledger-explorer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!