Failed to connect client peer, please check the configuration and peer status - hyperledger-fabric

I have one error with Explorer 3.7 and fabric version 1.2.0.
The console display error:
Sync process is started for the network : [dev] and client : [client]
>>>>>>>>>>>>>>>>>>>>
Error : [ 'Failed to connect client peer, please check the configuration and peer status' ]
>>>>>>>>>>>>>>>>>>>>
The blockchain-explorer/logs/sync/app/app.log display error
[2018-09-28 13:41:10.692] [DEBUG] FabricClient - Channel genesis hash for channel [mychannel] >> e520121a6edb2794eb85505d5f5319d29286acb43d0280e0f0f75a130e79889c
[2018-09-28 13:41:10.692] [DEBUG] FabricClient - Initialized channel >> mychannel
[2018-09-28 13:41:10.723] [DEBUG] FabricClient - Set client [client-1] default orderer as >> grpcs://orderer.yx.com:7050
[2018-09-28 13:41:10.724] [DEBUG] FabricClient - Admin peer Not found for grpcs://peer0.org1.yx.com:7051
[2018-09-28 13:49:22.980] [DEBUG] Sync - Start synchronizer
My config.json file is :
{
"network-configs": {
"dev": {
"version": "1.0",
"clients": {
"client": {
"tlsEnable": true,
"organization": "Org1MSP",
"channel": "mychannel",
"credentialStore": {
"path": "./tmp/credentialStore_Org1/credential",
"cryptoStore": {
"path": "./tmp/credentialStore_Org1/crypto"
}
}
}
},
"channels": {
"mychannel": {
"peers": {
"peer0.org1.yx.com": {}
},
"connection": {
"timeout": {
"peer": {
"endorser": "6000",
"eventHub": "6000",
"eventReg": "6000"
}
}
}
}
},
"organizations": {
"Org1MSP": {
"mspid": "Org1MSP",
"fullpath": false,
"adminPrivateKey": {
"path":
"/root/blockchain-explorer/examples/dockerConfig/crypto/peerOrganizations/org1.yx.com/users/Admin#org1.yx.com/msp/keystore"
},
"signedCert": {
"path":
"/root/blockchain-explorer/examples/dockerConfig/crypto/peerOrganizations/org1.yx.com/users/Admin#org1.yx.com/msp/signcerts"
}
},
"OrdererMSP": {
"mspid": "OrdererMSP",
"adminPrivateKey": {
"path": "/root/blockchain-explorer/examples/dockerConfig/crypto/ordererOrganizations/yx.com/users/Admin#yx.com/msp/keystore"
}
}
},
"peers": {
"peer0.org1.yx.com": {
"tlsCACerts": {
"path": "/root/blockchain-explorer/examples/dockerConfig/crypto/peerOrganizations/org1.yx.com/peers/peer0.org1.yx.com/tls/ca.crt"
},
"url": "grpcs://peer0.org1.yx.com:7051",
"eventUrl": "grpcs://peer0.org1.yx.com:7053",
"grpcOptions": {
"ssl-target-name-override": "peer0.org1.yx.com"
}
}
},
"orderers": {
"orderer.yx.com": {
"url": "grpcs://orderer.yx.com:7050"
}
}
},
"configtxgenToolPath": "/root/blockchain-explorer/bin",
"license": "Apache-2.0"
}
}
hosts file in CentOS7 is
192.168.2.220 orderer.yx.com
192.168.2.221 cli.yx.com
192.168.2.222 peer0.org1.yx.com
192.168.2.223 peer1.org1.yx.com
192.168.2.224 peer0.org2.yx.com

You could try change url, eventUrl of peers, orderer to ip address, like this:
"peer0.org1.yx.com": {
"tlsCACerts": {
"path": "/root/blockchain-explorer/examples/dockerConfig/crypto/peerOrganizations/org1.yx.com/peers/peer0.org1.yx.com/tls/ca.crt"
},
"url": "grpcs://192.168.2.222:7051",
"eventUrl": "grpcs://192.168.2.222:7053",
"grpcOptions": {
"ssl-target-name-override": "peer0.org1.yx.com"
}
}

make sure that CORE_PEER_GOSSIP_EXTERNALENDPOINT exists in your docker compose file for peers and also grpc and grpcs configured correctly.

Related

Issue when trying to connect explorer with Hyperledger fabric network hosted on different machines

I am setting up explorer for fabric network which was running in some different machine(say IP 12.34.56.78),when i try to start the script start.sh from explorer i struck with this error.
Successfully connected on single instance(both explorer and fabric on a single machine) but facing error when trying to connect on different machines.
Here is the config.json file where i am changing parameters.
{
"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": "/home/dinesh/HyperExplorer/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/keystore"
},
"signedCert": {
"path": "/home/dinesh/HyperExplorer/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/signcerts"
}
},
"Org2MSP": {
"mspid": "Org2MSP",
"adminPrivateKey": {
"path": "/home/dinesh/HyperExplorer/fabric-samples/first-network/crypto-config/peerOrganizations/org2.example.com/users/Admin#org2.example.com/msp/keystore"
}
},
"OrdererMSP": {
"mspid": "OrdererMSP",
"adminPrivateKey": {
"path": "/home/dinesh/HyperExplorer/fabric-samples/first-network/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/keystore"
}
}
},
"peers": {
"peer0.org1.example.com": {
"tlsCACerts": {
"path": "/home/dinesh/HyperExplorer/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
},
"url": "grpcs://12.34.56.78:7051",
"eventUrl": "grpcs://l12.34.56.78:7053",
"grpcOptions": {
"ssl-target-name-override": "peer0.org1.example.com"
}
},
"peer1.org1.example.com": {
"url": "grpcs://12.34.56.78:8051"
},
"peer0.org2.example.com": {
"url": "grpcs://12.34.56.78:9051"
},
"peer1.org2.example.com": {
"url": "grpcs://12.34.56.78:10051"
}
},
"orderers": {
"orderer.example.com": {
"url": "grpcs://12.34.56.78:7050"
}
}
},
"network-2": {}
},
"configtxgenToolPath": "/home/dinesh/HyperExplorer/fabric-samples/bin",
"license": "Apache-2.0"
}
Error
(node:16024) DeprecationWarning: grpc.load: Use the #grpc/proto-loader
module with grpc.loadPackageDefinition instead
2019-05-28T13:26:18.102Z - error: [Remote.js]: Error: Failed to
connect before the deadline URL:grpcs://localhost:7050
<<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>> {
Error: Failed to connect before the deadline
URL:grpcs://localhost:7050
at checkState (/home/dinesh/Music/blockchain-explorer-master/node_modules/grpc/src/client.js:720:16)
connectFailed: true }
Did you set the discovery options in your SDK?
Here the link to the discovery options in the official HL NodeJS Fabric SDK documentation.
https://fabric-sdk-node.github.io/release-1.4/module-fabric-network.Gateway.html#~DiscoveryOptions
You may need to add the IP address of the explorer machine on the fabric network, also copy the permission file from the fabric network machine to explorer machine, similar to the sftp protocol
You didn't set environment variable DISCOVERY_AS_LOCALHOST to false in start.sh file. That was the reason you saw: localhost.
Ensure check explorerconfig.json if sync process is running from different locations
"sync": {
"type": "host"
}

Connect Hyperledger Fabric Explorer to fabric network hosted on different instance

I am trying to connect blockchain explorer(running locally) with hyperledger network(running on ec2 instance). I am facing some issues. These are the steps I followed:
Hyperledger network is running on ec2 instance. Checked the logs and also made sure ports are not blocked by firewall.
Set sync type to "host" in explorerconfig.json
The network is non-TLS. So, given "tlsEnable": false in config.json file. Also used grpc instead of grpcs. The url is like grpc://2.43.155.20:7051, where 2.43.155.20 is the ip of ec2 instance.
After building, when I run ./start.sh, I get following error:
2019-02-26T09:40:11.361Z - [31merror[39m: [Remote.js]: Error: Failed
to connect before the deadline URL:grpc://localhost:7050
<<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>> {
Error: Failed to connect before the deadline URL:grpc://localhost:7050
at checkState (blockchain-explorer/node_modules/grpc/src/client.js:720:16)
connectFailed: true } Received kill signal, shutting down gracefully
Closed out connections
Can anyone let me know what could be causing this issue?
**Note: I installed explorer and fabric network on the same instance and connected them. It worked. Now, when I try to connect to a different instance where my network is hosted, it doesn't work.
edit
Location of config.json: blockchain-explorer/app/platform/fabric/config.json.
Content:
{
"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": "$PATH/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/keystore"
},
"signedCert": {
"path": "$PATH/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/signcerts"
}
},
"OrdererMSP": {
"mspid": "OrdererMSP",
"adminPrivateKey": {
"path": "$PATH/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/keystore"
}
}
},
"peers": {
"peer0.org1.example.com": {
"tlsCACerts": {
"path": "$PATH/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
},
"url": "grpc://2.43.155.20::7051",
"eventUrl": "grpc://2.43.155.20::7053",
"grpcOptions": {
"ssl-target-name-override": "peer0.org1.example.com"
}
},
"peer1.org1.example.com": {
"url": "grpc://2.43.155.20::8051"
}
},
"orderers": {
"orderer.example.com": {
"url": "grpc://2.43.155.20::7050"
}
}
},
"network-2": {}
},
"configtxgenToolPath": "$SOME_PATH/hyperledger/fabric/common/tools",
"license": "Apache-2.0"
}
Hyperledger Explorer is trying to connect to the orderer node, but he is using the wrong host. Did you checked the orderer node host in the config.json ?
grpc://2.43.155.20:7050

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

Hyperledger explorer docker connection error

I created hyper ledger fabric network configuration and docker is running based on that. After that, I installed .bna file on that network.
I am trying to set up Hyperledger explorer docker images to explore data. I set explorer my folder structure as given as in the instruction.
my config.json file is like below.
{
"network-configs": {
"network-1": {
"version": "1.0",
"clients": {
"client-1": {
"tlsEnable": true,
"organization": "EngineeringMSP",
"channel": "testchannel",
"credentialStore": {
"path": "./tmp/credentialStore_Engineering/credential",
"cryptoStore": {
"path": "./tmp/credentialStore_Engineering/crypto"
}
}
}
},
"channels": {
"testchannel": {
"peers": {
"peer0.engineering.test.com": {}
},
"connection": {
"timeout": {
"peer": {
"endorser": "6000",
"eventHub": "6000",
"eventReg": "6000"
}
}
}
}
},
"organizations": {
"EngineeringMSP": {
"mspid": "EngineeringMSP",
"fullpath": false,
"adminPrivateKey": {
"path": "/tmp/crypto/peerOrganizations/engineering.test.com/users/Admin#engineering.test.com/msp/keystore"
},
"signedCert": {
"path": "/tmp/crypto/peerOrganizations/engineering.test.com/users/Admin#engineering.test.com/msp/signcerts"
}
},
"OrdererMSP": {
"mspid": "OrdererMSP",
"adminPrivateKey": {
"path": "/tmp/crypto/ordererOrganizations.test.com/users/Admin.test.com/msp/keystore"
}
}
},
"peers": {
"peer0.engineering.test.com": {
"tlsCACerts": {
"path": "/tmp/crypto/peerOrganizations/engineering.test.com/peers/peer0.engineering.test.com/tls/ca.crt"
},
"url": "grpc://localhost:7051",
"eventUrl": "grpc://localhost:7053",
"grpcOptions": {
"ssl-target-name-override": "peer0.engineering.test.com"
}
}
},
"orderers": {
"orderer.example.com": {
"url": "grpc://localhost:7050"
}
}
}
},
"configtxgenToolPath": "./bin",
"license": "Apache-2.0"
}
After I am executing command ./deploy_explorer.sh poc <network name> I am getting error like.
postgres://hppoc:password#192.168.10.11:5432/fabricexplorer
/bin/sh: locate: not found
/bin/sh: locate: not found
/bin/sh: locate: not found
error: [Remote.js]: Error: Failed to connect before the deadline
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: Failed to connect before the deadline
at checkState (/opt/explorer/node_modules/grpc/src/client.js:838:16)
2018-10-19T05:59:05.103447389Z
**************************************************************************************
Error : Failed to connect client peer, please check the configuration and peer status
Info : Explorer will continue working with only DB data
**************************************************************************************
2018-10-19T05:59:05.103656561Z
2018-10-19T05:59:05.114643537Z
2018-10-19T05:59:05.114721428Z
Please open web browser to access :http://localhost:8080/
2018-10-19T05:59:05.114745161Z
2018-10-19T05:59:05.114749276Z
pid is 6
2018-10-19T05:59:05.114757612Z
2018-10-19T05:59:05.114761455Z
<<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>
I checked my postgers db which is in docker container and it don't have any data in fabricexplorer database tables.
can anyone help me?
Change all the urls in your config.json to, example:
"orderers": {
"orderer.example.com": {
"url": "grpc://localhost:7050"
}
}
Should be
"orderers": {
"orderer.example.com": {
"url": "grpc://orderer.example.com:7050"
}
}
Follow up on instructions in blockchain-explorer/examples/net1/README.md

Hyperledger Fabric Explorer config.json error

I am trying to run Explorer 3.6 for fabric version 1.2.0.I am using balance-transfer app for testing.My config.json file is as below-
{
"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": false,
"adminPrivateKey": {
"path":
"/home/ak/fabric-samples/balance-trasnfer/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/keystore"
},
"signedCert": {
"path":
"/home/ak/fabric-samples/balance-transfer/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/signcerts"
}
},
"Org2MSP": {
"mspid": "Org2MSP",
"adminPrivateKey": {
"path":
"/home/ak/fabric-samples/balance-transfer/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin#org2.example.com/msp/keystore"
}
},
"OrdererMSP": {
"mspid": "OrdererMSP",
"adminPrivateKey": {
"path":
"/home/ak/fabric-samples/balance-transfer/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin#example.com/msp/keystore"
}
}
},
"peers": {
"peer0.org1.example.com": {
"tlsCACerts": {
"path":
"/home/ak/fabric-samples/balance-transfer/artifacts/channel/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:7056",
"tlsCACerts": {
"path":
"/home/ak/fabric-samples/balance-transfer/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt"
},
"eventUrl": "grpcs://localhost:7053",
"grpcOptions": {
"ssl-target-name-override": "peer1.org1.example.com"
}
},
"peer0.org2.example.com": {
"url": "grpcs://localhost:9051",
"tlsCACerts": {
"path":
"/home/ak/fabric-samples/balance-transfer/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt"
},
"eventUrl": "grpcs://localhost:7053",
"grpcOptions": {
"ssl-target-name-override": "peer0.org2.example.com"
}
},
"peer1.org2.example.com": {
"url": "grpcs://localhost:8056",
"tlsCACerts": {
"path":
"/home/ak/fabric-samples/balance-transfer/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt"
},
"eventUrl": "grpcs://localhost:7053",
"grpcOptions": {
"ssl-target-name-override": "peer1.org2.example.com"
}
}
},
"orderers": {
"orderer.example.com": {
"url": "grpcs://localhost:7050",
"tls_cacerts":"/home/ak/fabric-samples/balance-transfer/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt"
}
}
}
},
"configtxgenToolPath": "/home/ak/fabric-samples/bin",
"license": "Apache-2.0"
}
The error I am getting is:-
Sync process is started for the network : [network-1] and client : [client-1]
<<<<<<<<<<<<<<<<<<<<<<<<<< Synchronizer Error >>>>>>>>>>>>>>>>>>>>>
Error : [ 'Failed to connect client peer, please check the configuration and peer status' ]
<<<<<<<<<<<<<<<<<<<<<<<<<< Closing client processor >>>>>>>>>>>>>>>>>>>>>
Following is the error log
[2018-09-27 10:58:14.006] [DEBUG] FabricClient - Admin peer Not found for grpcs://localhost:7051
Can you try changing your peer "url" and "eventUrl" in the following format:
"url": "grpcs://peer0.org1.example.com:7051"
I'm using docker instance to run blockchain explorer and this format works for me.
You must find ip and port of running peers and orderer and make changes in config.json. You can use docker ps to make sure that containers are running and see the ports related to each container.
Also, take a look at to this link about Explorer. The link shows the steps needed to change config.json and run explorer.
I changed the sync in the explorerconfig.json under blockchain-explorer/app
"sync": {
"type": "host",
"platform": "fabric",
"blocksSyncTime": "3"
}
The error is gone.
In my case I was missing the last line (CORE_PEER_GOSSIP_EXTERNALENDPOINT)
peer0.org1.example.com:
container_name: peer0.org1.example.com
image: hyperledger/fabric-peer
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_ID=peer0.org1.example.com
- CORE_LOGGING_PEER=info
- CORE_CHAINCODE_LOGGING_LEVEL=info
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
in the corresponding docker-compose.yml which describes the network.
Without this line, it seems that peer is only visible inside the org.
You need also to ./generate.sh and ./start.sh your network.
Hope it helps.

Resources