被该问题困扰的人还是挺多的,所以又对这个问题进行了一些更深入的分析,希望可以解决读者的问题
新版本:Python 的 Broken Pipe 错误问题分析
遇到一个很奇怪的问题, web.py代码里面报错
IOError: [Errno 32] Broken pipe 启动命令: nohup python xxx.py > xxx.log & ssh登录到机器上, 启动, 不会出现
远程ssh执行启动脚本, 就会出现IOError问题 查看进程pid, ll /proc/<pid>/fd 发现, stderr也就是fd为2的文件, 竟然是个pipe, 是个broken pipe, 错误的地方找到了 猜测可能是ssh登录过去, nohup会redirect stderr, 默认重定向到stdout, 不过ssh会话的stdout应该是pipe, 因为需要把输出从远端机器回传到本机
nohup把stderr重定向到了这个pipe上, 当ssh会话结束时, pipe自然会被关闭, 这样当程序代码中往stderr里面写入东西的时候, 就会报错了 希望对遇到类似问题的人有帮助, 这个问题卡了我四个小时.

Python的问题解决: IOError: [Errno 32] Broken pipe的更多相关文章

  1. PHP系列 | PDO::prepare(): send of 68 bytes failed with errno=32 Broken pipe

    设计场景 1.开启Redis的键空间过期事件(键过期发布任务),创建订单创建一个过期的key,按照订单号为key,设置过期时间. 2.通过Redis的订阅模式(持久阻塞),获取到订单号进行组装. 3. ...

  2. BrokenPipeError: [Errno 32] Broken pipe

    运行Pytorch tutorial代码报错:BrokenPipeError: [Errno 32] Broken pipe 源代码地址: Training a classifier (CIFAR10 ...

  3. socket.error: [Errno 32] Broken pipe . tcp

    经过检查发现,是由于客户端请求的链接,在一次循环之后,产生的套接字关闭,没有新的客户端套接字进行请求连接,所以产生broken pipe错误

  4. ERROR: openstack Error finding address for http://10.16.37.215:9292/v1/images: [Errno 32] Broken pipe

    Try to set: no_proxy=10.16.37.215 this should help 转自: http://askubuntu.com/questions/575938/error-i ...

  5. flask 中访问时后台错误 error: [Errno 32] Broken pipe

    解决办法:app.run(threaded=True) 个人理解:flask默认单线程,访问一个页面时会访问到很多页面,比如一些图片,加入参数使其为多线程

  6. hive使用python脚本导致java.io.IOException: Broken pipe异常退出

    反垃圾rd那边有一个hql,在执行过程中出现错误退出,报java.io.IOException: Broken pipe异常,hql中使用到了python脚本,hql和python脚本最近没有人改过, ...

  7. Python报错IOError: [Errno 22] invalid mode ('r') or filename

    IOError: [Errno 22] invalid mode ('r') or filename: 这种错误的出现是在使用built-in函数file()或者open()的时候. 或者是因为文件的 ...

  8. 因采用 Flask 原生 WSGI 出现 "Broken pipe" 报错的故障处理

    :first-child { margin-top: 0; } blockquote > :last-child { margin-bottom: 0; } img { border: 0; m ...

  9. PHP Rabbitmq 报错Broken pipe

    fwrite(): send of 13 bytes failed with errno=32 Broken pipe fwrite(): send of 21 bytes failed with e ...

随机推荐

  1. [SQL] SQL 日常检查脚本

    --sqlserver 日常检查脚本 print '----------------------------' print ' 0.sqlserver all information ' print ...

  2. 如何使QLineEdit禁止编辑

    在写程序的时候喜欢使用QLineEdit,用来显示打开文件的路径.但是很不喜欢被编辑.那么要怎么设置不可编辑呢. (1)调用lineEdit->setEnabled(False) #不可编辑了 ...

  3. R序列seq

    > seq(from=10,to=20,by=3) [1] 10 13 16 19 > seq(from=10,to=20,length=5) [1] 10.0 12.5 15.0 17. ...

  4. ABP之应用服务(2)

    在上一篇的笔记中,已经大致对Application层的使用作了简要的使用说明,感觉还是有些东西需要研究一下,所以承接上文,对AutoMapper这个方便的东西,稍微研究一下. 一.初识AutoMapp ...

  5. POJ-2081 Recaman's Sequence

    Recaman's Sequence Time Limit: 3000MS Memory Limit: 60000K Total Submissions: 22392 Accepted: 9614 D ...

  6. 2018牛客网暑期ACM多校训练营(第三场) A - PACM Team - [四维01背包][四约束01背包]

    题目链接:https://www.nowcoder.com/acm/contest/141/A 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K ...

  7. SPOJ IM - Intergalactic Map - [拆点最大流]

    题目链接:http://www.spoj.com/problems/IM/en/ Time limit:491 ms Memory limit:1572864 kB Code length Limit ...

  8. CCCC L2-017. 人以群分 贪心

    https://www.patest.cn/contests/gplt/L2-017 题解:贪心,一点小数学 坑:XJB改下标改错了 #include <iostream> #includ ...

  9. python数据结构之树(二分查找树)

    本篇学习笔记记录二叉查找树的定义以及用python实现数据结构增.删.查的操作. 二叉查找树(Binary Search Tree) 简称BST,又叫二叉排序树(Binary Sort Tree),是 ...

  10. Linux下的反调试技术

    Linux下的反调试技术 2014年01月30日 ⁄ 综合 ⁄ 共 2669字 ⁄ 字号 小 中 大 ⁄ 评论关闭 转自  http://wangcong.org/blog/archives/310 ...