【问题标题】:Hyperledger Explorer Shows Empty DataHyperledger Explorer 显示空数据
【发布时间】:2018-02-08 08:09:58
【问题描述】:

我的 Hyperledger composer playground 和 rest 服务器工作正常,但资源管理器没有显示任何数据。

浏览器配置:

{
"network-config": {
    "org1": {
        "name": "hlfv1",
        "mspid": "Org1MSP",
        "peer1": {
            "requests": "grpc://localhost:7050",
            "events": "grpc://localhost:7053",
            "server-hostname": "peer0.org1.example.com"
        },
        "admin": {
            "key": "../fabric-tools/fabric-scripts/hlfv1/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore",
            "cert": "../fabric-tools/fabric-scripts/hlfv1/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts"
        }

    }
},
"host": "localhost",
"port": "5000",
"channel": "composerchannel",
"keyValueStore": "/tmp/fabric-client-kvs",
"eventWaitTime": "30000",
"mysql":{
    "host":"127.0.0.1",
    "database":"fabricexplorer",
    "username":"root",
    "passwd":"******"
}

当我检查日志时,它显示了这个错误:

[client-utils.js]: sendPeersProposal - Promise is rejected: Error: 12 UNIMPLEMENTED: unknown service protos.Endorser
    at new createStatusError (/blockchain-explorer/node_modules/grpc/src/client.js:65:15)
    at /blockchain-explorer/node_modules/grpc/src/client.js:568:15
[Channel.js]: Failed Query channel info. Error: Error: 12 UNIMPLEMENTED: unknown service protos.Endorser
    at new createStatusError (/blockchain-explorer/node_modules/grpc/src/client.js:65:15)
    at /blockchain-explorer/node_modules/grpc/src/client.js:568:15
[ERROR] Query - [39mError: 12 UNIMPLEMENTED: unknown service protos.Endorser
    at new createStatusError (/blockchain-explorer/node_modules/grpc/src/client.js:65:15)
    at /blockchain-explorer/node_modules/grpc/src/client.js:568:15
[31m[2018-02-08 13:54:07.217] [ERROR] blockscanner -[39mTypeError: Cannot read property 'low' of undefined
    at getChainInfo.then.response (/blockchain-explorer/app/query.js:208:33)
    at <anonymous> ....

配置有问题吗?关于如何将资源管理器与作曲家集成没有明确的教程。谢谢

【问题讨论】:

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


    【解决方案1】:

    使用标准 Development Fabric,我已经能够使用以下配置运行资源管理器:

    • 节点 - v8.9.0
    • 作曲家 - v0.17.3
    • 面料 - 1.1.0-alpha
    • mysql - 5.7.21

    我的配置文件与您的不同,因为我使用的是证书的绝对路径而不是相对路径。我的配置如下。

    {
    "network-config": {
        "org1": {
            "name": "peerOrg1",
            "mspid": "Org1MSP",
            "peer1": {
                "requests": "grpc://127.0.0.1:7051",
                "events": "grpc://127.0.0.1:7053",
                "server-hostname": "peer0.org1.example.com",
                "tls_cacerts": "/home/ibm/fabric-tools/fabric-scripts/hlfv11/composer/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
            },
            "admin": {
                "key": "/home/ibm/fabric-tools/fabric-scripts/hlfv11/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore",
                "cert": "/home/ibm/fabric-tools/fabric-scripts/hlfv11/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts"
            }
        }
    },
    "host": "localhost",
    "port": "8081",
    "channel": "composerchannel",
    "keyValueStore": "/tmp/fabric-client-kvs",
    "eventWaitTime": "30000",
    "mysql": {
        "host": "127.0.0.1",
        "port": "3306",
        "database": "fabricexplorer",
        "username": "root",
        "passwd": "****"
    }
    }
    

    【讨论】:

    • 我几乎逐字逐句地完成了你的版本,但仍然得到错误sendPeersProposal - Promise is rejected: Error: 12 UNIMPLEMENTED: unknown service protos.Endorser at new createStatusError (/home/ubuntu/bludev/blockchain-explorer/node_modules/grpc/src/client.js:64:15)你究竟是如何设置你的mysql的?我正在按照他们的 github 和 postgres psql 上的超级账本说明进行操作。
    • 这看起来更像是“连接到结构”错误,而不是 mysql 错误。据我记得,我几乎做了一个默认的 mysql 安装。我注意到最新版本的 blockchain-explorer 是为 PostgreSQL 配置的。
    【解决方案2】:

    我收到此错误是因为我为请求设置了错误的端口 "requests": "grpc://localhost:7050",

    应该是 "requests": "grpc://localhost:7051",

    【讨论】:

    • 我应该像你一样做我自己的特定本地主机吗?还是应该像他们的说明一样是“grpc://127.0.0.1:7051”?
    【解决方案3】:

    在我的环境中,只需将 tls_cacerts 添加到 config.json 上的对等配置即可解决问题。

    https://stackoverflow.com/a/49934968/8874164

    @r-thatcher 提供的 config.json 对我来说非常有用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-10-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-11
      • 2018-09-22
      • 1970-01-01
      相关资源
      最近更新 更多