AWS stops my node when I close tab with console

Hi, I’m newby blockchain enthusiast and I try to run stake pool on testnet.
So I created t2.medium instance on AWS/EC2 just as in the getting started with all necessary params set up. I was able to start a passive node and was following tutorial. I wanted to leave the node working over night to sync with the network. In the morning I’ve noticed the process was killed (but the instance itself were in ‘running’ state. I tried to run a node on one console and check status in the other. When I close the console window with running node it seems the node is being killed and the status cannot be checked. What should I do? Thanks in advance.

You need to have systemctl scripts that restart your node automatically check the coin cashew guide:

https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node

search for “systemctl” and go through those steps, ideally all the steps from the beginning.

Also a tip for running cardano on Amazon AWS is click your EC2 dash board and get a Elastic IP (EIP) because if you have to stop and start your AWS server your public IP will change, this way you have a static IP.

2 Likes

Also, install screen in the epel release repo. when you connect just type screen and it virtualizes a local terminal session that you can resume. ctrl+a+d to detach from it screen -ls to list the open ones and screen -R id to re attach.

in case you are before the stage where you want to systemctl

You can use TMUX also

tmux new-session -s name
tmux attach -t name
tmux ls
tmux kill-window -t name

This allows you to have something running in a different window you can pop back and forth with. I normally have this command running : journalctl --follow or journalctl -e -f -u cardano-node.service (to find any errors that might be happening)

Man I’ve been wondering what the hell TMUX was. I’be been around so long that TMUX is a T1 multiplexer. :joy:

I also upgraded to t3.large AWS because my mediums were running out of memory, just a heads up.