문제

I am using some EC2 instances to run some large jobs I can not run locally. The issue I am seeing is that after a while (X hours since the process started) my connection on my shell gives me a broken pipe error

ubuntu@ip-10-122-xxx-xxx:~/stratto/ode$ Write failed: Broken pipe

The instance is still there because I can reconnect with no problems, but how can I reconnect and get back at seeing the logs of the process as before the 'Broken Pipe'

Any tip much appreciated, Thanks!

도움이 되었습니까?

해결책

Redirect your output to a file and then run the program "nohup ..." to ensure the disconnect doesn't kill it. Use "tail -f" to monitor the redirected file.

Note: Originally said to use "tee" but that won't work. I think a straight redirect and then tail on the file works.

다른 팁

You can use screen to run processes in the cloud even when you are not connected to the server.

sudo apt install screen

To specifically address the issue described in the original post (e.g. connecting to AWS EC2 instances) I a basic example and a more advanced example of using screen.

You can use "screen". Detach from it and ping to google.com. So there ssh session will be active through out the installation.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top