0
votes

I have a linux service which does some work and then starts an ngrok process. I have been trying to start this process in the back ground but it stops. I have tried the following:

./ngrok --config="./ngrok-config" -proto=tcp -subdomain="test" 22 &

./ngrok --config="./ngrok-config" -proto=tcp -subdomain="test" 22 & > /dev/null

./ngrok --config="./ngrok-config" -proto=tcp -subdomain="test" 22 & > /ngrok/ngrok.log

nohup ./ngrok --config="./ngrok-config" -proto=tcp -subdomain="test" 22 & > /ngrok/ngrok.log

nohup ./ngrok --config="./ngrok-config" -proto=tcp -subdomain="test" 22 & 2> /dev/null

After each command I cannot connect to the tunnel and checking jobs shows the process as stopped.

running : ./ngrok --config="./ngrok-config" -proto=tcp -subdomain="test" 22

works as expected and starts the tunnel allowing me to connect.

any Ideas??

1

1 Answers

0
votes

It turns out I was missing: -log=stdout. By not having this I assume the process was trying to access resources which in turn terminated the process.

This works now: ./ngrok --config="./ngrok-config" -log=stdout -proto=tcp -subdomain="test" 22 & > /dev/null