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"
}
Related
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"
}
}
}
}
}
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!
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.
I am integrating hyperledger node sdk with a tunning blockchain network with TLS enabled. I am able to invoke query the chaincode succesfully. I am able to enroll admin successfully. But when i register user i get below error.
Failed to register user "user1": Error: Calling register endpoint failed with error [Error: unable to verify the first certificate]
Below is my connection.js
{
"name": "byfn",
"version": "1.0.0",
"client": {
"organization": "org1",
"credentialStore": {
"path": "./wallet",
"cryptoStore": {
"path": "./wallet"
}
}
},
"channels": {
"foundational": {
"orderers": [
"orderer0.orgledger.com",
"orderer1.orgledger.com"
],
"peers": {
"peer0.org1.orgledger.com": {
"endorsingPeer": true,
"chaincodeQuery": true,
"ledgerQuery": true,
"eventSource": true
},
"peer0.org2.orgledger.com": {
"endorsingPeer": false,
"chaincodeQuery": true,
"ledgerQuery": true,
"eventSource": true
},
"peer0.org3.orgledger.com": {
"endorsingPeer": false,
"chaincodeQuery": true,
"ledgerQuery": true,
"eventSource": true
}
}
}
},
"organizations": {
"org1": {
"mspid": "org1MSP",
"peers": [
"peer0.org1.orgledger.com"
],
"certificateAuthorities": [
"ca.orgledger.com"
],
"adminorg3Key": {
"path": "../crypto-config/peerOrganizations/org1.orgledger.com/users/Admin#org1.orgledger.com/msp/keystore/3442d5a33729209d7c33b00b53f57ef09d9e24b592eb8f0b48d1077db2e0d4a6_sk"
},
"signedCert": {
"path" : "../crypto-config/peerOrganizations/org1.orgledger.com/users/Admin#org1.orgledger.com/msp/signcerts/Admin#org1.orgledger.com-cert.pem"
}
},
"org2": {
"mspid": "org2MSP",
"peers": [
"peer0.org2.orgledger.com"
],
"certificateAuthorities": [
"ca.orgledger.com"
],
"adminorg3Key": {
"path": "../crypto-config/peerOrganizations/org2.orgledger.com/users/Admin#org2.orgledger.com/msp/keystore/a0c574a2ef9054ed22905458e68e74185ada86446c9a39faa223fff43f05d4e1_sk"
},
"signedCert": {
"path" : "../crypto-config/peerOrganizations/org2.orgledger.com/users/Admin#org2.orgledger.com/msp/signcerts/Admin#org2.orgledger.com-cert.pem"
}
},
"org3": {
"mspid": "org3MSP",
"peers": [
"peer0.org3.orgledger.com"
],
"certificateAuthorities": [
"ca.orgledger.com"
],
"adminorg3Key": {
"path": "../crypto-config/peerOrganizations/org3.orgledger.com/users/Admin#org3.orgledger.com/msp/keystore/afef5529f601bde779b12306aaeb497d9a400f13240d9d2ec4245caa2765cb88_sk"
},
"signedCert": {
"path" : "../crypto-config/peerOrganizations/org3.orgledger.com/users/Admin#org3.orgledger.com/msp/signcerts/Admin#org3.orgledger.com-cert.pem"
}
}
},
"orderers": {
"orderer0.orgledger.com": {
"url": "grpcs://localhost:22050",
"grpcOptions":{
"ssl-target-name-override": "orderer0.orgledger.com",
"grpc.keepalive_timeout_ms": 15
},
"tlsCACerts": {
"path": "../crypto-config/ordererOrganizations/orgledger.com/orderers/orderer0.orgledger.com/msp/tlscacerts/tlsca.orgledger.com-cert.pem"
}
},
"orderer1.orgledger.com": {
"url": "grpcs://localhost:23050",
"grpcOptions":{
"ssl-target-name-override": "orderer1.orgledger.com",
"grpc.keepalive_timeout_ms": 15
},
"tlsCACerts": {
"path": "../crypto-config/ordererOrganizations/orgledger.com/orderers/orderer1.orgledger.com/msp/tlscacerts/tlsca.orgledger.com-cert.pem"
}
}
},
"peers": {
"peer0.org1.orgledger.com": {
"url": "grpcs://localhost:7051",
"eventUrl": "grpcs://localhost:7053",
"grpcOptions":{
"ssl-target-name-override": "peer0.org1.orgledger.com",
"grpc.keepalive_time_ms": 600000
},
"tlsCACerts": {
"path": "../crypto-config/peerOrganizations/org1.orgledger.com/tlsca/tlsca.org1.orgledger.com-cert.pem"
}
},
"peer0.org2.orgledger.com": {
"url": "grpcs://localhost:8051",
"eventUrl": "grpcs://localhost:8053",
"grpcOptions":{
"ssl-target-name-override": "peer0.org2.orgledger.com",
"grpc.keepalive_time_ms": 600000
},
"tlsCACerts": {
"path": "../crypto-config/peerOrganizations/org2.orgledger.com/tlsca/tlsca.org2.orgledger.com-cert.pem"
}
},
"peer0.org3.orgledger.com": {
"url": "grpcs://localhost:9051",
"eventUrl": "grpcs://localhost:9053",
"grpcOptions":{
"ssl-target-name-override": "peer0.org3.orgledger.com",
"grpc.keepalive_time_ms": 600000
},
"tlsCACerts": {
"path": "../crypto-config/peerOrganizations/org3.orgledger.com/tlsca/tlsca.org3.orgledger.com-cert.pem"
}
}
},
"certificateAuthorities": {
"ca.orgledger.com": {
"url": "https://localhost:7054",
"caName": "ca.orgledger.com"
},
"httpOptions": {
"verify": false
},
"tlsCACerts": {
"path": "../crypto-config/peerOrganizations/org1.orgledger.com/ca/ca.org1.orgledger.com-cert.pem"
},
"registrar": [
{
"enrollId": "admin",
"enrollSecret": "adminpw"
}
]
}
}
The options for certificatAuthorities are in the wrong place, try this way:
...
"certificateAuthorities": {
"ca.orgledger.com": {
"url": "https://localhost:7054",
"caName": "ca.orgledger.com",
"httpOptions": {
"verify": false
},
"tlsCACerts": {
"path": "../crypto-config/peerOrganizations/org1.orgledger.com/ca/ca.org1.orgledger.com-cert.pem"
},
"registrar": [
{
"enrollId": "admin",
"enrollSecret": "adminpw"
}
]
}
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}