connection.json, created by Composer:
{ "name": "hlfv1", "x-type": "hlfv1", "x-commitTimeout": 300, "version": "1.0.0", "client": { "organization": "Org1", "connection": { "timeout": { "peer": { "endorser": "300", "eventHub": "300", "eventReg": "300" }, "orderer": "300" } } }, "channels": { "composerchannel": { "orderers": ["orderer.example.com"], "peers": { "peer0.org1.example.com": {} } } }, "organizations": { "Org1": { "mspid": "Org1MSP", "peers": ["peer0.org1.example.com"], "certificateAuthorities": ["ca.org1.example.com"] } }, "orderers": { "orderer.example.com": { "url": "grpc://localhost:7050" } }, "peers": { "peer0.org1.example.com": { "url": "grpc://localhost:7051", "eventUrl": "grpc://localhost:7053" } }, "certificateAuthorities": { "ca.org1.example.com": { "url": "http://localhost:7054", "caName": "ca.org1.example.com" } } }
config.json for the Explorer:
{ "network-config": { "Org1": { "name": "Org1", "mspid": "Org1MSP", "peer1": { "requests": "grpc://localhost:7051", "events": "grpc://localhost:7053", "server-hostname": "peer0.org1.example.com" }, "admin": { "key": "/home/ubuntu/fabric-dev-servers/fabric-scripts/hlfv11/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore", "cert": "/home/ubuntu/fabric-dev-servers/fabric-scripts/hlfv11/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts" } } }, "host": "localhost", "port": "8080", "channel": "composerchannel", "keyValueStore": "/tmp/fabric-client-kvs", "eventWaitTime": "30000", "users":[ { "username":"admin", "secret":"adminpw" } ], "pg": { "host": "127.0.0.1", "port": "5432", "database": "fabricexplorer", "username": "hppoc", "passwd": "password" }, "license": "Apache-2.0" }
Error log:
postgres://hppoc:password@127.0.0.1:5432/fabricexplorer
Please open web browser to access :http://localhost:8080/
[31m[2018-05-16 12:08:39.563] [ERROR] FabricClientProxy - [39mFailed to find a peer matching the url grpc://localhost:7051
[31m[2018-05-16 12:08:39.564] [ERROR] FabricClientProxy - [39mFailed to find a peer matching the url grpc://localhost:7051
/home/ubuntu/blockchain-explorer/app/FabricClientProxy.js:37
if (this.channels[org][this.channelName] == undefined)
^
TypeError: Cannot read property 'composerchannel' of undefined
at FabricClientProxy.getChannelForOrg (/home/ubuntu/blockchain-explorer/app/FabricClientProxy.js:37:25)
at getChainInfo (/home/ubuntu/blockchain-explorer/app/query.js:91:34)
at Object.getChannelHeight (/home/ubuntu/blockchain-explorer/app/query.js:190:9)
at getMaxBlockNum (/home/ubuntu/blockchain-explorer/app/service/blockscanner.js:152:18)
at Object.syncBlock (/home/ubuntu/blockchain-explorer/app/service/blockscanner.js:40:9)
at Timeout._onTimeout (/home/ubuntu/blockchain-explorer/app/listener/blocklistener.js:46:22)
at ontimeout (timers.js:482:11)
at tryOnTimeout (timers.js:317:5)
at Timer.listOnTimeout (timers.js:277:5)