Keep node "running" when I disconnect

Hi!
One easy way to keep it running is to add startup-scripts for the nodes and put it in systemd, there is a coin cashew guide for this if you want to read more.

2 Likes

What type of system are you running? I found this site to be super helpful Startup scripts.

2 Likes

Hi There! I think your are looking for the nohup command:

nohup cardano-node run --topology configs/mainnet-topology_new.json --database-path storage/ --socket-path storage/node.socket --host-addr 127.0.0.1 --port 3001 --config ../config.json > nohup.out 2>&1 &

this will preserve the cardano-node process to run even the terminal session ended.
the console log will be stored in nohup.out file. And the process id will be printed out right after you executed the command. But this id can be get by ps -ef command anytime.

1 Like

My systemd scripts arent working for some reason.

Hello,

You can start your node in a tmux session:

  • create a tmux session (tmux new-session -s session_name)
  • start your node
  • to exit from tmux session (press Ctrl + b d)
  • to list tmux sessions (tmux ls)
  • attach to tmux session (tmux attach -t session_name)

Cheers,

3 Likes

Hey Alex, thanks for the tmux tip.

Do you know why this is giving me this error?

cardano-cli query protocol-parameters
–mainnet
–allegra-era
–out-file params.json

Shelley command failed: query protocol-parameters Error: A query from a certai n era was applied to a ledger from a different era: EraMismatch {ledgerEraName = “Byron”, otherEraName = “Allegra”}

What leads to this problem?

The node is synced?

yes node is synced. How do I check? It seems to be talking and running both block producer and relay.

Download this and run

1 Like

I have it in there. But its grayed out. How do I make it green? I also have the script gLiveView.sh

Ok, start glive then, what is the output?

Cardano Node - (Relay - Mainnet) : 1.25.1 [9a7331cc] <
┌────────────────────────┬────────────┬────────────────────────┐
│ Uptime: 00:30:15 │ Port: xxxx │ Guild LiveView v1.19.4 │
│------------------------└────────────┴────────────────────────┤
│ Epoch 215 [100.0%] (node) │
│ 2d 08:38:51 until epoch boundary (chain) │
│ ▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌ │
│ │
│ Block : 4662244 Tip (ref) : 22432869 │
│ Slot : 431972 Tip (node) : 7948772 │
│ Density : 5.023 Status : syncing (35.4%) │
│--------------------------------------------------------------│
│ Processed TX : 0 Out / In │
│ Mempool TX/Bytes : 0 / 0 Peers : 1 1 │
└──────────────────────────────────────────────────────────────┘

your nodes are not synced, they should be in epoch 249; wait to sync

1 Like

How far away is epoch 249?

I don’t know, depends (could take more hours)… how is ur topology file? did u already modified it?
can you show me?
maybe will be a good idea to add the IOHK nodes back till your nodes will be synced

{
“Producers”: [
{
“addr”: “x.x.x.x”,
“port”: xxxx,
“valency”: 1
}
]
}

{
“Producers”: [
{
“addr”: “x.x.x.x”,
“port”: xxxx,
“valency”: 1
},
{
“addr”: “relays-new.cardano-mainnet.iohk.io”,
“port”: 3001,
“valency”: 2
}
]
}

save the file and restart your node… check if now is syncing faster

1 Like

How do you stop a node in tmux?

connect to tmux and press Ctrl + c to stope the node

1 Like

my topology file isnt formatting correctly