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.
Related
Running hlf 1.4 and latest explorer in kubernetes. Explorer hangs in the start phase where it tries to reach peers. It doesn't reach the code were it starts web interface.
Peer has chaincode installed, connected to channel, no issues.
I have disabled TLS to make investigation easier and put logs in Channel.js, Peer.js in explorer dependencies to better investigate it.
I have added log to Channel.js in
/blockchain-explorer/node_modules/fabric-client/lib/Channel.js
to print connect to target and I can see that it shows grpc://localhost:undefined. I believe it tries to send request to invalid address and silently dies. Entire file https://gist.github.com/gad0lin/51384bfea1c207ccf016a0cad8e413b6#file-channel-js-L3474.
[{"_options":"1","_url":"2","_endpoint":"3","_name":"4","_request_timeout":45000,"_grpc_wait_for_ready_timeout":3000,
"_endorserClient":"5","_discoveryClient":"6"},{"name":"4","grpc.ssl_target_name_override":"4","grpc.default_authority":"4","grpc.max_receive_message_length":-1,"grpc.max_send_message_length":-1},"grpc://localhost:undefined",{"addr":"7","creds":"8"},"peer1-hlf-peer.peers.svc.cluster.local",
{"$interceptors":"9","$interceptor_providers":"10","$channel":"11"},{"$interceptors":"12","$interceptor_providers":"13","$channel":"14"},"localhost",{},[],[],{},[],[],{}]
Here is hlf config:
{
"network-configs": {
"network-1": {
"version": "1.0",
"clients": {
"cli": {
"tlsEnable": false,
"organization": "Org1MSP",
"channel": "mychannel",
"credentialStore": {
"path": "./tmp/credentialStore_Org1/credential",
"cryptoStore": {
"path": "./tmp/credentialStore_Org1/crypto"
}
}
}
},
"channels": {
"mychannel": {
"peers": {
"peer1-hlf-peer.peers.svc.cluster.local": {}
},
"connection": {
"timeout": {
"peer": {
"endorser": "30",
"eventHub": "30",
"eventReg": "30"
}
}
}
}
},
"organizations": {
"Org1MSP": {
"certificateAuthorities": ["fabric-ca"],
"mspid": "Org1MSP",
"fullpath": true,
"adminPrivateKey": {
"path": "/var/hyperledger/msp/admincerts/key.pem"
},
"signedCert": {
"path": "/var/hyperledger/msp/admincerts/cert.pem"
}
}
},
"peers": {
"peer1-hlf-peer.peers.svc.cluster.local": {
"url": "grpc://peer1-hlf-peer.peers.svc.cluster.local:7051",
"eventUrl": "grpc://peer1-hlf-peer.peers.svc.cluster.local:7053",
"grpcOptions": {
"ssl-target-name-override": "peer1-hlf-peer.peers.svc.cluster.local"
}
}
},
"orderers": {
"ord1-hlf-ord.orderers.svc.cluster.local" : {
"url":"grpc://ord1-hlf-ord.orderers.svc.cluster.local:7050"
}
},
"certificateAuthorities": {
"fabric-ca": {
"url": "http://ca-hlf-ca.cas.svc.cluster.local:7054",
"httpOptions":{
"verify": false
},
"registrar": {
"enrollId": "admin",
"enrollSecret": "adminpw"
},
"caName": "ca"
}
}
}
}
}{
"persistence": "postgreSQL",
"platforms": ["fabric"],
"postgreSQL": {
"host": "explorer-db.x.svc.cluster.local",
"port": "5432",
"database": "fabricexplorer",
"username": "hppoc",
"passwd": "password"
},
"sync": {
"type": "local",
"platform": "fabric",
"blocksSyncTime": "3"
}
}
I found the culprit. There were two issues.
I didn't set environment variable DISCOVERY_AS_LOCALHOST to false in explorer config. That was the reason I saw: localhost.
In peer I had set variable CORE_PEER_GOSSIP_EXTERNALENDPOINT, but without port. That was the reason I saw undefined as port.
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 am trying to implement a multi-organization network with fabric kafka with TLS enabled mode. I added currently one organization with Kafka multi orderer mode. The network starts well and peers are joined to channel. I am having .bna file which and trying to install its working fine. After that, I am trying to start a network it fails.
✖ Starting business network definition. This may take a minute...
Error: Error trying to start business network. Error: Failed to receive commit notification from localhost:7051 for transaction '76d7dfd29df7c65442c6fe8ea87898f53604c539910b985c2bb89b3fea0f10a0' within the timeout period
My connection profile JSON is given below
{
"name": "example",
"x-type": "hlfv1",
"x-commitTimeout": 300,
"version": "1.0.0",
"client": {
"organization": "Org1",
"connection": {
"timeout": {
"peer": {
"endorser": "1500",
"eventHub": "1500",
"eventReg": "1500"
},
"orderer": "1500"
}
}
},
"channels": {
"mychannel": {
"orderers": [
"orderer0.example.com",
"orderer1.example.com",
"orderer2.example.com"
],
"peers": {
"peer0.org1.example.com": {
"endorsingPeer": true,
"chaincodeQuery": true,
"eventSource": true
},
"peer1.org1.example.com": {
"endorsingPeer": true,
"chaincodeQuery": true,
"eventSource": true
}
}
}
},
"organizations": {
"Org1": {
"mspid": "Org1MSP",
"peers": [
"peer0.org1.example.com",
"peer1.org1.example.com"
],
"certificateAuthorities": [
"ca.org1.example.com"
]
}
},
"orderers": {
"orderer0.example.com": {
"url": "grpcs://localhost:7050",
"eventUrl": "grpcs://localhost:7053",
"grpcOptions": {
"ssl-target-name-override": "orderer0.example.com"
},
"tlsCACerts": {
"pem": "-----BEGIN CERTIFICATE-----\nMIICNTCCAdugAwIBAgIQLin25y/L/T+Sxt70ly8EiDAKBggqhkjOPQQDAjBsMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4\nYW1wbGUuY29tMB4XDTE4MTEyNjA0NTMwMFoXDTI4MTEyMzA0NTMwMFowbDELMAkG\nA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu\nY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5leGFt\ncGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPztNJPGPaHwTh0eqUpx\nEqIyG5H3gqcuyTyMXra7AvLklgnUaz8gjylBqYkgX/aWe45Ct2DhOF+kOVd4LcSa\nUOajXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB\n/wQFMAMBAf8wKQYDVR0OBCIEIPTcirmpxvqGwramOon7IAwRcqwnra3M1g244gXX\nwIG7MAoGCCqGSM49BAMCA0gAMEUCIQDypo+APwuqv23mosPcLnz4W+BW4C26Vk75\nt1iRSc8h2QIgL8vMHTB7Q+FQDaZDDw+dEv2I+utGLkSoDxTbeZ8taZA=\n-----END CERTIFICATE-----\n"
}
},
"orderer1.example.com": {
"url": "grpcs://localhost:8050",
"eventUrl": "grpcs://localhost:8053",
"grpcOptions": {
"ssl-target-name-override": "orderer1.example.com"
},
"tlsCACerts": {
"pem": "-----BEGIN CERTIFICATE-----\nMIICNTCCAdugAwIBAgIQLin25y/L/T+Sxt70ly8EiDAKBggqhkjOPQQDAjBsMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4\nYW1wbGUuY29tMB4XDTE4MTEyNjA0NTMwMFoXDTI4MTEyMzA0NTMwMFowbDELMAkG\nA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu\nY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5leGFt\ncGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPztNJPGPaHwTh0eqUpx\nEqIyG5H3gqcuyTyMXra7AvLklgnUaz8gjylBqYkgX/aWe45Ct2DhOF+kOVd4LcSa\nUOajXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB\n/wQFMAMBAf8wKQYDVR0OBCIEIPTcirmpxvqGwramOon7IAwRcqwnra3M1g244gXX\nwIG7MAoGCCqGSM49BAMCA0gAMEUCIQDypo+APwuqv23mosPcLnz4W+BW4C26Vk75\nt1iRSc8h2QIgL8vMHTB7Q+FQDaZDDw+dEv2I+utGLkSoDxTbeZ8taZA=\n-----END CERTIFICATE-----\n"
}
},
"orderer2.example.com": {
"url": "grpcs://localhost:9050",
"eventUrl": "grpcs://localhost:9053",
"grpcOptions": {
"ssl-target-name-override": "orderer2.example.com"
},
"tlsCACerts": {
"pem": "-----BEGIN CERTIFICATE-----\nMIICNTCCAdugAwIBAgIQLin25y/L/T+Sxt70ly8EiDAKBggqhkjOPQQDAjBsMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4\nYW1wbGUuY29tMB4XDTE4MTEyNjA0NTMwMFoXDTI4MTEyMzA0NTMwMFowbDELMAkG\nA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu\nY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5leGFt\ncGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPztNJPGPaHwTh0eqUpx\nEqIyG5H3gqcuyTyMXra7AvLklgnUaz8gjylBqYkgX/aWe45Ct2DhOF+kOVd4LcSa\nUOajXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB\n/wQFMAMBAf8wKQYDVR0OBCIEIPTcirmpxvqGwramOon7IAwRcqwnra3M1g244gXX\nwIG7MAoGCCqGSM49BAMCA0gAMEUCIQDypo+APwuqv23mosPcLnz4W+BW4C26Vk75\nt1iRSc8h2QIgL8vMHTB7Q+FQDaZDDw+dEv2I+utGLkSoDxTbeZ8taZA=\n-----END CERTIFICATE-----\n"
}
}
},
"peers": {
"peer0.org1.example.com": {
"url": "grpcs://localhost:7051",
"grpcOptions": {
"ssl-target-name-override": "peer0.org1.example.com"
},
"tlsCACerts": {
"pem": "-----BEGIN CERTIFICATE-----\nMIICSTCCAe+gAwIBAgIQVg6y1pfoW5wzXozRJ5waKTAKBggqhkjOPQQDAjB2MQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz\nY2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xODExMjYwNDUzMDBaFw0yODExMjMwNDUz\nMDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH\nEw1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD\nVQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEnhEe2AtGf1n3oF9DuI9+3404z2K8nZRTn237rbYXduM1QVsmoPJvGIqW\nZREkP39mpFnF1lDm0zhCYM1T1CcAQKNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud\nJQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgOEZjfxZF2IF6\nOqWQUhV7h9BTDLLhE99ZrOZLj5C6LOEwCgYIKoZIzj0EAwIDSAAwRQIhALSE+Fx3\nJI+sBYFvEKM/5bbrABRVzNPv1mLfUiDXHVnMAiBAFa5svqMimJPzfp4/sUWho3Aa\nnbxNC5sUyTCqvxWhfw==\n-----END CERTIFICATE-----\n"
}
},
"peer1.org1.example.com": {
"url": "grpcs://localhost:8051",
"grpcOptions": {
"ssl-target-name-override": "peer1.org1.example.com"
},
"tlsCACerts": {
"pem": "-----BEGIN CERTIFICATE-----\nMIICSTCCAe+gAwIBAgIQVg6y1pfoW5wzXozRJ5waKTAKBggqhkjOPQQDAjB2MQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz\nY2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xODExMjYwNDUzMDBaFw0yODExMjMwNDUz\nMDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH\nEw1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD\nVQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAEnhEe2AtGf1n3oF9DuI9+3404z2K8nZRTn237rbYXduM1QVsmoPJvGIqW\nZREkP39mpFnF1lDm0zhCYM1T1CcAQKNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud\nJQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgOEZjfxZF2IF6\nOqWQUhV7h9BTDLLhE99ZrOZLj5C6LOEwCgYIKoZIzj0EAwIDSAAwRQIhALSE+Fx3\nJI+sBYFvEKM/5bbrABRVzNPv1mLfUiDXHVnMAiBAFa5svqMimJPzfp4/sUWho3Aa\nnbxNC5sUyTCqvxWhfw==\n-----END CERTIFICATE-----\n"
}
}
},
"certificateAuthorities": {
"ca.org1.example.com": {
"url": "https://localhost:7054",
"caName": "ca.org1.example.com",
"httpOptions": {
"verify": false
}
}
}
}
I am getting error as follows in newly created container.
If anyone knows please help me
Link for exact replica of project: Karthik-Venkatesh/Hyperledger-Multi-Organisation-Network
For the above question, the issue found in the configuration of the following environment variables in peer containers of the organization.
CORE_PEER_GOSSIP_ORGLEADER
CORE_PEER_GOSSIP_USELEADERELECTION
Default it uses the configuration CORE_PEER_GOSSIP_USELEADERELECTION=true, I removed the environment variable.
If you want manually define CORE_PEER_GOSSIP_ORGLEADER, please correctly configure the above environment variables.
I have followed the tutorial for Hyperledger Fabric on Multiple Hosts
by Wahab https://medium.com/#wahabjawed/hyperledger-fabric-on-multiple-hosts-a33b08ef24f.
Now, I am trying to deploy my own .bna file instead of chaincode. can anybody help how to deploy that. I am unable to install the card.
Connection.json
{
"name": "fabric-network",
"x-type": "hlfv1",
"version": "1.0.0",
"peers": {
"peer0.org1.example.com": {
"url": "grpc://localhost:7051",
"eventUrl": "grpc://localhost:7053"
},
"peer1.org1.example.com": {
"url": "grpc://192.168.64.82:7051",
"eventUrl": "grpc://192.168.64.82:7053"
}
},
"certificateAuthorities": {
"ca.example.com": {
"url": "http://localhost:7054",
"caName": "ca.example.com"
}
},
"orderers": {
"orderer.example.com": {
"url": "grpc://localhost:7050"
}
},
"organizations": {
"Org1": {
"mspid": "Org1MSP",
"peers": [
"peer0.org1.example.com",
"peer1.org1.example.com"
],
"certificateAuthorities": [
"ca.example.com"
]
}
},
"channels": {
"mychannel": {
"orderers": [
"orderer.example.com"
],
"peers": {
"peer0.org1.example.com": {
"endorsingPeer": true,
"chaincodeQuery": true,
"eventSource": true
},
"peer1.org1.example.com": {
"endorsingPeer": true,
"chaincodeQuery": true,
"eventSource": true
}
}
}
},
"client": {
"organization": "Org1",
"connection": {
"timeout": {
"peer": {
"endorser": "300",
"eventHub": "300",
"eventReg": "300"
},
"orderer": "300"
}
}
}
}
I suggest you to follow the official tutorial of Hyperledger Composer.
It is also explained how to configure the connection profile for the cards.
I've been working on the same issue, used the same tutorial. Well I have managed to configure connection profile so that it connects, but got other problems with authorization and stuff.
I think your ports aren't right try these (that worked for me):
"peer0.org1.example.com": {
"url": "grpc://localhost:8051",
"eventUrl": "grpc://localhost:8053"
},
"peer1.org1.example.com": {
"url": "grpc://192.168.64.82:9051",
"eventUrl": "grpc://192.168.64.82:9053"