Getting error while Initialising the Blockchain

0 votes
/home/viveka/go-ethereum/build/bin/geth --datadir ~/ethereum/net3/ init genesis/genesis3.json

Fatal: Failed to read genesis file: open genesis/genesis3.json: no such file or directory

I am following the below Edureka tutorial:    


I know this question has already been asked here but not been answered yet. #Issue in Initialising the Blockchain

Please help.
Sep 17, 2020 in Blockchain by Edureka
• 200 points

2 answers to this question.

+1 vote
Best answer

Hello, @Edureka,

You have two options:

  1. Execute with sudo. This will work for sure: sudo geth --datadir blokchain init genesis.json
  2. There might be a problem with permission (chmod set incorrectly). Try setting it on the entire folder. sudo chmod -r 777 myFolderThatContainsEntireChain. This isn't the best solution but it may well be worth trying and see if it fixes your problem.

Otherwise it seems like geth can't find the genesis.json. Are you sure you are currently in the folder where your genesis.json resides? Furthermore make sure that the datadir folder exists as well (and with the correct path).

answered Sep 17, 2020 by Roshni
• 10,520 points

selected Sep 22, 2020 by Edureka
Hi Roshni, I have tried both the options but no success. I have recorded my screen [  ] and I think you're right that I am not following the right path for the genesis file.

Can you please take a look at this video and let me know what would be the correct command to Initialising the Blockchain. Many Thanks!

Could you pleasse mention which geth version you are using?

Geth Version: 1.9.6 . It's unstable, do I need to downgrade this to stable one?

I would suggest you go through this regarding the query, I hope it will be helpful for you

If you get the same error again do revert here.
I have downgraded the geth version to the stable one and it's working now. Thanks for the help.

Glad to help you!! 

0 votes

Hi, @Edureka,

If you want to create a private Ethereum network, you need to create your own genesis file with customized parameters suitable for you. This ensures that you're running your version of the blockchain. Not the public ethereum blockchain.

answered Sep 17, 2020 by Rajiv
• 8,910 points

Related Questions In Blockchain

+1 vote
1 answer

Error while deploying chaincode in IBM Blockchain. Please help.

Try stripping out the 'tree/master' portion of ...READ MORE

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

Error in playground while committing transaction on the ledger

1. Is this transaction is trying to ...READ MORE

answered Jul 27, 2018 in Blockchain by shweta
• 440 points
0 votes
1 answer

Getting error while building Bitcoind on MAC OS

First of all try building a non-GUI ...READ MORE

answered Aug 20, 2018 in Blockchain by slayer
• 29,360 points
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
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

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,450 points
0 votes
1 answer

How to set the ERC20 token price in respect to ether in solidity?

Hi, @Jas, I would suggest you go through ...READ MORE

answered Nov 9, 2020 in Blockchain by anonymous
• 10,520 points
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP