0

我正在尝试将超级账本作曲家与超级账本资源管理器一起使用。我在 fabric-dev-servers 上部署了一个简单的业务网络。在作曲家方面,它工作正常,我能够完美地与网络交互,但是当我尝试将它与超级账本资源管理器集成时,我在启动它时遇到以下错误。

控制台日志

postgres://hppoc:password@127.0.0.1:5432/fabricexplorer
<<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>>
TypeError: Cannot read property 'size' of undefined
    at Platform.initialize (/home/paradox/hyperledger/fabric/blockchain-explorer/app/platform/fabric/Platform.js:54:48)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
(node:23248) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead
Received kill signal, shutting down gracefully
Closed out connections

应用日志:

[2018-10-29 22:14:30.719] [DEBUG] Platform - ******* Initialization started for hyperledger fabric platform ******
[2018-10-29 22:14:30.719] [DEBUG] Platform - Setting admin organization enrolment files

数据库日志:

[2018-10-29 22:14:22.055] [INFO] pgservice - Please set logger.setLevel to DEBUG in ./app/helper.js to log the debugging.

以下是我的 config.json
配置:

{
  "network-config": {
    "org1": {
      "name": "Org1",
      "mspid": "Org1MSP",
      "peer1": {
        "requests": "grpcs://127.0.0.1:7051",
        "events": "grpcs://127.0.0.1:7053",
        "server-hostname": "peer0.org1.example.com",
        "tls_cacerts": "/home/paradox/hyperledger/fabric/fabric-dev-servers/fabric-scripts/hlfv12/composer/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
      },
      "admin": {
        "key": "/home/paradox/hyperledger/fabric/fabric-dev-servers/fabric-scripts/hlfv12/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore",
        "cert": "/home/paradox/hyperledger/fabric/fabric-dev-servers/fabric-scripts/hlfv12/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts"
      }
    }
  },
  "channel": "composerchannel",
  "orderers": [
    {
      "mspid": "OrdererMSP",
      "server-hostname": "orderer.example.com",
      "requests": "grpcs://127.0.0.1:7050",
      "tls_cacerts": "/home/paradox/hyperledger/fabric/fabric-dev-servers/fabric-scripts/hlfv12/composer/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt"
    }
  ],
  "keyValueStore": "/tmp/fabric-client-kvs",
  "configtxgenToolPath": "/home/playground/fabric-samples/bin",
  "SYNC_START_DATE_FORMAT": "YYYY/MM/DD",
  "syncStartDate": "2018/9/01",
  "eventWaitTime": "30000",
  "license": "Apache-2.0",
  "version": 1.0
}
4

2 回答 2

1

我遇到过类似的问题并使用以下步骤解决了它。

  1. 从给定的 url 下载 Explorer 3.5。
    https://github.com/hyperledger/blockchain-explorer/tree/v0.3.5.1

  2. Hyperledger Composer 设置(更新 config.json)

  3. 构建超级账本资源管理器

  4. 运行 Hyperledger Explorer

最后它适用于 Fabric 1.2 和 Composer@0.20。

我希望它会帮助你!

于 2018-12-07T12:27:16.233 回答
0

查看config.json文件的格式,您可能正在使用旧版本的资源管理器,或者旧的config.json. 仅在 Explorer 3.7 中添加了对 Fabric 1.2(看起来您正在使用)的支持,以及对config.json.

所以,我会推荐以下内容:

  • 更新到 Explorer 3.7(分支版本 3.7)。
  • 按照此处的说明进行操作。
于 2018-11-28T15:02:56.967 回答