3

I'd like to cleanly shut down NodeOS so that the next time I start it, I don't have to --resync. How do I do that?

Edit: Just to clarify the purpose of what might seem like an extremely obvious question/answer, I was getting prompted to resync after using pkill to terminate nodeOS...or, so I thought - due to a bug in my code, nodeOS was being killed by the termination of a JVM (long story) - the answer to this question helped me trace that issue - it's resolved now and everything is awesome

4

pkill nodeos or just kill <PID> where pid is nodeos's pid.

basically do not do: kill -9 <PID>

| improve this answer | |
  • Wait, what? So, I create and start a blockchain...I'd like to be able to stop it such that when I start it again, I don't have to add the --replay parameter. What does your answer have to do with stopping blockchains at all? – Cody S Jun 19 '18 at 23:21
  • misread your question, updated the answer. – Vlad Jun 19 '18 at 23:31
1

You can do a ctr+c or just kill the process, in either case you won’t need a resync.

| improve this answer | |
0

pidof is good. use following command.

$ kill \`pidof nodeos\`
| improve this answer | |
0

Try this to find out what port nodeos is running on.

$ pgrep nodeos | xargs printf " -p %d" | xargs lsof -Pani

Then, kill the process with: $ pkill nodeos

| improve this answer | |

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.