Python Problem Solving: IOError: [Errno] Broken pipe

Source: Internet
Author: User
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.