Hyperledger Explorer Docker连接错误

时间:2018-10-19 07:44:49

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

我创建了超级分类帐结构网络配置,并且docker正在基于该配置运行。之后,我在该网络上安装了.bna文件。

我正在尝试设置Hyperledger Explorer泊坞窗映像以探索数据。我按照说明中的说明设置资源管理器的文件夹结构。

enter image description here

我的config.json文件如下所示。

{
    "network-configs": {
        "network-1": {
            "version": "1.0",
            "clients": {
                "client-1": {
                    "tlsEnable": true,
                    "organization": "EngineeringMSP",
                    "channel": "testchannel",
                    "credentialStore": {
                        "path": "./tmp/credentialStore_Engineering/credential",
                        "cryptoStore": {
                            "path": "./tmp/credentialStore_Engineering/crypto"
                        }
                    }
                }
            },
            "channels": {
                "testchannel": {
                    "peers": {
                        "peer0.engineering.test.com": {}
                    },
                    "connection": {
                        "timeout": {
                            "peer": {
                                "endorser": "6000",
                                "eventHub": "6000",
                                "eventReg": "6000"
                            }
                        }
                    }
                }
            },
            "organizations": {
                "EngineeringMSP": {
                    "mspid": "EngineeringMSP",
                    "fullpath": false,
                    "adminPrivateKey": {
                        "path": "/tmp/crypto/peerOrganizations/engineering.test.com/users/Admin@engineering.test.com/msp/keystore"
                    },
                    "signedCert": {
                        "path": "/tmp/crypto/peerOrganizations/engineering.test.com/users/Admin@engineering.test.com/msp/signcerts"
                    }
                },
                "OrdererMSP": {
                    "mspid": "OrdererMSP",
                    "adminPrivateKey": {
                        "path": "/tmp/crypto/ordererOrganizations.test.com/users/Admin.test.com/msp/keystore"
                    }
                }
            },
            "peers": {
                "peer0.engineering.test.com": {
                    "tlsCACerts": {
                        "path": "/tmp/crypto/peerOrganizations/engineering.test.com/peers/peer0.engineering.test.com/tls/ca.crt"
                    },
                    "url": "grpc://localhost:7051",
                    "eventUrl": "grpc://localhost:7053",
                    "grpcOptions": {
                        "ssl-target-name-override": "peer0.engineering.test.com"
                    }
                }
            },
            "orderers": {
                "orderer.example.com": {
                    "url": "grpc://localhost:7050"
                }
            }
        }
    },
    "configtxgenToolPath": "./bin",
    "license": "Apache-2.0"
}

执行命令./deploy_explorer.sh poc <network name>后,出现类似错误的信息。

postgres://hppoc:password@192.168.10.11:5432/fabricexplorer
/bin/sh: locate: not found
/bin/sh: locate: not found
/bin/sh: locate: not found
error: [Remote.js]: Error: Failed to connect before the deadline
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to connect before the deadline
at checkState (/opt/explorer/node_modules/grpc/src/client.js:838:16)
2018-10-19T05:59:05.103447389Z 
**************************************************************************************
Error : Failed to connect client peer, please check the configuration and peer status
Info : Explorer will continue working with only DB data
**************************************************************************************
2018-10-19T05:59:05.103656561Z 
2018-10-19T05:59:05.114643537Z 
2018-10-19T05:59:05.114721428Z 
Please open web browser to access :http://localhost:8080/
2018-10-19T05:59:05.114745161Z 
2018-10-19T05:59:05.114749276Z 
pid is 6
2018-10-19T05:59:05.114757612Z 
2018-10-19T05:59:05.114761455Z 
<<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>

我检查了位于docker容器中的postgers数据库,并且fabricexplorer数据库表中没有任何数据。

有人可以帮助我吗?

1 个答案:

答案 0 :(得分:0)

将config.json中的所有网址更改为例如:

"orderers": {
            "orderer.example.com": {
                "url": "grpc://localhost:7050"
            }
        }

应该是

"orderers": {
            "orderer.example.com": {
                "url": "grpc://orderer.example.com:7050"
            }
        }

按照blockchain-explorer / examples / net1 / README.md中的说明进行操作