EOS Nodeos & Cleos Setup

2. Manually deleting the eosio blockchain data folder.

Open a Terminal window, we have to navigate to the “.local” folder

cd ~/.local/share/eosio/nodeos/

Manually delete the “data” folder

sudo rm -vrf data

rm is the command to delete any file/folder on linux, -vrf means [v = verbose to explain what is being done, r= remove directory and content recursively, f= force to ignore nonexistent files and arguments]

You will be promted with somethin like this thanks to the verbose option:

removed 'data/somethingFile'
removed 'data/otherFile'
removed directory 'data'

Now you can close this terminal window and start again the blockchain with the script “nodeos_start” that you have created before.

Be aware that both methods will probably make you loose any account or token that you have created in the past, so have to restart all the accounts and smart contracts deployment from scratch. In both cases, to avoid this issue, you have to be sure to use the “pkill nodeos” command in order to properly close the nodeos process to avoid a corrupted blockchain issue.

Hope you find this useful! :slight_smile:

If you have any doubt, please let us know so we can help you!

Carlos Z.

2 Likes

Yes, the sudo rm -vrf data command in the local folder deletes the eosio blockchain data folder, but by doing so, do I delete the wallet? What I see in the data directory from the command line is three directories: blocks, state and snapshots. Where is stored the wallet?

But isn’t it possible to specifically delete only a wallet, or only an account, and not other directories or files?

1 Like

oook thats even easy, at your “home” folder in ubuntu: using the command “ls” will show you all the files, you should be able to see a folder with the name “eosio-wallet”, i would not suggest to delete the folder, just the content inside of it, so you can go with:

navigate into the folder:

cd ~/eosio-wallet

ask to see all files: with "ls"

use this command to delete all the files (please redesign the command if you don’t have any of the files that i mention)

sudo rm -v config.ini default.wallet keosd.sock wallet.lock

after that, you have delete all the files that are inside the “eosio-wallet” folder.

Here is an example that i have done: (I’m not deleting my eosio-wallet folder, i create a copy just to show you an example of it :grimacing:)
image

Hope you find this useful! :slight_smile:

If you have any doubt, please let us know so we can help you!

Carlos Z.

1 Like

Thank you, this is useful! :+1:

Gracias Carlos.
It works like a charm !
I have data persistence on my dogs table after stop|restart nodeos.
Just wondering the differences between your script and the one in the course

Hello sir, glad to know that it works for you, I’m pretty sure that you have an issue with your quotation, should not be curvy, also you do not specify where the access control should return every request, same with the filter-on.

If you have any doubt, please let us know so we can help you! :slight_smile:

Carlos Z.

1 Like

Hi Carlos @thecil,

when Filip made the videos of EOS Programming 201, EOS still could not run in Windows. Now they have EOS Studio for Windows, it seems that under Network, one can also connect to Testnets such as Jungle, CryptoKylin, Block.one, can I create accounts and connect to testnet through EOS Studio without having to download VM to run Ubuntu and install everything through command window?

1 Like

Hello sir, you could try to setup any of the testnet accounts that EOS Studio offers, so you will save time on installing a VM for ubuntu and use it has local node. Still, in EOS programming 201, we will teach you how to setup your own node. So is up to you which choice you take, or use testnets or run your own local node for the course :slight_smile:

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

1 Like

ERROR

main.cpp:121 main ] database dirty flag set (likely due to unclean shutdown): replay required

when i try to start the node above error coming. Please help to solve the issue.

1 Like

Hi @achinta_das, hope you are ok.

That error shows up most of the times becaue nodeos was not closed properly, every time you have finish work with your local node on EOS (nodeos) you have to close the software properly (in linux the command is pkill nodeos).

Check out on this guide on what you should do when facing this error:

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

Thank you for help . i am very new in EOS and development , can you help me with IOS command line

1 Like

I do not own a MAC, but I think there are good quick tutorials for it, what you need to do is basically delete the content of your eos node folder (do not delete the entire folder, just the content inside of it.)

Here are some links that should help you understand it:

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

I have done everything perfectly but nodeos fails to initliaze. Can you help please?

jason@jason-VirtualBox:~/contracts$ tail -f nodeos.log
info 2021-09-26T19:27:37.286 nodeos chain_plugin.cpp:637 operator() ] Saved default specification for builtin protocol feature ‘PREACTIVATE_FEATURE’ (with digest of ‘0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd’) to: /home/jason/.local/share/eosio/nodeos/config/protocol_features/BUILTIN-PREACTIVATE_FEATURE.json
info 2021-09-26T19:27:37.286 nodeos chain_plugin.cpp:1156 plugin_initialize ] Starting fresh blockchain state using default genesis state.
info 2021-09-26T19:27:44.609 nodeos platform_timer_accurac:62 compute_and_print_ti ] Checktime timer accuracy: min:32us max:18305us mean:4295us stddev:4613us
warn 2021-09-26T19:27:44.609 nodeos platform_timer_accurac:64 compute_and_print_ti ] Checktime timer accuracy on this platform and hardware combination is poor; accuracy of subjective transaction deadline enforcement will suffer
warn 2021-09-26T19:27:44.609 nodeos producer_plugin.cpp:953 plugin_initialize ] 3010001 name_type_exception: Invalid name
Name contains invalid character: ()
{“c”:""}
nodeos name.hpp:26 char_to_symbol

Failed to initialize

update: 9/26/21 I finally got it to work!!! i had to use ubuntu 20.04 which I got here https://developers.eos.io/manuals/eos/latest/install/index just follow that guide. Then here is the CDT wget https://github.com/EOSIO/eosio.cdt/releases/download/v1.6.1/eosio.cdt_1.6.1-1_amd64.deb. then you all set! you will get a warning about whatever just ignore it. hope this helps folks.

1 Like

thanks for the help filip.

Hello Everyone

I struggle to use yum to install the last rpm package in the Linux setup via VM on Windows.

I’ve managed to get a vm on Bionic Beaver running, i’ve installed the debian packages and get the CentOs rpm package.
Now when trying to install (sudo yum install ./eosio-1.8.1-1.el7.x86_64.rpm) I struggle with “yum”.
The command is not recognised (Error: “sudo: yum: command not found”) when researching I found, that yum isn’t installed automatically anymore and that I need to download an rpm package and install yum. I was redirected to https://pkgs.org/ but have no idea what exactly to download and when trying to install the yum-utils it doesn’t work either.
Has anyone or @thecil had similar problems or an alternative command to use for the last installation?

Thanks!

1 Like

Hey @Konzaih, hope you are well.

CentOS is a linux distribution focused for servers (red hat), which is quite difficult to configure if you are new with Linux.

That way I advice you to download Ubuntu instead, 18.04 or 20.04, then you can use apt by default to install packages.

Take a look at my EOS repo that could help you as a guide for the installation for nodeos and cleos.
https://github.com/thecil/EOSCoding

Carlos Z

1 Like

Hello @thecil

This was actually a great help, now I actually understand what I’ve misunderstood.

Thank you & have a nice day!

Sorry if i repeat myself but is there a way to start nodeos without the whole paragraph long load plugins, etc.? is there like a script? or is that just for the first time? when i try just typing in nodeos, it fails to initialize. is it looking for me to tell it to load all those plugins and things? help please! :grin:

1 Like

Indeed sir, i made a guide (for linux) long ago, same reason than you! Check it out:

Carlos Z

1 Like

got it thanks for the help!