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

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 ?

sudo killall cardano-node

2 Likes

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

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

1 Like

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

1 Like

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>

2 Likes

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

1 Like

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

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?

1 Like

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.

3 Likes

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

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

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

1 Like

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

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?

thank you!

1 Like

thank you !

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] :slight_smile:

1 Like

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 ?

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)

1 Like