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 Answers 4

4

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

basically do not do: kill -9 <PID>

2
  • 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
    Commented Jun 19, 2018 at 23:21
  • misread your question, updated the answer.
    – Vlad
    Commented Jun 19, 2018 at 23:31
1

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

0

pidof is good. use following command.

$ kill \`pidof nodeos\`
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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