How to solve bind cannot assign requested address Error

0 votes

I am running a Hyperledger Fabric

My start-order.sh file to start the order looks like this:

ORDERER_GENERAL_LOGLEVEL=info \

ORDERER_GENERAL_LISTENADDRESS=orderer0 \

ORDERER_GENERAL_GENESISMETHOD=file \

ORDERER_GENERAL_GENESISFILE=/root/bcnetwork/conf/crypto-config/ordererOrganizations/ordererorg0/orderers/orderer0.ordererorg0/genesis.block \

ORDERER_GENERAL_LOCALMSPID=OrdererOrg0MSP \

ORDERER_GENERAL_LOCALMSPDIR=/root/bcnetwork/conf/crypto-config/ordererOrganizations/ordererorg0/orderers/orderer0.ordererorg0/msp \

ORDERER_GENERAL_TLS_ENABLED=false \

ORDERER_GENERAL_TLS_PRIVATEKEY=/root/bcnetwork/conf/crypto-config/ordererOrganizations/ordererorg0/orderers/orderer0.ordererorg0/tls/server.key \

ORDERER_GENERAL_TLS_CERTIFICATE=/root/bcnetwork/conf/crypto-config/ordererOrganizations/ordererorg0/orderers/orderer0.ordererorg0/tls/server.crt \

ORDERER_GENERAL_TLS_ROOTCAS=[/root/bcnetwork/conf/crypto-config/ordererOrganizations/ordererorg0/orderers/orderer0.ordererorg0/tls/ca.crt,/root/bcnetwork/conf/crypto-config/peerOrganizations/org0/peers/peer0.org0/tls/ca.crt,/root/bcnetwork/conf/crypto-config/peerOrganizations/org1/peers/peer2.org1/tls/ca.crt] \

CONFIGTX_ORDERER_BATCHTIMEOUT=1s \

CONFIGTX_ORDERER_ORDERERTYPE=kafka \

CONFIGTX_ORDERER_KAFKA_BROKERS=[kafka-zookeeper:9092] \

orderer

When I run this, I get the following error:

2018-02-19 12:53:31.597 UTC [orderer/main] main -> INFO 001 Starting orderer:

Version: 1.0.2

 Go version: go1.9

 OS/Arch: linux/amd64

2018-02-19 12:53:31.602 UTC [orderer/main] initializeGrpcServer -> CRIT 002 Failed to listen: listen tcp XX.XXX.XXX.XX:7050: bind: cannot assign requested address

How to solve this?

Jul 31, 2018 in Blockchain by digger
• 26,740 points
13,942 views

4 answers to this question.

+2 votes
Best answer

You must mention in your host.conf file for the orderer to resolve to any address. Add the following to your host.conf and it should work.

-e ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 -e ORDERER_GENERAL_LISTENPORT=7050

To know more on how to setup Hyperledger Fabric on multiple hosts, visit:

https://medium.com/@wahabjawed/hyperledger-fabric-on-multiple-hosts-a33b08ef24f

answered Jul 31, 2018 by slayer
• 29,350 points

selected May 6, 2019 by digger
0 votes

Try restarting docker. Maybe you are getting this error because the address is already being used by a background process.

$ docker stop
$ docker start
answered May 6, 2019 by Suman
+1 vote

You might have kept docker running and up before initializing the fabric. Bring the containers down and start again. To bring the containers down, use the following command:

$ docker rm $(docker ps -qa)
answered May 6, 2019 by Kunal
0 votes
I was facing the same problem. After a lot of research, I realized that the reason for the problem was that I ran the command as sudo and this command requires to be run by a non-sudo user. When I ran the command without sudo, it worked fine. Hope this helps in your case too.
answered May 6, 2019 by Esha

Related Questions In Blockchain

0 votes
1 answer

How to solve EACCES:permission denied error in Hyperledger Composer?

It seems like there is no required ...READ MORE

answered Jul 11, 2018 in Blockchain by digger
• 26,740 points
2,066 views
0 votes
10 answers

How to solve gradle build failed error?

I migrated the project to a different ...READ MORE

answered Dec 7, 2018 in Blockchain by Rajat
47,131 views
0 votes
1 answer

How to solve "Failed to get identity 'admin'" error?

It seems like this error is caused ...READ MORE

answered Jul 13, 2018 in Blockchain by slayer
• 29,350 points
453 views
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,215 views
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 26,740 points
708 views
+1 vote
1 answer
0 votes
1 answer

How to solve Runtime error when querying Hyperledger?

OCI is open container initiative.. The error ...READ MORE

answered Jul 9, 2018 in Blockchain by slayer
• 29,350 points
767 views
0 votes
1 answer

How to solve "Failed to deserialize creator identity error"?

It seems like the problem is caused ...READ MORE

answered Jul 13, 2018 in Blockchain by slayer
• 29,350 points
1,391 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP