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
Related
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"
}
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
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}
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
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.