# ERROR: A Cardano node is already running, please terminate this node before starting a new one with this script

**URL:** <https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123>\
**Category:** Operate a Stake Pool\
**Created:** [24 August 2020 11:43 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123 "2020-08-24T11:43:18Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jSolx](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/jsolx/32/17655_2.png) [@jSolx](https://forum.cardano.org/u/jSolx)\
**Post date:** [24 August 2020 11:43 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123/1 "2020-08-24T11:43:19Z")

</div>

how do i terminate the running node?  
i cant find it anywhere in tmux to terminate it.  
im getting a ERROR: A Cardano node is already running, please terminate this node before starting a new one with this script.

it was running fine then when i hit Q to change topology in json im not able to bring it back up.  
i looked at all sessions all panes not sure what happen and where its running at where can i find it ?

---

<div class="post-metadata">

**Author:** ![Simlshady](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/simlshady/32/20899_2.png) [@Simlshady](https://forum.cardano.org/u/Simlshady)\
**Post date:** [24 August 2020 12:01 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123/2 "2020-08-24T12:01:05Z")

</div>

sudo killall cardano-node

---

<div class="post-metadata">

**Author:** ![jSolx](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/jsolx/32/17655_2.png) [@jSolx](https://forum.cardano.org/u/jSolx)\
**Post date:** [24 August 2020 12:03 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123/3 "2020-08-24T12:03:11Z")

</div>

says no process found

db files logs priv scripts sockets

dont know where its at i can always restart the whole thing but there has to be an easy way to just go back to the screen where the node syncs on tmux

---

<div class="post-metadata">

**Author:** ![Simlshady](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/simlshady/32/20899_2.png) [@Simlshady](https://forum.cardano.org/u/Simlshady)\
**Post date:** [24 August 2020 12:08 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123/4 "2020-08-24T12:08:12Z")

</div>

Hmm you can list your running processes with sudo ps  
Maybe you find it in the list, then you can kill it with its PID number

---

<div class="post-metadata">

**Author:** ![ADAfrog](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/adafrog/32/16303_2.png) [@ADAfrog](https://forum.cardano.org/u/ADAfrog)\
**Post date:** [24 August 2020 12:37 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123/6 "2020-08-24T12:37:32Z")

</div>

it sounds like you might not have the appropriate PATH reference

add this to your .bashrc

> export PATH=“~/.local/bin:$PATH”  
> export CARDANO\_NODE\_SOCKET\_PATH=~/cardano-node/db/node.socket  
> export LD\_LIBRARY\_PATH=“/usr/local/lib:$LD\_LIBRARY\_PATH”  
> export PKG\_CONFIG\_PATH=“/usr/local/lib/pkgconfig:$PKG\_CONFIG\_PATH”

make sure the cardano-node/db/node.socket reference correctly points to your node.socket file

then then **source .bashrc** (just do this if the above is already in your .bashrc)

then try **killall cardano-node**

---

<div class="post-metadata">

**Author:** ![lauris](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/lauris/32/37129_2.png) [@lauris](https://forum.cardano.org/u/lauris)\
**Post date:** [24 August 2020 12:43 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123/7 "2020-08-24T12:43:17Z")

</div>

try checking if you are not running cardano-node from other user. do:

> ps aux | grep cardano-node

if you find it - kill then with _SIGINT_

> kill -2 \<PID\>

---

<div class="post-metadata">

**Author:** ![ADAfrog](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/adafrog/32/16303_2.png) [@ADAfrog](https://forum.cardano.org/u/ADAfrog)\
**Post date:** [24 August 2020 12:49 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123/8 "2020-08-24T12:49:22Z")

</div>

This is the correct answer to kill a node gracefully - thank you, Lauris

---

<div class="post-metadata">

**Author:** ![jSolx](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/jsolx/32/17655_2.png) [@jSolx](https://forum.cardano.org/u/jSolx)\
**Post date:** [24 August 2020 14:31 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123/9 "2020-08-24T14:31:22Z")

</div>

i got 4657 0.0 0.0 8164 672 pts/0 S+ 14:33 0:00 grep --color=auto cardano-node  
which ones the PID?  
appreciate it ive been on this all night lol

---

<div class="post-metadata">

**Author:** ![lauris](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/lauris/32/37129_2.png) [@lauris](https://forum.cardano.org/u/lauris)\
**Post date:** [24 August 2020 16:42 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123/10 "2020-08-24T16:42:58Z")

</div>

doesn’t look like you have any running cardano-node process… looks like faulty script?  
try to reboot the server, that should help.

what script you are running?

---

<div class="post-metadata">

**Author:** ![lauris](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/lauris/32/37129_2.png) [@lauris](https://forum.cardano.org/u/lauris)\
**Post date:** [24 August 2020 16:59 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123/12 "2020-08-24T16:59:51Z")

</div>

i don’t think this is the right script to start a node: $CNODE\_HOME/scripts/cabal-build-all.sh  
but if you are using CNtools, then the issue is that it doesn’t allow to start a new cardano-node instance if the socket file is still there… (sometimes on hard reset or kill -9 cardano-node, or trying to launch 2 instances of cardano-node can create that kind of mess)

i checked the script and found this:

> if [[-S “$CNODE\_HOME/sockets/node0.socket”]]; then  
> echo “ERROR: A Cardano node is already running, please terminate this node before starting a new one with this script.”  
> exit 1  
> fi

To correct this:

1. stop the node
2. remove the socket file:

> rm $CNODE\_HOME/sockets/node0.socket

1. start the node with your script

let me know if this helped.

---

<div class="post-metadata">

**Author:** ![jSolx](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/jsolx/32/17655_2.png) [@jSolx](https://forum.cardano.org/u/jSolx)\
**Post date:** [24 August 2020 17:02 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123/13 "2020-08-24T17:02:41Z")

</div>

haha cool thank you appreciate your time lauris  
its syncing now. ill try to finish it now wow i was reading every thread to find how to do that haha  
ive redone the whole thing maybe 20 times because of this lol fun

---

<div class="post-metadata">

**Author:** ![jSolx](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/jsolx/32/17655_2.png) [@jSolx](https://forum.cardano.org/u/jSolx)\
**Post date:** [24 August 2020 17:33 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123/14 "2020-08-24T17:33:52Z")

</div>

> [@lauris](#):
>
> rm $CNODE\_HOME/sockets/node0.socket

one last question im getting this on the node now  
DbLocked “/opt/cardano/cnode/db/lock”

---

<div class="post-metadata">

**Author:** ![lauris](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/lauris/32/37129_2.png) [@lauris](https://forum.cardano.org/u/lauris)\
**Post date:** [24 August 2020 17:48 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123/15 "2020-08-24T17:48:10Z")

</div>

this usually is when you have another node running (which has locked the db)  
check if another cardano-node process is already running by:

> ps aux | grep cardano-node

if there is no other process and you still get that error - then try to move the old db folder and create a new one as you will need to re-sync the db

> cd $CNODE\_HOME/  
> mv db db-old && mkdir db

---

<div class="post-metadata">

**Author:** ![jSolx](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/jsolx/32/17655_2.png) [@jSolx](https://forum.cardano.org/u/jSolx)\
**Post date:** [24 August 2020 17:49 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123/16 "2020-08-24T17:49:40Z")

</div>

oh ok i see appreciated it !  
wow haha they both moving now.

---

<div class="post-metadata">

**Author:** ![jSolx](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/jsolx/32/17655_2.png) [@jSolx](https://forum.cardano.org/u/jSolx)\
**Post date:** [24 August 2020 19:49 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123/17 "2020-08-24T19:49:00Z")

</div>

lauris thank you !  
whats your stake pool ? ill delegate for a little while when i have more ada to your pool  
lol one more question you can always add another relay later right ?  
like its not set in stone once you’ve registered?

---

<div class="post-metadata">

**Author:** ![jSolx](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/jsolx/32/17655_2.png) [@jSolx](https://forum.cardano.org/u/jSolx)\
**Post date:** [24 August 2020 19:50 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123/18 "2020-08-24T19:50:25Z")

</div>

thank you!

---

<div class="post-metadata">

**Author:** ![jSolx](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/jsolx/32/17655_2.png) [@jSolx](https://forum.cardano.org/u/jSolx)\
**Post date:** [24 August 2020 19:50 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123/19 "2020-08-24T19:50:38Z")

</div>

thank you !

---

<div class="post-metadata">

**Author:** ![lauris](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/lauris/32/37129_2.png) [@lauris](https://forum.cardano.org/u/lauris)\
**Post date:** [24 August 2020 21:16 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123/21 "2020-08-24T21:16:10Z")

</div>

You can update your relays later on, but i would suggest to do it correctly on the first run.  
You can register a dns entry instead of IP address, so, if you decide later to change relay servers, you just need to change the DNS entry and point to the new server (or servers).

cheers,  
Lauris [EU01] 🙂

---

<div class="post-metadata">

**Author:** ![jSolx](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/jsolx/32/17655_2.png) [@jSolx](https://forum.cardano.org/u/jSolx)\
**Post date:** [24 August 2020 22:16 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123/23 "2020-08-24T22:16:14Z")

</div>

how do you claim a pool in pooltool ?  
i see it with the hex address but it doesn’t say my ticker name or anything just a bunch of numbers  
is there something im supposed to do ?

---

<div class="post-metadata">

**Author:** ![ADAfrog](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/adafrog/32/16303_2.png) [@ADAfrog](https://forum.cardano.org/u/ADAfrog)\
**Post date:** [24 August 2020 22:31 UTC](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123/24 "2020-08-24T22:31:12Z")

</div>

Click on the arrow on the right side of your pool listing - make sure you’re logged into pooltool. There will be a button to “claim this pool” either within the “manage” tab (or the manage tab will appear after claiming it)

[Next page](https://forum.cardano.org/t/error-a-cardano-node-is-already-running-please-terminate-this-node-before-starting-a-new-one-with-this-script/39123.md?page=2)
