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:

https://www.youtube.com/watch?v=QCvL-DWcojc&t=3053s    

58:27

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
3,234 views

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,480 points

selected Sep 22, 2020 by Edureka
Hi Roshni, I have tried both the options but no success. I have recorded my screen [  https://youtu.be/QLwFijlg7u8  ] 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?
Hi,

I would suggest you go through this regarding the query, I hope it will be helpful for you https://www.edureka.co/community/32325/fatal-failed-genesis-edureka-privatechain-file-directory

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,870 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
899 views
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
752 views
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,370 points
872 views
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
1,927 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,455 views
+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,460 points
1,434 views
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,480 points
5,161 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