self-hosted runner installed on Linux, doesn't pick job once ssh session terminates #57817
-
I have a self-hosted runner installed on Linux VM and it's working fine until I have an active SSH session to it once the ssh session terminates, it doesn't pick up any job and Github shows waiting for the runner to pick the job and status remains in the queue. once I relogin into a runner, I can see the listener process is still running and if try to start the process again using ./run.sh it says already established connection. please advise how to fix the issue. ideally, the runner should be always listening to jobs even if no ssh session to it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I searched for a while and found this hope it helps: By default, when you disconnect from an SSH session, any processes started within that session may be terminated. To ensure that your self-hosted runner continues to run even after you disconnect from the SSH session, you can use a tool like nohup or tmux. Here's a step-by-step guide on how to use nohup to keep the runner process running:
The nohup command allows the process to continue running even after the SSH session is terminated. The & at the end runs the process in the background.
If you prefer to use tmux, it provides a more advanced terminal multiplexer that allows you to create and manage multiple terminal sessions within a single SSH session. It enables you to detach from and reattach to sessions, keeping your runner process running even when you're not connected. |
Beta Was this translation helpful? Give feedback.
I searched for a while and found this hope it helps:
By default, when you disconnect from an SSH session, any processes started within that session may be terminated. To ensure that your self-hosted runner continues to run even after you disconnect from the SSH session, you can use a tool like nohup or tmux.
Here's a step-by-step guide on how to use nohup to keep the runner process running:
nohup ./run.sh &
The nohup command allows the process to continue running even after the SSH session is terminated. The & at the end runs…