I'm trying to run a Node on a private blockchain using the following command:

geth --datadir data/privateBlockchain/ -networkid 1234567 -port 30306 -nodiscover -rpc -rpcapi “db,personal,eth,net,web3,debug” -rpccorsdomain ”*” --rpcaddr ”localhost” -rpcport 8545

I got it from this tutorial:


but when I ran it the following message is shown on the screen:

Fatal: Error starting protocol stack: listen tcp: lookup ”localhost”: no such host

I've also tried with instead of localhost.

What can I do to fix this problem?

  • Change quotes around localhost from smart quotes to "localhost".It worked for me..!!
    – Sandeep
    Dec 30, 2018 at 4:22

2 Answers 2


While I can't answer why you're getting this specific error, what I can tell you is that specifying --rcpaddr localhost is unnecessary as localhost is the default rpcaddr value.

If I were to take a swing at guessing why you're getting this error though, I would assume that you're quotes around localhost are smart quotes, and not the standard kind (they show up that way on this site, at least). If you really want to explicitly set the RPC bind address to localhost (explicit is better than implicit, to some) try removing the quotes!

  • 1
    It was an issue with the quotes as you said! Thank you very much!
    – diegokim
    Sep 30, 2018 at 18:36
  • Happy to help, cheers!
    – Motoma
    Sep 30, 2018 at 18:44

The error message you're seeing, Fatal: Error starting protocol stack: listen tcp: lookup localhost: no such host, usually occurs when your system is unable to resolve the hostname "localhost". This can happen due to misconfiguration of the hosts file.

The hosts file is a simple text file that maps hostnames to IP addresses. On most systems, localhost should be mapped to the IP address

Please follow these steps to check and possibly correct this issue:

On Unix-like systems (including Linux and macOS):

Open a terminal.

Open the hosts file in a text editor. You may need superuser (root) access to do this. For example, you can use the nano text editor like this: sudo nano /etc/hosts.

Look for a line that looks like this: localhost. If it's not there, add it at the end of the file.

Save the file and exit the text editor.

Try to deploy your BNB full node again.

if you are still facing issue you got our services from www.lbmsolutions.in

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.