被该问题困扰的人还是挺多的,所以又对这个问题进行了一些更深入的分析,希望可以解决读者的问题
新版本: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. ElasticSearch 简单入门

    英文原文:Getting Started with ElasticSearch 原文链接:http://www.oschina.net/translate/elasticsearch-getting- ...

  2. php无限极分类递归与普通

    1. 递归 public function getInfo(){$data=$this->select();$arr=$this->noLimit($data,$f_id=0,$level ...

  3. HDU-1003 Max Sum(动态规划,最长字段和问题)

    Max Sum Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submi ...

  4. SQL Fundamentals: 表的创建和管理(表的基本操作,闪回技术flashback,表结构修改)

    SQL Fundamentals || Oracle SQL语言 1.表的基本操作 (CREATE TABLE, DROP TABLE,TRUNCATE TABLE, RENAME tablename ...

  5. The "get" method should be used when the form is idempotent---正交的两个概念 get 幂等

    https://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.1 17.13.1 Form submission method The me ...

  6. 关于LeNet-5卷积神经网络 S2层与C3层连接的参数计算的思考???

    https://blog.csdn.net/saw009/article/details/80590245 关于LeNet-5卷积神经网络 S2层与C3层连接的参数计算的思考??? 首先图1是LeNe ...

  7. HTML5 Storage(永久存储)

    localStorage.aa="aa"; //存储了一个key为aa并且value为aa的键值对: localStorage.setItem("bb", &q ...

  8. I Hate It---hdu1754线段树

    题目:http://acm.hdu.edu.cn/showproblem.php?pid=1754 和上一题一样是模板题,就是那道题求得是和,这道求得是最大值: #include<iostrea ...

  9. Spring-事务管理(Transaction)

    1.事务介绍 事务(Transaction):访问并能更新数据库中数据项的一个程序执行单元. 事务是一系列的动作,它们综合在一起才是一个完整的工作单元,这些动作必须要么全部完成,要么什么都不做,如果有 ...

  10. js定位当前位置的坐标经纬度和地点名称和天气

    <script src="http://api.map.baidu.com/api?v=2.0&ak=s6vFvPKgaEnI2ImqBpKGDj0m">< ...