Running the node ./startBlockProducingNode.sh

Hi - when I start my nodes (one Relay and one block producer) i give the command ./startBlockProducingNode.sh (e.g. for the block producer)

Well it all works pretty well until I close the terminal window? I get the feeling that as soon as I exit the ssh connection with my server the node is not running anymore.

I thought it runs in the background? How does this work? I cant always let the terminal window open to run the node…

BRGDS

I do it with tmux.

You only need to type tmux in the your script folder. Then you should get a new clean window. You can start your startupscript in there and close the session.

If you want to be sure your node is running. You can check it on your BP.

Thanks for your reply! I now implemented auto starting with systemd services and it also works nice

But which script folder do you mean exactly and what do i have to type into that?

The folder you have your ./startBlockProducingNode.sh.

Like this cd path/to/your/startBlockProducingNode.sh

And then execute it in tmux with this ./startBlockProducingNode.sh

Hi Nirvana, I tried to do it but tmux always seaches the needed files in the / directory. but on my server all files are in my /cardano-my-node directory. How can i tell him that? brgds

If i unddrstand that correct.
Your tmux shows you something like this user@hostname:/ but you want to go to user@hostname:/cardano-my-node. If that is the case then you need to navigate it like befor with cd /cardano-my-node and then ./startBlockProducingNode.sh.

If that is already correct, make sure the ./startBlockProducingNode.sh is correct.

Yeah I do navigate in the correct folder first. Then i start my tmux session. then i type is ./startBlocknode. Next thing tmux tells me is:
InvalidYaml (Just (YamlException “Yaml file not found: /mainnet-config.json”))

cardano-node: YAML exception:
Yaml file not found: /mainnet-config.json

But I AM in the right folder where mainnet-config.json is located. But tmux tries to find it in /

I already tried to copy all files to / then it works. But I dont think thats right…

Are you sure you have the right Path in the ./startBlockProducingNode.sh for the mainnet-config.json?

You need to give in the ./startBlockProducingNode.sh the full path to each file. Like mainnet-config, topology, shelly-genesis.

yes, because if i start it without tmux it works perfectly fine

Are you realy sure the path to the mainnet-config file is correct? I am asking because, this is clearly a wrong path. I just took out something of my path and i got the same error message.

InvalidYaml (Just (YamlException “Yaml file not found: /files/config.json”))

cardano-node: YAML exception:
Yaml file not found: /files/config.json

Okay the thing was the path was configured like this:

DIRECTORY=$NODE_HOME

PORT=6000

HOSTADDR=0.0.0.0

TOPOLOGY=${DIRECTORY}/${NODE_CONFIG}-topology.json

DB_PATH=${DIRECTORY}/db

SOCKET_PATH=${DIRECTORY}/db/socket

CONFIG=${DIRECTORY}/${NODE_CONFIG}-config.json

Now i changed all ${DIRECTORY} to the real actual path /…/…/cardano-my-node and now it works… dont know how this can happen

But thank you very much for your help you gave the important hint :pray::pray:

No Problem. Maybe it could be, because you have two $ sign. But can’t tell you 100% for sure.

1 Like