Unable to request channel creation using Rest Api

0 votes

I am following Balance-transfer of Hyper-ledger-fabric samples from Here. I have modified it a little. I added 3rd organization. Everything goes fine till I try to create channel using

curl -s -X POST \ http://localhost:4000/channels \ -H "authorization: Bearer " \ -H "content-type: application/json" \ -d '{ "channelName":"mychannel", "channelConfigPath":"../artifacts/channel/mychannel.tx" }'

I get below errors:

error: [Orderer.js]: sendBroadcast - on error: "Error: Connect Failed\n at ClientDuplexStream._emitStatusIfDone (/home/atif/Desktop/hyper-ledger/fabric/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:255:19)\n at ClientDuplexStream._readsDone (/home/atif/Desktop/hyper-ledger/fabric/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:221:8)\n at readCallback (/home/atif/Desktop/hyper-ledger/fabric/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:283:12)" [2018-02-19 15:40:04.991] [ERROR] Create-Channel - Error: SERVICE_UNAVAILABLE at ClientDuplexStream. (/home/atif/Desktop/hyper-ledger/fabric/fabric-samples/balance-transfer/node_modules/fabric-client/lib/Orderer.js:141:21) at emitOne (events.js:116:13) at ClientDuplexStream.emit (events.js:211:7) at ClientDuplexStream._emitStatusIfDone (/home/atif/Desktop/hyper-ledger/fabric/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:258:12) at ClientDuplexStream._readsDone (/home/atif/Desktop/hyper-ledger/fabric/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:221:8) at readCallback (/home/atif/Desktop/hyper-ledger/fabric/fabric-samples/balance-transfer/node_modules/grpc/src/node/src/client.js:283:12) (node:79777) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Failed to initialize the channel: Error: SERVICE_UNAVAILABLE (node:79777) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Jul 16, 2018 in Blockchain by sabby
• 4,390 points

1 answer to this question.

0 votes

I'd recommend taking a look at the ordering service FAQ. When the ordering service returns an error of:


this almost always indicates a connection problem between the orderer and Kafka. This is usually due to one of two reasons:

  1. The ordering service has not been given long enough to startup and Kafka is still performing leader election.
  2. The Kafka cluster is misconfigured.

I would always encourage users to first become familiar with Kafka. Get the cluster up and running, and send receive messages to/from it, including from other hosts or containers, just like your orderer process will. Only then should you attempt to deploy Fabric on top of Kafka. There is a quickstart guide offered by Kafka which is a good place to start.

answered Jul 16, 2018 by Perry
• 17,100 points

Related Questions In Blockchain

+1 vote
1 answer

Unable to send payment using API. Please help.

Firstly, check your passwords, your API code and your wallet ...READ MORE

answered Apr 3, 2018 in Blockchain by Christine
• 15,790 points
0 votes
1 answer
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
+1 vote
1 answer

I am unable to change port of composer-rest-server. Please help!

Use full format for running a business ...READ MORE

answered Mar 27, 2018 in Blockchain by Christine
• 15,790 points
+1 vote
1 answer
+4 votes
2 answers

I am unable to connect Ganache with Truffle/Npm Dev server. Pls help.

The issue is at CurrentProvider. Give the url ...READ MORE

answered Mar 26, 2018 in Blockchain by Perry
• 17,100 points

edited Oct 11, 2018 by Omkar 2,406 views
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP