Hyperledger 资源管理器 docker 设置不适用于 Hyperledger 结构

Hyperledger explorer docker setup is not working with the Hyperledger fabric

我正在尝试设置 Hyperledger Explorer 以使用我的结构网络。我设法在不使用 docker 的情况下启动了资源管理器,但是当我尝试使用 docker-compose 在 docker 中启动资源管理器时。我在 explorer.mynetwork.com 容器中遇到以下错误。我在对等容器配置中为 CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051 提供了正确的值。 我按照 https://github.com/hyperledger/blockchain-explorer 文档进行了 docker 设置。如果我遗漏了任何配置,请告诉我。

2019-10-03T14:18:40.610Z - error: [Channel.js]: Channel:mychannel received discovery error:failed constructing descriptor for chaincodes:<name:"mycc" >
2019-10-03T14:18:40.616Z - error: [Channel.js]: Channel:mychannel received discovery error:failed constructing descriptor for chaincodes:<name:"mycc1" >
initializeChannelFromDiscover  mychannel
2019-10-03T14:18:40.638Z - error: [Channel.js]: Channel:mychannel received discovery error:failed constructing descriptor for chaincodes:<name:"mycc" >
2019-10-03T14:18:40.644Z - error: [Channel.js]: Channel:mychannel received discovery error:failed constructing descriptor for chaincodes:<name:"mycc1" >
 FabricClient.discover_results  endpoint  { host: 'orderer.example.com', port: 7050 }
initializeChannelFromDiscover.discoveryProtocol  grpcs  requesturl  grpcs://orderer.example.com:7050.

首先,我建议尝试使用资源管理器 docker 图片和 fabric-samples/first-network。

# After bringing up fabric-samples/first-network

# Copy artifacts into the path which is mounted on explorer container
$ cp -a /some/where/fabric-samples/first-network/crypto-config/* examples/net1/crypto/

# Edit connection profile to change secret key file name
$ vi examples/net1/connection-profile/first-network.json
$ git diff examples/
diff --git a/examples/net1/connection-profile/first-network.json b/examples/net1/connection-profile/first-network.json
index 45fff11..6f790b1 100644
--- a/examples/net1/connection-profile/first-network.json
+++ b/examples/net1/connection-profile/first-network.json
@@ -37,7 +37,7 @@
                        "mspid": "Org1MSP",
                        "fullpath": true,
                        "adminPrivateKey": {
-                               "path": "/tmp/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/d30992c2b7799bc5c65bf6e4839369c7dd3edf0b786eecd4a9d3a3b207d8863f_sk"
+                               "path": "/tmp/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/75e93bca73505a8485a50aeec4341b0ea52f1a0169a46fba6f20091e60f5f4d3_sk"
                        },
                        "signedCert": {
                                "path": "/tmp/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem"

# Pull the latest container images (v0.3.9.5)
$ docker pull hyperledger/explorer
$ docker pull hyperledger/explorer-db

# Make sure the persistant volumes removed
$ docker-compose down -v

# Bring up containers
$ docker-compose up -d explorerdb.mynetwork.com 
$ docker-compose up -d explorer.mynetwork.com 

# Access http://localhost:8090

确保资源管理器在此环境中正常工作后,请\修改配置(连接配置文件)以与您自己的结构网络保持一致。