我有一个linux服务,它执行一些工作,然后启动一个ngrok进程。我一直试图在后台启动这个过程,但它停止了。我尝试过以下几种方法:
./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
每次执行命令后,我都无法连接到隧道,检查作业时会显示该进程已停止。
运行:./ngrok --config="./ngrok-config“-proto=tcp -subdomain="test”22
按照预期工作,并启动允许我连接的隧道。
有什么想法吗?
发布于 2018-03-06 17:33:17
事实证明我错过了:-log=stdout。如果没有这一点,我认为该进程正在尝试访问资源,而这反过来又终止了该进程。
现在可以使用:./ngrok --config="./ngrok-config“-log=stdout -proto=tcp -subdomain="test”22 &> /dev/null
https://stackoverflow.com/questions/49059116
复制相似问题