Hyperldger: Hyperledger Explorer not starting. Throws error

0 votes

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)
Nov 8, 2018 in Blockchain by slayer
• 29,050 points
283 views

1 answer to this question.

0 votes

in "network-config" you should use lowercase 'org1'

{
    "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"
}
answered Nov 8, 2018 by Omkar
• 67,140 points

Related Questions In Blockchain

0 votes
1 answer

Error during Hyperledger installation: Manifest peer latest not found

Change the tag from latest to x86_64-1.0.2 in the compose file. ...READ MORE

answered Jul 13, 2018 in Blockchain by Perry
• 17,010 points
29 views
0 votes
1 answer
+1 vote
1 answer
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 27,620 points
55 views
0 votes
1 answer

Hyperledger Fabric peer command not found error.

This error occurs when the system can ...READ MORE

answered Jul 2, 2018 in Blockchain by Omkar
• 67,140 points
394 views
0 votes
1 answer