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 in Blockchain by Edureka
• 200 points
75 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 by Roshni
• 4,630 points

selected Sep 21 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 by Rajiv
• 3,160 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,810 points
227 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
84 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,300 points
112 views
0 votes
1 answer
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,810 points
409 views
0 votes
1 answer
0 votes
1 answer

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

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,380 points
277 views