1

Previously was able to do the setup successfully, today it didnt work.

alex@alex-Inspiron-3558:/media/alex/Y/Blockchain/assignment_1$ **geth --datadir=./chaindata init genesis.json**

INFO [11-07|11:18:50] Allocated cache and file handles         database=/media/alex/Y/Blockchain/assignment_1/chaindata/geth/chaindata cache=16 handles=16
Fatal: Failed to open database: open /media/alex/Y/Blockchain/assignment_1/chaindata/geth/chaindata/LOCK: read-only file system.

Scanned various forum and the common reason stated was geth is already runing in the background, hence the error.

command: **lsof -i tcp:30303** didnt 

gave any result. so no listening was happening on port 30303

Ran the command ps faux | grep geth, found the geth process that is active, killed it still the issue remains.

alex@alex-Inspiron-3558:/media/alex/Y/Blockchain/assignment_1$ **ps faux | grep geth**

alex      3506  0.0  0.0  14224   972 pts/8    S+   11:30   0:00          |       \_ grep --color=auto geth
alex      2839  2.5  1.8 1693852 74916 ?       Sl   11:07   0:35          |   \_ /home/alex/.config/Mist/swarmjs/bin/swarm --bzzaccount /home/alex/.config/Mist/swarmjs/swarmKey --datadir /home/alex/.config/Mist/swarmjs --ens-api /home/alex/.ethereum/geth.ipc

alex@alex-Inspiron-3558:/media/alex/Y/Blockchain/assignment_1$ k**ill -QUIT 3506**

bash: kill: (3506) - No such process

alex@alex-Inspiron-3558:/media/alex/Y/Blockchain/assignment_1$ **kill -QUIT 2839**

alex@alex-Inspiron-3558:/media/alex/Y/Blockchain/assignment_1$ **ps faux | grep geth**


alex      3512  0.0  0.0  14224   968 pts/8    S+   11:30   0:00          |       \_ grep --color=auto geth

alex      2839  2.5  1.9 1693852 75164 ?       Sl   11:07   0:35          |   \_ /home/alex/.config/Mist/swarmjs/bin/swarm --bzzaccount /home/alex/.config/Mist/swarmjs/swarmKey --datadir /home/alex/.config/Mist/swarmjs --ens-api /home/alex/.ethereum/geth.ipc.

let me know if you need further logs on this. Meanwhile I will try finding a solution for this.

0

Check your error:

Failed to open database: open /media/alex/Y/Blockchain/assignment_1/chaindata/geth/chaindata/LOCK: read-only file system.

I think you're using some type of external drive for the --datadir=./chaindata argument. I sure you're mounting that drive with the wrong permission.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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