0

我创建了一个多人网络。我创建了 3 个orgs StancOrgStancOrgAStancOrgB。这是 configtx.yaml 文件。

       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:

masterchannel在我的网络上创建了一个。

我正在尝试为创建的结构网络设置 Hyperledger Explorer。我还根据创建的结构网络更新了 config.json。

{
  "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"
}

我得到了成功的构建。但它无法启动资源管理器应用程序。

我得到了以下错误。

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

我已将 tls 提供为 false 并更新了 grpc。并且网络也在指定的端口上。

帮助表示赞赏。

4

2 回答 2

0

应该使用完整路径/home/user/yourPath而不是快捷方式来设置路径~/yourPath

无论如何,请记住始终检查应用程序日志,而不仅仅是控制台,因为有时它们会显示更多信息。

于 2019-01-15T20:22:21.557 回答
0

我发现这是一个 npm 包问题,你最好修改 blockchain-explorer 下的 package.json 并将 ^ 替换为 ~ 以下载次要版本包。

于 2020-05-25T02:10:04.037 回答