Setting up a Blockchain Business Network With Hyperledger Fabric & Composer Running in Multiple Physical Machine


(Paresh Varde) #176

@varun I get an error “Error getting endorser client channel: PER:404 - Error trying to connect to local peer”

"Caused by: tls: first record does not look like a TLS handshake"

when I execute peer channe list command. CORE_PEER_ADDRESS set to peer0.org1.example.com


(Regina Mehta) #177

Hello, I cant seem to find the files even when i have downloaded from fabric-dev-servers.tar.gz which include: -1) docker-compose-peer2.yml 2) startFabric-Peer2.sh . Can you send me the link again which includes the updated links. Also the link for fabric-tools is not working.


(Paresh Varde) #178

(Paresh Varde) #179

OK I confirm peer channel list command shows composerchannel as subscribed channel list.


(Anshul Kathuria) #180

Can you provide me with a README.md file for this. I’m not able to understand from where to begin?


(Rupasree Roy) #181

I have a separate CA which enrolls and registers peer/orderer. When I run the chaincode it hangs and throws the following error :slight_smile:

 "Error: Error endorsing chaincode: rpc error: code = Unknown desc = Timeout expired while starting chaincode mycc:1.0(networkid:dev,peerid:peer0.example,tx:b21e55d8cbdadd4be9422766276c37254191dc9a048bcc2199ee0c45655j8895)"
And the peer logs shows : 
"Failed connecting to orderer.tharthar:7050 , error: x509: certificate signed by unknown authority"
And 
"launchAndWaitForRegister failed Timeout expired while starting chaincode mycc1:1.0(networkid:dev,peerid:peer0.tharthar,tx:b21e55d8cbdadd4be9422766276c37254191dc9a048bcc2199ee0c45655j8895)
Can someone help? I have added the following env variables but nothing helped: 
CORE_PEER_CHAINCODELISTENADDRESS=peer0.example:7051
CORE_CHAINCODE_DEPLOYTIMEOUT=300s
CORE_CHAINCODE_STARTUPTIMEOUT=1200s
CORE_CHAINCODE_EXECUTETIMEOUT=90s

(Saeedi) #182

Hi,
I am trying to upgrade business definition using composer network upgrade. But following errors are produced on logs of peer container.

2018-05-24 08:54:34.403 UTC [endorser] simulateProposal -> ERRO 1848 [composerchannel][4e85d556] failed to invoke chaincode name:"lscc" , error: Failed to generate platform-specific docker build: Error returned from build: 1 "npm WARN deprecated nodemailer@2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated mailcomposer@4.0.1: This project is unmaintained
npm WARN deprecated socks@1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated buildmail@4.0.1: This project is unmaintained
npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN notice [SECURITY] debug has 1 low vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=debug&version=2.6.2 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] protobufjs has 1 moderate vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=protobufjs&version=5.0.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] timespan has 1 low vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=timespan&version=2.3.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] tunnel-agent has 1 moderate vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=tunnel-agent&version=0.4.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] hoek has 1 moderate vulnerability. Go here for more details: https://nodesecurity.io/advisories?search=hoek&version=2.16.3 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.

> x509@0.3.3 install /chaincode/output/node_modules/x509
> node-gyp rebuild

gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: This is most likely not a problem with node-gyp or the package itself and
gyp ERR! stack is related to network connectivity. In most cases you are behind a proxy or have bad 
gyp ERR! stack network settings.
gyp ERR! stack     at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:193:21)
gyp ERR! stack     at emitOne (events.js:116:13)
gyp ERR! stack     at Request.emit (events.js:211:7)
gyp ERR! stack     at Request.onRequestError (/usr/local/lib/node_modules/npm/node_modules/request/request.js:878:8)
gyp ERR! stack     at emitOne (events.js:116:13)
gyp ERR! stack     at ClientRequest.emit (events.js:211:7)
gyp ERR! stack     at TLSSocket.socketErrorListener (_http_client.js:387:9)
gyp ERR! stack     at emitOne (events.js:116:13)
gyp ERR! stack     at TLSSocket.emit (events.js:211:7)
gyp ERR! stack     at emitErrorNT (internal/streams/destroy.js:64:8)
gyp ERR! System Linux 4.13.0-36-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /chaincode/output/node_modules/x509
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm WARN testnetwork@0.0.2-deploy.6 license should be a valid SPDX license expression

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! x509@0.3.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the x509@0.3.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-05-24T08_54_06_306Z-debug.log
"
error starting container

(Paresh Varde) #183

I had fixed my issue. It was due to image version of peer. Newly added peer has older version of fabric image compared to what I had for peer0. Keeping image version in sync fixed my issues.


(Benyam Ephrem) #184

Hey there. I had this same problem. So the problem is probably (and was for me) that the MSP file path for the peer cannot be found when the you spawn the container. You need to go to the first machine and take the “crypto-config” folder and put it on all machines that will run the network so the file path resolves correctly.

The problem is that on machine 2 you probably have the placeholder “crypto-config” folder from the example and not the newly generated certs you made earlier.

Also a tip is use docker logs [CONTAINER ID] --follow to get live logs of whats happening on the peer and you will see the error.

good luck


(Shubhamp1p) #185

Hi while setting up the network evething went well while setting up for machine 1.While trying executing the

./startfabric for machine 2 getting the error.
ERROR: for couchdb2  Cannot start service couchdb2: driver failed programming external connectivity on endpoint couchdb2 (7c0021aae36fbaf2bf0d717f804fd799bc09643fdcce2cc715a477c3cf015233):  (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 7984 -j DNAT --to-destination 172.19.0.2:5984 ! -i br-07559c85df77: iptables: No chain/target/match by that name.
 (exit status 1))
ERROR: Encountered errors while bringing up the project.

Where i am being wrong does anyone has any idea?


(Tej Pratap) #186
cd "$(dirname "$0")"

cryptogen generate --config=./crypto-config.yaml

export FABRIC_CFG_PATH=$PWD

configtxgen -profile ComposerOrdererGenesis -outputBlock ./composer-genesis.block

configtxgen -profile ComposerChannel -outputCreateChannelTx ./composer-channel.tx -channelID composerchannel

When trying to run these commands,
for 1st commands its giving error as

----dirname: invalid option -- 'b'

for 2nd command its giving – cryptogen: command not found

similarly for 4th and 5th - configtxgen: command not found.

Could someone please help me in this.


(Kumar Mohanaraman) #187

Hi @Ivan_Vaccari,

I am also trying to add node sdk for my fabric multi host application. my CA and peers also has the environmental variable FABRIC_CA_SERVER_CA_KEYFILE and pointing to the ca certificate as well.
i can able to query/invoke from the docker bash prompt.

When i am trying to query/invoke using the node sdk facing the same error, As mentioned below,

error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: Failed to deserialize creator identity, err The supplied identity is not valid, Verify() returned x509: certificate signed by unknown authority
at new createStatusError (/scratch/node_SDK/fabric-test/nodejs/node_modules/grpc/src/client.js:64:15)
at /scratch/node_SDK/fabric-test/nodejs/node_modules/grpc/src/client.js:583:15

i tried by removing the crypto-config and generated again as well. still facing the same.

Can you please help on this or share your solution if you found already

Thanks you


(Pratik Agarwal) #189

I finally executed all the steps without any error, but when executing composer network start, i am getting the below error:

Starting business network test-network at version 0.0.2-deploy.67

Processing these Network Admins: 
	userName: admin

✖ Starting business network definition. This may take a minute...
Error: Error trying to start business network. Error: "orderer" request parameter is missing and there are no orderers defined on this channel in the network configuration
Command failed

my orderer log doesn’t show me any error,

orderer log : [https://gist.github.com/prtk418/5fb4788a6afa340f17a9eecfa865a92d#file-orderer-log](https://gist.github.com/prtk418/5fb4788a6afa340f17a9eecfa865a92d#file-orderer-log)
I can find some weird errors in couchdb container but can't understand what these mean:
couchdb log: [https://gist.github.com/prtk418/bd22e3c5b6bb371c67d6176c53592a42#file-couchdb-log](https://gist.github.com/prtk418/bd22e3c5b6bb371c67d6176c53592a42#file-couchdb-log)

Can anyone help me, what i am i doing wrong??


(Tauseef Ahmed Wahdat) #191

Hi,
When I try to deploy the network on the first machine I get this error in peer0 and peer1.

[eventhub_producer] Chat -> ERRO 348 error during Chat, stopping handler: rpc error: code = Canceled desc = context canceled

Anybosy has an idea why?


(Varun Raj) #192

Can you check your connection profile if everything is right? I think orderer is missing in connection profile.


(Pratik Agarwal) #193

I dont think so

https://gist.github.com/prtk418/be70cf3faa8e0d8d9741dbd6221965d9#file-devserver_connection-json


(Pratik Agarwal) #194

hey there was issue with this file only , got it now, its working fine now, great explanation, thanks


(Tej Pratap) #195

Hi I am getting below error when trying to deploy business network from composer. I have configure 3 peers withh peer2 on different machine.

Error: Error trying install business network. Error: The business network failed to install on 1 or more peers: Response from attempted peer comms was an error: Error: 2 UNKNOWN: error executing chaincode: failed to execute transaction: error sending: txid: 557cc56f892ec6cd79d128c9c980443735f65f9e9a8c9ae1de8ceab378cbf856() exists

(Pratik Agarwal) #196

Hello, just try checking all the peer container logs maybe you will find the error.


(Anitha Reddy) #197

hi varun can i use composer-cli v0.16.4 for fabric 1.1 images if yes what versions of composer-common, composer-admin , composer-client need to be installed ??
can u please specify the node versions also ??