Hyperledger资源管理器无法启动。看起来由于某种原因它不能创建客户端。也许它无法读取客户端配置,并回复未定义的客户端配置。这是控制台日志文件
******* Initialization started for hyperledger fabric platform ******, { 'network-1':
{ version: '1.0',
clients: { 'client-1': [Object] },
channels: { mychannel: [Object] },
organizations: { Org1MSP: [Object], Org2MSP: [Object], OrdererMSP: [Object] },
peers:
{ 'peer0.org1.example.com': [Object],
'peer1.org1.example.com': [Object],
'peer0.org2.example.com': [Object],
'peer1.org2.example.com': [Object] },
orderers: { 'orderer.example.com': [Object] } },
'network-2': {} }
client_configs.name undefined client_configs.profile undefined
FabricUtils.createFabricClient
<<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>>
Error : [ 'Invalid platform configuration, Please check the log' ]
Received kill signal, shutting down gracefully
Closed out connections同样在app.log上,它回复说
[2019-08-21 09:35:23.018] [DEBUG] Platform - ******* Initialization started for hyperledger fabric platform ******
[2019-08-21 09:35:23.020] [DEBUG] Platform - Setting admin organization enrolment files
[2019-08-21 09:35:23.020] [DEBUG] FabricUtils - Organization [Org1MSP] enrolment files path defined as directory
[2019-08-21 09:35:23.021] [DEBUG] FabricUtils - Organization [Org2MSP] enrolment files path defined as directory
[2019-08-21 09:35:23.021] [DEBUG] FabricUtils - Organization [OrdererMSP] enrolment files path defined as directory
[2019-08-21 09:35:23.021] [DEBUG] Platform - Creating client [[object Object]] >> undefined
[2019-08-21 09:35:23.022] [DEBUG] FabricUtils - ************ Initializing fabric client for [undefined]************
[2019-08-21 09:35:23.022] [DEBUG] FabricClient - Client configuration [undefined] ... this.client_config { version: '1.0',
clients:
{ 'client-1':
{ tlsEnable: true,
organization: 'Org1MSP',
channel: 'mychannel',
credentialStore: [Object] } },
channels: { mychannel: { peers: [Object], connection: [Object] } },
organizations: 发布于 2021-08-11 04:08:54
我遇到了类似的问题,但在查看了https://github.com/hyperledger/blockchain-explorer的快速入门(使用docker)中提到的步骤后,发现docker-compose.yaml和test-network.json上的配置是错误的。
修改配置后(参见下面的配置),它可以正常工作:
所有文件

test-network.json
{
"name": "test-network",
"version": "1.0.0",
"client": {
"tlsEnable": true,
"adminCredential": {
"id": "exploreradmin",
"password": "exploreradminpw"
},
"enableAuthentication": true,
"organization": "Org1MSP",
"connection": {
"timeout": {
"peer": {
"endorser": "300"
},
"orderer": "300"
}
}
},
"channels": {
"mychannel": {
"peers": {
"peer0.org1.example.com": {}
}
}
},
"organizations": {
"Org1MSP": {
"mspid": "Org1MSP",
"adminPrivateKey": {
"path": "/tmp/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/e01e69598ae437dcbf5ea4f84f3b9164545ef245b84d157d7f659b47f5c3a26a_sk"
},
"peers": ["peer0.org1.example.com"],
"signedCert": {
"path": "/tmp/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/cert.pem"
}
}
},
"peers": {
"peer0.org1.example.com": {
"tlsCACerts": {
"path": "/tmp/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
},
"url": "grpcs://peer0.org1.example.com:7051"
}
}}
docker-compose.yaml


在localhost:8080上打开Hyperledger Fabric Explorer,并在登录屏幕上添加以下凭据:
"adminCredential": {
"id": "exploreradmin",
"password": "exploreradminpw"
}

参考:
https://stackoverflow.com/questions/57620479
复制相似问题