将Hyperledger作曲器与资源管理器一起使用时出错

时间:2018-10-29 16:49:25

标签: hyperledger-fabric hyperledger hyperledger-composer hyperledger-explorer

我正在尝试将Hyperledger Composer与Hyperledger Explorer结合使用。我已经在fabric-dev-servers上部署了一个简单的业务网络。在作曲者方面,它工作正常,并且能够与网络完美交互,但是当我尝试将其与Hyperledger Explorer集成时,在启动它时出现以下错误。

控制台日志

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
}

2 个答案:

答案 0 :(得分:1)

我也遇到过类似的问题,并通过以下步骤解决了该问题。

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

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

  3. 构建Hyperledger Explorer

  4. 运行Hyperledger Explorer

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

我希望它能对您有所帮助!

答案 1 :(得分:0)

查看您的config.json文件的格式,看来您使用的是旧版的Explorer,还是旧的config.json。仅在资源管理器3.7中添加了对Fabric 1.2(看起来像您正在使用的)的支持,并更改了config.json的结构。

所以,我建议以下内容:

  • 更新到Explorer 3.7(分支版本3.7)。
  • 遵循说明here