Encounter a very strange problem, web.py code inside the error
IOError: [Errno] Broken pipe
Start command: Nohup python xxx.py > Xxx.log &
SSH log on to the machine, boot, does not appear
IOError problem occurs when remote SSH executes the startup script
View the process PID, LL/PROC/<PID>/FD found that stderr is the FD 2 file, unexpectedly is a pipe, is a broken pipe, the wrong place to find
Guess is SSH login in the past, Nohup will redirect stderr, default redirect to stdout, but SSH session stdout should be pipe, because the output from the remote machine to upload to the machine
Nohup redirect stderr to this pipe, when the SSH session ends, the pipe will naturally be closed, so when the program code in the stderr inside write things, will be error
I want to be helpful to people with similar problems, this problem has stuck me for four hours.
Python Problem Solving: IOError: [Errno] Broken pipe