Hyperledger explorer is unable to connect to the network - hyperledger-fabric

I have my network up and running. When I try to connect the same with the latest explorer it throws the following error.
config.json: looks like:
{
"network-configs": {
"network-1": {
"version": "1.0",
"clients": {
"client-1": {
"tlsEnable": false,
"organization": "Org1MSP",
"channel": "mychannel",
"credentialStore": {
"path": "./tmp/credentialStore_Org1/credential",
"cryptoStore": {
"path": "./tmp/credentialStore_Org1/crypto"
}
}
}
},
"channels": {
"mychannel": {
"peers": {
"peer0.org1.example.com": {}
},
"connection": {
"timeout": {
"peer": {
"endorser": "6000",
"eventHub": "6000",
"eventReg": "6000"
}
}
}
}
},
"organizations": {
"Org1MSP": {
"mspid": "Org1MSP",
"fullpath": false,
"adminPrivateKey": {
"path": "/home/ubuntu/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/keystore"
},
"signedCert": {
"path": "/home/ubuntu/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/signcerts"
}
},
"Org2MSP": {
"mspid": "Org2MSP",
"adminPrivateKey": {
"path": "/home/ubuntu/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/users/Admin#org2.example.com/msp/keystore"
}
},
"OrdererMSP": {
"mspid": "OrdererMSP",
"adminPrivateKey": {
"path": "/home/ubuntu/fabric-samples/first-network/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/keystore"
}
}
},
"peers": {
"peer0.org1.example.com": {
"tlsCACerts": {
"path": "/home/ubuntu/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
},
"url": "grpc://localhost:7051",
"eventUrl": "grpc://localhost:7053",
"grpcOptions": {
"ssl-target-name-override": "peer0.org1.example.com"
}
},
"peer1.org1.example.com": {
"url": "grpc://localhost:8051"
},
"peer0.org2.example.com": {
"url": "grpc://localhost:9051"
},
"peer1.org2.example.com": {
"url": "grpc://localhost:10051"
}
},
"orderers": {
"orderer.example.com": {
"url": "grpc://localhost:7050"
}
}
},
"network-2": {}
},
"configtxgenToolPath": "/home/ubuntu/fabric-samples/bin",
"license": "Apache-2.0"
}
I am not sure what is the 'client-1' should be give. When I run the ./start.sh inside the blockchain-explorer root. I am getting this logs.
postgres://hppoc:password#127.0.0.1:5432/fabricexplorer
(node:13053) DeprecationWarning: grpc.load: Use the #grpc/proto-loader module with grpc.loadPackageDefinition instead
2019-04-01T10:17:57.685Z - ESC[31merrorESC[39m: [Channel.js]: Error: 2 UNKNOWN: Stream removed
<<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>>
Error: Failed to discover ::Error: 2 UNKNOWN: Stream removed
at Channel._initialize (/home/karthikeyan/repo/blockchain-explorer/node_modules/fabric-client/lib/Channel.js:347:11)
Received kill signal, shutting down gracefully
Closed out connections
No idea why the stream is removed.

Related

hyperledger blockchain-explorer failed to connect client peer

First, my environment has peer0 and peer1, and this is my first-network.json file
{
"name": "first-network",
"version": "1.0.0",
"license": "Apache-2.0",
"client": {
"tlsEnable": true,
"adminUser": "admin",
"adminPassword": "adminpw",
"enableAuthentication": false,
"organization": "org1",
"connection": {
"timeout": {
"peer": {
"endorser": "300"
},
"orderer": "300"
}
}
},
"channels": {
"base-chain": {
"peers": {
"peer0.org1.arxanfintech.com": {}
},
"connection": {
"timeout": {
"peer": {
"endorser": "6000",
"eventHub": "6000",
"eventReg": "6000"
}
}
}
}
},
"organizations": {
"org1": {
"mspid": "Org1MSP",
"fullpath": false,
"adminPrivateKey": {
"path": "/opt/gopath/src/github.com/hyperledger/fabric/examples/e2e_cli/crypto-config/peerOrganizations/org1.arxanfintech.com/users/Admin#org1.arxanfintech.com/msp/keystore/4cd98e6f90b39e102c060c86b6bcd13311c1fd005dd2fc8571f9b725ce25512d_sk"
},
"signedCert": {
"path": "/opt/gopath/src/github.com/hyperledger/fabric/examples/e2e_cli/crypto-config/peerOrganizations/org1.arxanfintech.com/users/Admin#org1.arxanfintech.com/msp/signcerts/Admin#org1.arxanfintech.com-cert.pem"
}
},
"orderer": {
"mspid": "OrdererMSP",
"adminPrivateKey": {
"path": "/opt/gopath/src/github.com/hyperledger/fabric/examples/e2e_cli/crypto-config/ordererOrganizations/arxanfintech.com/users/Admin#arxanfintech.com/msp/keystore/88b5b11eff55eb580d71dfbfd81d6ff2b11f83e3e5fad98f267c22db332ec359_sk"
},
"signedCert": {
"path": "/opt/gopath/src/github.com/hyperledger/fabric/examples/e2e_cli/crypto-config/ordererOrganizations/arxanfintech.com/users/Admin#arxanfintech.com/msp/signcerts/Admin#arxanfintech.com-cert.pem"
}
}
},
"peers": {
"peer0.org1.arxanfintech.com": {
"tlsCACerts": {
"path": "/opt/gopath/src/github.com/hyperledger/fabric/examples/e2e_cli/crypto-config/peerOrganizations/org1.arxanfintech.com/peers/peer0.org1.arxanfintech.com/tls/ca.crt"
},
"url": "grpcs//:192.168.20.77:7051",
"grpcOptions": {
"ssl-target-name-override": "peer0.org1.arxanfintech.com"
}
},
"peer1.org1.arxanfintech.com": {
"tlsCACerts": {
"path": "/opt/gopath/src/github.com/hyperledger/fabric/examples/e2e_cli/crypto-config/peerOrganizations/org1.arxanfintech.com/peers/peer1.org1.arxanfintech.com/tls/ca.crt"
},
"url": "grpcs//:192.168.20.77:8051",
"grpcOptions": {
"ssl-target-name-override": "peer1.org1.arxanfintech.com"
}
},
"orderers": {
"orderer0.arxanfintech.com": {
"tlsCACerts": {
"path": "/opt/gopath/src/github.com/hyperledger/fabric/examples/e2e_cli/crypto-config/ordererOrganizations/arxanfintech.com/orderers/orderer0.arxanfintech.com/tls/ca.crt"
},
"url": "grpcs//:192.168.20.77:7050",
"grpcOptions": {
"ssl-target-name-override": "orderer0.arxanfintech.com"
}
}
}
}
}

Hyperledger - Explorer : Not all peers are shown in explorer

I have successfully set up and run my 3 orderers, 3 orgs - 9 peers hyperledger fabric network. Although hyperledger explorer seems to be running in the standardized way (no docker) without error, it only shows peers specified in CORE_PEER_GOSSIP_EXTERNALENDPOINT protocol of organization "org1MSP", found in line 10 of config.json file.
Please find below the config.json file.
{
"name": "test-network",
"version": "1.0.0",
"license": "Apache-2.0",
"client": {
"tlsEnable": true,
"adminUser": "admin",
"adminPassword": "adminpw",
"enableAuthentication": false,
"organization": "org1MSP",
"connection": {
"timeout": {
"peer": {
"endorser": "300"
},
"orderer": "300"
}
}
},
"channels": {
"mychannel": {
"orderers": [
"orderer1.test.com",
"orderer2.test.com",
"orderer2.test.com"
],
"peers": {
"peer0.org1.test.com": {},
"peer1.org1.test.com": {},
"peer2.org1.test.com": {},
"peer0.org2.test.com": {},
"peer1.org2.test.com": {},
"peer2.org2.test.com": {},
"peer0.org3.test.com": {},
"peer1.org3.test.com": {},
"peer2.org3.test.com": {}
},
"connection": {
"timeout": {
"peer": {
"endorser": "6000",
"eventHub": "6000",
"eventReg": "6000"
}
}
}
}
},
"organizations": {
"org1MSP": {
"mspid": "org1MSP",
"peers": [
"peer0.org1.test.com",
"peer1.org1.test.com",
"peer2.org1.test.com"
],
"fullpath": true,
"adminPrivateKey": {
"path": "/home/xarhs/hyperledger/fabric-samples/test-network/crypto-config/peerOrganizations/org1.test.com/users/Admin#org1.test.com/msp/keystore/7f7056172b7d3667783dfa1567e8a8617512ded3e7ace54d04ce49e4d66882f1_sk"
},
"signedCert": {
"path": "/home/xarhs/hyperledger/fabric-samples/test-network/crypto-config/peerOrganizations/org1.test.com/users/Admin#org1.test.com/msp/signcerts/Admin#org1.test.com-cert.pem"
}
},
"org2MSP": {
"mspid": "org2MSP",
"peers": [
"peer0.org2.test.com",
"peer1.org2.test.com",
"peer2.org2.test.com"
],
"fullpath": true,
"adminPrivateKey": {
"path": "/home/xarhs/hyperledger/fabric-samples/test-network/crypto-config/peerOrganizations/org2.test.com/users/Admin#org2.test.com/msp/keystore/9b1c877670442b629bc2512f96f2b4e5f534cbe97c47657dcfcfa3e3a1d13a5f_sk"
},
"signedCert": {
"path": "/home/xarhs/hyperledger/fabric-samples/test-network/crypto-config/peerOrganizations/org2.test.com/users/Admin#org2.test.com/msp/signcerts/Admin#org2.test.com-cert.pem"
}
},
"org3MSP": {
"mspid": "org3MSP",
"peers": [
"peer0.org3.test.com",
"peer1.org3.test.com",
"peer2.org3.test.com"
],
"fullpath": true,
"adminPrivateKey": {
"path": "/home/xarhs/hyperledger/fabric-samples/test-network/crypto-config/peerOrganizations/org3.test.com/users/Admin#org3.test.com/msp/keystore/a1d310fc74eea57d6242dcbeced092e8c89076683f4b83266d51264a8121ab5c_sk"
},
"signedCert": {
"path": "/home/xarhs/hyperledger/fabric-samples/test-network/crypto-config/peerOrganizations/org3.test.com/users/Admin#org3.test.com/msp/signcerts/Admin#org3.test.com-cert.pem"
}
}
},
"peers": {
"peer0.org1.test.com": {
"name": "org1",
"tlsCACerts": {
"path": "/home/xarhs/hyperledger/fabric-samples/test-network/crypto-config/peerOrganizations/org1.test.com/peers/peer0.org1.test.com/tls/ca.crt"
},
"url": "grpcs://localhost:7051",
"eventUrl": "grpcs://localhost:7053",
"grpcOptions": {
"ssl-target-name-override": "peer0.org1.test.com"
}
},
"peer1.org1.test.com": {
"name": "org1",
"tlsCACerts": {
"path": "/home/xarhs/hyperledger/fabric-samples/test-network/crypto-config/peerOrganizations/org1.test.com/peers/peer1.org1.test.com/tls/ca.crt"
},
"url": "grpcs://localhost:8051",
"eventUrl": "grpcs://localhost:8053",
"grpcOptions": {
"ssl-target-name-override": "peer1.org1.test.com"
}
},
"peer2.org1.test.com": {
"name": "org1",
"tlsCACerts": {
"path": "/home/xarhs/hyperledger/fabric-samples/test-network/crypto-config/peerOrganizations/org1.test.com/peers/peer2.org1.test.com/tls/ca.crt"
},
"url": "grpcs://localhost:9051",
"eventUrl": "grpcs://localhost:9053",
"grpcOptions": {
"ssl-target-name-override": "peer2.org1.test.com"
}
},
"peer0.org2.test.com": {
"name": "org2",
"tlsCACerts": {
"path": "/home/xarhs/hyperledger/fabric-samples/test-network/crypto-config/peerOrganizations/org2.test.com/peers/peer0.org2.test.com/tls/ca.crt"
},
"url": "grpcs://localhost:10051",
"eventUrl": "grpcs://localhost:10053",
"grpcOptions": {
"ssl-target-name-override": "peer0.org2.test.com"
}
},
"peer1.org2.test.com": {
"name": "org2",
"tlsCACerts": {
"path": "/home/xarhs/hyperledger/fabric-samples/test-network/crypto-config/peerOrganizations/org2.test.com/peers/peer1.org2.test.com/tls/ca.crt"
},
"url": "grpcs://localhost:11051",
"eventUrl": "grpcs://localhost:11053",
"grpcOptions": {
"ssl-target-name-override": "peer1.org2.test.com"
}
},
"peer2.org2.test.com": {
"name": "org2",
"tlsCACerts": {
"path": "/home/xarhs/hyperledger/fabric-samples/test-network/crypto-config/peerOrganizations/org2.test.com/peers/peer2.org2.test.com/tls/ca.crt"
},
"url": "grpcs://localhost:12051",
"eventUrl": "grpcs://localhost:12053",
"grpcOptions": {
"ssl-target-name-override": "peer2.org2.test.com"
}
},
"peer0.org3.test.com": {
"name": "org3",
"tlsCACerts": {
"path": "/home/xarhs/hyperledger/fabric-samples/test-network/crypto-config/peerOrganizations/org3.test.com/peers/peer0.org3.test.com/tls/ca.crt"
},
"url": "grpcs://localhost:13051",
"eventUrl": "grpcs://localhost:13053",
"grpcOptions": {
"ssl-target-name-override": "peer0.org3.test.com"
}
},
"peer1.org3.test.com": {
"name": "org3",
"tlsCACerts": {
"path": "/home/xarhs/hyperledger/fabric-samples/test-network/crypto-config/peerOrganizations/org3.test.com/peers/peer1.org3.test.com/tls/ca.crt"
},
"url": "grpcs://localhost:14051",
"eventUrl": "grpcs://localhost:14053",
"grpcOptions": {
"ssl-target-name-override": "peer1.org3.test.com"
}
},
"peer2.org3.test.com": {
"name": "org3",
"tlsCACerts": {
"path": "/home/xarhs/hyperledger/fabric-samples/test-network/crypto-config/peerOrganizations/org3.test.com/peers/peer2.org3.test.com/tls/ca.crt"
},
"url": "grpcs://localhost:15051",
"eventUrl": "grpcs://localhost:15053",
"grpcOptions": {
"ssl-target-name-override": "peer2.org3.test.com"
},
"orderers": {
"orderer1.test.com": {
"url": "grpcs://localhost:7050"
},
"orderer2.test.com": {
"url": "grpcs://localhost:8050"
},
"orderer3.test.com": {
"url": "grpcs://localhost:9050"
}
}
}
}
}
I have tried changing org1MSP to org2MSP etc. and explorer successfully show only relevant peers. I am having a hard time trying to figure out why explorer can not parse successfully all orgs.
Any leads would be appreciated!

hyperledger explorer error problem reading the PEM file :: Error: EISDIR

I am trying to run hyperledger explorer for my fabric 1.3 network.
Hyperledger fabric configuration:
2 orgs
2 peers under each org
2 orderers
4 kafka and 3 zookeeper
These are running under 3 aws VMs using docker swarm and overlay network.
My hyperledger explorer config:
{
"network-configs": {
"network-1": {
"version": "1.0",
"clients": {
"client-1": {
"tlsEnable": true,
"organization": "Org1MSP",
"channel": "mychannel",
"credentialStore": {
"path": "./tmp/credentialStore_Org1/credential",
"cryptoStore": {
"path": "./tmp/credentialStore_Org1/crypto"
}
}
}
},
"channels": {
"mychannel": {
"peers": {
"peer0.org1.example.com": {},
"peer1.org1.example.com": {},
"peer0.org2.example.com": {},
"peer1.org2.example.com": {}
},
"connection": {
"timeout": {
"peer": {
"endorser": "6000",
"eventHub": "6000",
"eventReg": "6000"
}
}
}
}
},
"organizations": {
"Org1MSP": {
"mspid": "Org1MSP",
"fullpath": true,
"adminPrivateKey": {
"path":
"/home/ubuntu/efsmount/mynetwork/certs/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/keystore"
},
"signedCert": {
"path":
"/home/ubuntu/efsmount/mynetwork/certs/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/signcerts"
}
},
"Org2MSP": {
"mspid": "Org2MSP",
"adminPrivateKey": {
"path":
"/home/ubuntu/efsmount/mynetwork/certs/crypto-config/peerOrganizations/org2.example.com/users/Admin#org2.example.com/msp/keystore"
}
},
"OrdererMSP": {
"mspid": "OrdererMSP",
"adminPrivateKey": {
"path":
"/home/ubuntu/efsmount/mynetwork/certs/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/keystore"
}
}
},
"peers": {
"peer0.org1.example.com": {
"tlsCACerts": {
"path":
"/home/ubuntu/efsmount/mynetwork/certs/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
},
"url": "grpcs://172.31.15.22:7051",
"eventUrl": "grpcs://172.31.15.22:7053",
"grpcOptions": {
"ssl-target-name-override": "peer0.org1.example.com"
}
},
"peer1.org1.example.com": {
"tlsCACerts": {
"path":
"/home/ubuntu/efsmount/mynetwork/certs/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt"
},
"url": "grpcs://172.31.15.22:8051",
"eventUrl": "grpcs://172.31.15.22:8053",
"grpcOptions": {
"ssl-target-name-override": "peer1.org1.example.com"
}
},
"peer0.org2.example.com": {
"tlsCACerts": {
"path":
"/home/ubuntu/efsmount/mynetwork/certs/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt"
},
"url": "grpcs://172.31.0.27:9051",
"eventUrl": "grpcs://172.31.0.27:9053",
"grpcOptions": {
"ssl-target-name-override": "peer0.org2.example.com"
}
},
"peer1.org2.example.com": {
"tlsCACerts": {
"path":
"/home/ubuntu/efsmount/mynetwork/certs/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt"
},
"url": "grpcs://172.31.0.27:10051",
"eventUrl": "grpcs://172.31.0.27:10053",
"grpcOptions": {
"ssl-target-name-override": "peer1.org2.example.com"
}
}
},
"orderers": {
"orderer0.example.com": {
"url": "grpcs://172.31.15.22:7050"
},
"orderer1.example.com": {
"url": "grpcs://172.31.0.27:8050"
}
}
}
},
"configtxgenToolPath": "/home/ubuntu/efsmount/mynetwork/bin",
"license": "Apache-2.0"
}
Error log:
postgres://hppoc:password#127.0.0.1:5432/fabricexplorer
error: [NetworkConfig101.js]: NetworkConfig101 - problem reading the PEM file :: Error: EISDIR: illegal operation on a directory, read
<<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>>
{ Error: EISDIR: illegal operation on a directory, read
at Object.fs.readSync (fs.js:675:18)
at tryReadSync (fs.js:540:20)
at Object.fs.readFileSync (fs.js:583:19)
at readFileSync (/home/ubuntu/fabric/blockchain-explorer/blockchain-explorer/node_modules/fabric-client/lib/impl/NetworkConfig_1_0.js:418:17)
at getPEMfromConfig (/home/ubuntu/fabric/blockchain-explorer/blockchain-explorer/node_modules/fabric-client/lib/impl/NetworkConfig_1_0.js:407:13)
at NetworkConfig_1_0.getOrganization (/home/ubuntu/fabric/blockchain-explorer/blockchain-explorer/node_modules/fabric-client/lib/impl/NetworkConfig_1_0.js:263:18)
at Client._setAdminFromConfig (/home/ubuntu/fabric/blockchain-explorer/blockchain-explorer/node_modules/fabric-client/lib/Client.js:1221:53)
at Client.loadFromConfig (/home/ubuntu/fabric/blockchain-explorer/blockchain-explorer/node_modules/fabric-client/lib/Client.js:129:9)
at FabricClient.LoadClientFromConfig (/home/ubuntu/fabric/blockchain-explorer/blockchain-explorer/app/platform/fabric/FabricClient.js:215:27)
at FabricClient.initialize (/home/ubuntu/fabric/blockchain-explorer/blockchain-explorer/app/platform/fabric/FabricClient.js:53:16) errno: -21, code: 'EISDIR', syscall: 'read' }
(node:26776) DeprecationWarning: grpc.load: Use the #grpc/proto-loader module with grpc.loadPackageDefinition instead
Received kill signal, shutting down gracefully
Closed out connections
I have followed all these steps : https://github.com/hyperledger/blockchain-explorer to configure, build and start the explorer.
Any help would be appreciated.
Found the problem.
I have to pass keys file name in config file i.e. /home/ubuntu/efsmount/mynetwork/certs/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/keystore/{KEY FILE NAME HERE}

Unable to setup hyperledger explorer with one node (like basic network example)

Has anyone managed to setup hyperledger explorer with the basic network example (managed to set it up with first network). It wont pick up my peer/channel in this case. The configuration works with four peers and an orderer with two orgs (first-network) but I cant seem to get it to work with just one peer. Any help would be appreciated !
Fabric Version : 1.2
Explorer version : 3.7.1
config.json (The actual file is well formatted) :-
{
"network-configs": {
"network-1": {
"version": "1.0",
"clients": {
"client-1": {
"tlsEnable": true,
"organization": "Org1MSP",
"channel": "myc",
"credentialStore": {
"path": "./tmp/credentialStore_Org1/credential",
"cryptoStore": {
"path": "./tmp/credentialStore_Org1/crypto"
}
}
}
},
"channels": {
"myc": {
"peers": {
"peer0.org1.example.com": {}
},
"connection": {
"timeout": {
"peer": {
"endorser": "6000",
"eventHub": "6000",
"eventReg": "6000"
}
}
}
}
},
"organizations": {
"Org1MSP": {
"mspid": "Org1MSP",
"fullpath": false,
"adminPrivateKey": {
"path":
"/fabricsamples/basic-network/crypto-config/org1.example.com/users/Admin#org1.example.com/msp/keystore"
},
"signedCert": {
"path":
"/fabricsamples/basic-network/crypto-config/org1.example.com/users/Admin#org1.example.com/msp/signcerts"
}
},
"OrdererMSP": {
"mspid": "OrdererMSP",
"adminPrivateKey": {
"path":
"/fabricsamples/basic-network/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/keystore"
}
}
},
"peers": {
"peer0.org1.example.com": {
"tlsCACerts": {
"path":
"/fabricsamples/basic-network/crypto-config/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
},
"url": "grpcs://peer0.org1.example.com:7051",
"eventUrl": "grpcs://peer0.org1.example.com:7053",
"grpcOptions": {
"ssl-target-name-override": "peer0.org1.example.com"
}
}
},
"orderers": {
"orderer.example.com": {
"url": "grpcs://orderer.example.com:7050"
}
}
}
},
"configtxgenToolPath": "/home/ett/go/src/themeSCF/bin",
"license": "Apache-2.0"
}
Firstly, a few suggestions regarding your config file:
tlsEnable should be false - the basic-network example does not use TLS.
All URLs should use grpc - grpcs is only used when TLS is enabled.
All URLs should use localhost - assuming your path entries are correct, it looks like you are running Explorer locally (i.e. not in a container). In this scenario, all addresses should use localhost.
You also need to edit the docker-compose.yml file used by basic-network to add the following:
services:
peer0.org1.example.com:
environment:
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
Without this, the peer will reject all connections from outside its own organisation.
With this change applied to docker-compose.yml, I was able to successfully deploy Explorer 3.7 in a docker container by following the instructions here, using a configuration folder named basic-network and the following command:
./deploy_explorer.sh basic-network net_basic
and with the following config.json file in blockchain-explorer/examples/basic-network:
{
"network-configs": {
"network-1": {
"version": "1.0",
"clients": {
"client-1": {
"tlsEnable": false,
"organization": "Org1MSP",
"channel": "mychannel",
"credentialStore": {
"path": "./tmp/credentialStore_Org1/credential",
"cryptoStore": {
"path": "./tmp/credentialStore_Org1/crypto"
}
}
}
},
"channels": {
"mychannel": {
"peers": {
"peer0.org1.example.com": {}
},
"connection": {
"timeout": {
"peer": {
"endorser": "6000",
"eventHub": "6000",
"eventReg": "6000"
}
}
}
}
},
"organizations": {
"Org1MSP": {
"mspid": "Org1MSP",
"fullpath": false,
"adminPrivateKey": {
"path":
"/tmp/crypto/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/keystore"
},
"signedCert": {
"path":
"/tmp/crypto/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/signcerts"
}
},
"OrdererMSP": {
"mspid": "OrdererMSP",
"adminPrivateKey": {
"path":
"/tmp/crypto/ordererOrganizations/example.com/users/Admin#example.com/msp/keystore"
}
}
},
"peers": {
"peer0.org1.example.com": {
"tlsCACerts": {
"path":
"/tmp/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
},
"url": "grpc://peer0.org1.example.com:7051",
"eventUrl": "grpc://peer0.org1.example.com:7053",
"grpcOptions": {
"ssl-target-name-override": "peer0.org1.example.com"
}
}
},
"orderers": {
"orderer.example.com": {
"url": "grpc://orderer.example.com:7050"
}
}
}
},
"configtxgenToolPath": "/home/fabric-path/workspace/fabric-samples/bin",
"license": "Apache-2.0"
}
If you're still having trouble after following the instructions above, please post details of any errors reported by Blockchain Explorer, as well as the Blockchain Explorer log file (app.log). These can be viewed using the following commands when using the docker deployment script:
docker logs blockchain-explorer
docker exec -t blockchain-explorer cat /opt/logs/app/app.log

How to start the explorer v3.7

I want to run the hyperledger explorer to display my fabric network,but failed.Has
anyone know why?Very pleased to hear from your answer.
Here is my fabric network:
fabric network status
1: https://i.stack.imgur.com/x40Ya.pngstrong text
And my crypto-config absolute path is/root/go/src/github.com/hyperledger/fabric/examples/e2e_cli
this is my explorer config.json file:
{
"network-configs": {
"network-1": {
"version": "1.0",
"clients": {
"client-1": {
"tlsEnable": true,
"organization": "Org1MSP",
"channel": "mychannel",
"credentialStore": {
"path": "./tmp/credentialStore_Org1/credential",
"cryptoStore": {
"path": "./tmp/credentialStore_Org1/crypto"
}
}
}
},
"channels": {
"mychannel": {
"peers": {
"peer0.org1.example.com": {}
},
"connection": {
"timeout": {
"peer": {
"endorser": "6000",
"eventHub": "6000",
"eventReg": "6000"
}
}
}
}
},
"organizations": {
"Org1MSP": {
"mspid": "Org1MSP",
"fullpath": false,
"adminPrivateKey": {
"path":
"fabric-path/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/keystore"
},
"signedCert": {
"path":
"fabric-path/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/signcerts"
}
},
"Org2MSP": {
"mspid": "Org2MSP",
"adminPrivateKey": {
"path":
"fabric-path/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/users/Admin#org2.example.com/msp/keystore"
}
},
"OrdererMSP": {
"mspid": "OrdererMSP",
"adminPrivateKey": {
"path":
"fabric-path/fabric-samples/first-network/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/keystore"
}
}
},
"peers": {
"peer0.org1.example.com": {
"tlsCACerts": {
"path":
"fabric-path/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
},
"url": "grpcs://localhost:7051",
"eventUrl": "grpcs://localhost:7053",
"grpcOptions": {
"ssl-target-name-override": "peer0.org1.example.com"
}
},
"peer1.org1.example.com": {
"url": "grpcs://localhost:8051"
},
"peer0.org2.example.com": {
"url": "grpcs://localhost:9051"
},
"peer1.org2.example.com": {
"url": "grpcs://localhost:10051"
}
},
"orderers": {
"orderer.example.com": {
"url": "grpcs://localhost:7050"
}
}
},
"network-2": {}
},
"configtxgenToolPath": "fabric-path/fabric-samples/bin",
"license": "Apache-2.0"
}
error message is :
error message
could anyone can help me how to edit the config.json file or tell me the error point
Please see my answer to this question on running Blockchain Explorer. Following these instructions and using the config.json file below should get you running with the standard first-network example.
{
"network-configs": {
"network-1": {
"version": "1.0",
"clients": {
"client-1": {
"tlsEnable": true,
"organization": "Org1MSP",
"channel": "mychannel",
"credentialStore": {
"path": "./tmp/credentialStore_Org1/credential",
"cryptoStore": {
"path": "./tmp/credentialStore_Org1/crypto"
}
}
}
},
"channels": {
"mychannel": {
"peers": {
"peer0.org1.example.com": {}
},
"connection": {
"timeout": {
"peer": {
"endorser": "6000",
"eventHub": "6000",
"eventReg": "6000"
}
}
}
}
},
"organizations": {
"Org1MSP": {
"mspid": "Org1MSP",
"fullpath": false,
"adminPrivateKey": {
"path":
"/tmp/crypto/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/keystore"
},
"signedCert": {
"path":
"/tmp/crypto/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/signcerts"
}
},
"Org2MSP": {
"mspid": "Org2MSP",
"adminPrivateKey": {
"path":
"/tmp/crypto/peerOrganizations/org2.example.com/users/Admin#org2.example.com/msp/keystore"
}
},
"OrdererMSP": {
"mspid": "OrdererMSP",
"adminPrivateKey": {
"path":
"/tmp/crypto/ordererOrganizations/example.com/users/Admin#example.com/msp/keystore"
}
}
},
"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",
"eventUrl": "grpcs://peer0.org1.example.com:7053",
"grpcOptions": {
"ssl-target-name-override": "peer0.org1.example.com"
}
},
"peer1.org1.example.com": {
"tlsCACerts": {
"path":
"/tmp/crypto/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt"
},
"url": "grpcs://peer1.org1.example.com:7051",
"eventUrl": "grpcs://peer1.org1.example.com:7053",
"grpcOptions": {
"ssl-target-name-override": "peer1.org1.example.com"
}
},
"peer0.org2.example.com": {
"tlsCACerts": {
"path":
"/tmp/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt"
},
"url": "grpcs://peer0.org2.example.com:7051",
"eventUrl": "grpcs://peer0.org2.example.com:7053",
"grpcOptions": {
"ssl-target-name-override": "peer0.org2.example.com"
}
},
"peer1.org2.example.com": {
"tlsCACerts": {
"path":
"/tmp/crypto/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt"
},
"url": "grpcs://peer1.org2.example.com:7051",
"eventUrl": "grpcs://peer1.org2.example.com:7053",
"grpcOptions": {
"ssl-target-name-override": "peer1.org2.example.com"
}
}
},
"orderers": {
"orderer.example.com": {
"url": "grpcs://orderer.example.com:7050"
}
}
}
},
"configtxgenToolPath": "/home/fabric-path/workspace/fabric-samples/bin",
"license": "Apache-2.0"
}

Resources