版本:
OS:具有Ubuntu 16.04的VM
节点:v8.11.4
PostgreSQL:9.5.14
docker:18.06.1-ce
docker-compose:1.13.0
我正在关注这个Hyperledger作曲家教程: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
然后我已经成功建立了作曲家的业务网络并在操场上进行了测试
我打算使用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
有人可以帮我吗?
答案 0 :(得分: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。您需要使用以下观点进行审查: