I set up hyperledger fabric network by reading this document https://learn.microsoft.com/en-us/azure/blockchain/templates/hyperledger-fabric-consortium-azure-kubernetes-service. Network side everything worked properly. Now I wanted to set up hyperledger fabric explorer for this network. In order to do that, I did the follwing steps,
- git clone https://github.com/hyperledger/blockchain-explorer.git
- git checkout tags/v1.0.0-rc2
- app/persistence/fabric/postgreSQL/db
- ./createdb.sh
- ./main.sh install
- Replaced the connection profile (app/platform/fabric/connection-profile/first-network.json) like the following,
{
"certificateAuthorities": {
"ca.xxxxxxxxxxxxx.eastus.aksapp.io": {
"caName": "ca.org1",
"tlsCACerts": {
"pem": "-----BEGIN CERTIFICATE-----dfsajk-----END CERTIFICATE-----\n"
},
"url": "grpcs://ca.xxxxxxxxxxxxx.eastus.aksapp.io:443"
}
},
"client": {
"tlsEnable": true,
"adminUser": "admin.org1",
"adminPassword": "",
"enableAuthentication": false,
"connection": {
"timeout": {
"orderer": "300",
"peer": {
"endorser": "300"
}
}
},
"organization": "org1"
},
"channels": {
"hrschannel": {
"orderers": ["orderer1.yyyyyyyyyyyyyyyyyyyyy.eastus.aksapp.io"],
"peers": {
"peer1.xxxxxxxxxxxxx.eastus.aksapp.io": {}
}
}
},
"name": "org1",
"organizations": {
"org1": {
"certificateAuthorities": [
"org1CA"
],
"mspid": "org1",
"peers": [
"peer1.xxxxxxxxxxxxx.eastus.aksapp.io"
]
}
},
"peers": {
"peer1.xxxxxxxxxxxxx.eastus.aksapp.io": {
"grpcOptions": {
"hostnameOverride": "peer1.xxxxxxxxxxxxx.eastus.aksapp.io",
"ssl-target-name-override": "peer1.xxxxxxxxxxxxx.eastus.aksapp.io"
},
"tlsCACerts": {
"pem": "-----BEGIN CERTIFICATE-----jjdadjijfifawj-----END CERTIFICATE-----\n"
},
"url": "grpcs://peer1.xxxxxxxxxxxxx.eastus.aksapp.io:443"
}
},
"version": "1.0.0",
"wallet": "org1"
}
But I got the following error here tail -f logs/console/console-2020-07-08.log
false 'ssl-certs' '/home/css/delete/blockchain-explorer/ssl-certs'
******* Initialization started for hyperledger fabric platform ******, { 'first-network':
{ name: 'first-network',
profile: './connection-profile/first-network.json' } }
client_configs.name first-network client_configs.profile ./connection-profile/first-network.json
FabricUtils.createFabricClient
config.client.tlsEnable true
FabricConfig, this.config.channels hrschannel
initializeChannelFromDiscover hrschannel
FabricClient.discover_results endpoint { host: 'orderer1.1111111111111111111.eastus.aksapp.io',
port: 443 }
initializeChannelFromDiscover.discoveryProtocol grpcs requesturl grpcs://orderer1.1111111111111111111.eastus.aksapp.io:443
FabricClient.discover_results endpoint { host: 'orderer2.1111111111111111111.eastus.aksapp.io',
port: 443 }
initializeChannelFromDiscover.discoveryProtocol grpcs requesturl grpcs://orderer2.1111111111111111111.eastus.aksapp.io:443
FabricClient.discover_results endpoint { host: 'orderer3.1111111111111111111.eastus.aksapp.io',
port: 443 }
initializeChannelFromDiscover.discoveryProtocol grpcs requesturl grpcs://orderer3.1111111111111111111.eastus.aksapp.io:443
2020-07-08T16:15:30.879Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:443
FabricUtils.createDetachClient
initializeListener, client_name, client first-network { name: 'first-network',
profile: './connection-profile/first-network.json' }
Please open web browser to access ???http://localhost:8080/
pid is 13408
Sync process is started for the network : [first-network] and client : [first-network]
config.client.tlsEnable true
FabricConfig, this.config.channels hrschannel
(node:13836) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead
An identity for the admin user: admin.org1 already exists in the wallet
initializeChannelFromDiscover hrschannel
FabricClient.discover_results endpoint { host: 'orderer1.1111111111111111111.eastus.aksapp.io',
port: 443 }
initializeChannelFromDiscover.discoveryProtocol grpcs requesturl grpcs://orderer1.1111111111111111111.eastus.aksapp.io:443
FabricClient.discover_results endpoint { host: 'orderer2.1111111111111111111.eastus.aksapp.io',
port: 443 }
initializeChannelFromDiscover.discoveryProtocol grpcs requesturl grpcs://orderer2.1111111111111111111.eastus.aksapp.io:443
FabricClient.discover_results endpoint { host: 'orderer3.1111111111111111111.eastus.aksapp.io',
port: 443 }
initializeChannelFromDiscover.discoveryProtocol grpcs requesturl grpcs://orderer3.1111111111111111111.eastus.aksapp.io:443
2020-07-08T16:15:37.490Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:443
SyncServices.synchNetworkConfigToDB client first-network channel_name hrschannel
2020-07-08T16:15:40.744Z - error: [Remote.js]: Error: Failed to connect before the deadline URL:grpcs://localhost:443
<<<<<<<<<<<<<<<<<<<<<<<<<< Synchronizer Error >>>>>>>>>>>>>>>>>>>>>
Error: Orderer with name "orderer2.1111111111111111111.eastus.aksapp.io:443" not assigned to this channel
at Channel.getOrderer (/home/css/delete/blockchain-explorer/node_modules/fabric-network/node_modules/fabric-client/lib/Channel.js:928:10)
at FabricClient.switchOrderer (/home/css/delete/blockchain-explorer/app/platform/fabric/FabricClient.js:681:27)
at FabricClient.getGenesisBlock (/home/css/delete/blockchain-explorer/app/platform/fabric/FabricClient.js:611:26)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)
<<<<<<<<<<<<<<<<<<<<<<<<<< Closing client processor >>>>>>>>>>>>>>>>>>>>>
req.body { user: 'admin', password: 'adminpw', network: 'first-network' }
Network: first-network enableAuthentication false
Please help me to fix this issue.