1

版本:

操作系统:带有 Ubuntu 16.04 的虚拟机

节点:v8.11.4

PostgreSQL:9.5.14

码头工人:18.06.1-ce

码头工人撰写:1.13.0

我正在关注这个超级账本作曲家教程:https ://hyperledger.github.io/composer/latest/tutorials/deploy-to-fabric-multi-org.html 。运行命令后:

./byfn.sh -m up -s couchdb -a

我通过键入以下内容将第三个组织加入了业务网络:

eyfn.sh generate -c mychannel
eyfn.sh up -c mychannel -s couchdb

然后我成功搭建了composer业务网络,并在操场上测试

我打算使用 Hyperledger Explorer 工具来可视化交易数量及其详细信息。

我按照此链接逐步执行:https ://github.com/hyperledger/blockchain-explorer

我的 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/diogosilva/fabric-dev-servers/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
      },
      "peer2": {
        "requests": "grpcs://127.0.0.1:8051",
        "events": "grpcs://127.0.0.1:8053",
        "server-hostname": "peer1.org1.example.com",
        "tls_cacerts":
          "/home/diogosilva/fabric-dev-servers/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt"
      },
      "admin": {
        "key":
          "/home/diogosilva/fabric-dev-servers/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore",
        "cert":
          "/home/diogosilva/fabric-dev-servers/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts"
      }
    },
    "org2": {
      "name": "Org2",
      "mspid": "Org2MSP",
      "peer1": {
        "requests": "grpcs://127.0.0.1:9051",
        "events": "grpcs://127.0.0.1:9053",
        "server-hostname": "peer0.org2.example.com",
        "tls_cacerts":
          "/home/diogosilva/fabric-dev-servers/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt"
      },
      "peer2": {
        "requests": "grpcs://127.0.0.1:10051",
        "events": "grpcs://127.0.0.1:10053",
        "server-hostname": "peer1.org2.example.com",
        "tls_cacerts":
          "/home/diogosilva/fabric-dev-servers/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt"
      },
      "admin": {
        "key":
          "/home/diogosilva/fabric-dev-servers/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore",
        "cert":
          "/home/diogosilva/fabric-dev-servers/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts"
      }
    },
    "org3": {
      "name": "Org3",
      "mspid": "Org3MSP",
      "peer1": {
        "requests": "grpcs://127.0.0.1:11051",
        "events": "grpcs://127.0.0.1:11053",
        "server-hostname": "peer0.org3.example.com",
        "tls_cacerts":
          "/home/diogosilva/fabric-dev-servers/fabric-samples/first-network/org3-artifacts/crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt"
      },
      "peer2": {
        "requests": "grpcs://127.0.0.1:12051",
        "events": "grpcs://127.0.0.1:12053",
        "server-hostname": "peer1.org3.example.com",
        "tls_cacerts":
          "/home/diogosilva/fabric-dev-servers/fabric-samples/first-network/org3-artifacts/crypto-config/peerOrganizations/org3.example.com/peers/peer1.org3.example.com/tls/ca.crt"
      },
      "admin": {
        "key":
          "/home/diogosilva/fabric-dev-servers/fabric-samples/first-network/org3-artifacts/crypto-config/peerOrganizations/org3.example.com/users/Admin@org3.example.com/msp/keystore",
        "cert":
          "/home/diogosilva/fabric-dev-servers/fabric-samples/first-network/org3-artifacts/crypto-config/peerOrganizations/org3.example.com/users/Admin@org3.example.com/msp/signcerts"
      }
    }
  },
  "channel": "mychannel",
  "orderers": [
    {
      "mspid": "OrdererMSP",
      "server-hostname": "orderer.example.com",
      "requests": "grpcs://127.0.0.1:7050",
      "tls_cacerts":
        "/home/diogosilva/fabric-dev-servers/fabric-samples/first-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt"
    }
  ],
  "keyValueStore": "/tmp/fabric-client-kvs",
  "configtxgenToolPath": "/home/diogosilva/fabric-dev-servers/fabric-samples/bin",
  "SYNC_START_DATE_FORMAT": "YYYY/MM/DD",
  "syncStartDate": "2018/01/01",
  "eventWaitTime": "30000",
  "license": "Apache-2.0",
  "version": "1.1"
}

在新控制台中键入启动 Hyperledger Explorer 的命令:

./start.sh

Hyperledger Explorer 未启动,并且在控制台日志中引发以下错误:

 postgres://hppoc:password@127.0.0.1:5432/fabricexplorer
<<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>>
TypeError: Cannot read property 'size' of undefined
    at Platform.initialize (/home/diogosilva/blockchain-explorer/app/platform/fabric/Platform.js:52:45)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
Received kill signal, shutting down gracefully
Closed out connections

有人可以帮我吗?

4

1 回答 1

0
TypeError: Cannot read property 'size' of undefined
at Platform.initialize (/home/kp/Desktop/blockchain-explorer/app/platform/fabric/Platform.js:52:45)

根据 Platform.js,这意味着由于某种原因无法加载您的 config.json。您需要从以下观点进行审查:

  • 检查日志/app/app.log
  • 与原始 config.json 的区别
  • 版本(您使用的是哪个版本?Fabric 1.1 或 1.2 / Explorer 版本 3.5 或 3.6)
于 2018-09-20T06:47:41.270 回答