Python的问题解决: IOError: [Errno 32] Broken pipe
被该问题困扰的人还是挺多的,所以又对这个问题进行了一些更深入的分析,希望可以解决读者的问题
新版本: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的更多相关文章
- PHP系列 | PDO::prepare(): send of 68 bytes failed with errno=32 Broken pipe
设计场景 1.开启Redis的键空间过期事件(键过期发布任务),创建订单创建一个过期的key,按照订单号为key,设置过期时间. 2.通过Redis的订阅模式(持久阻塞),获取到订单号进行组装. 3. ...
- BrokenPipeError: [Errno 32] Broken pipe
运行Pytorch tutorial代码报错:BrokenPipeError: [Errno 32] Broken pipe 源代码地址: Training a classifier (CIFAR10 ...
- socket.error: [Errno 32] Broken pipe . tcp
经过检查发现,是由于客户端请求的链接,在一次循环之后,产生的套接字关闭,没有新的客户端套接字进行请求连接,所以产生broken pipe错误
- 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 ...
- flask 中访问时后台错误 error: [Errno 32] Broken pipe
解决办法:app.run(threaded=True) 个人理解:flask默认单线程,访问一个页面时会访问到很多页面,比如一些图片,加入参数使其为多线程
- hive使用python脚本导致java.io.IOException: Broken pipe异常退出
反垃圾rd那边有一个hql,在执行过程中出现错误退出,报java.io.IOException: Broken pipe异常,hql中使用到了python脚本,hql和python脚本最近没有人改过, ...
- Python报错IOError: [Errno 22] invalid mode ('r') or filename
IOError: [Errno 22] invalid mode ('r') or filename: 这种错误的出现是在使用built-in函数file()或者open()的时候. 或者是因为文件的 ...
- 因采用 Flask 原生 WSGI 出现 "Broken pipe" 报错的故障处理
:first-child { margin-top: 0; } blockquote > :last-child { margin-bottom: 0; } img { border: 0; m ...
- PHP Rabbitmq 报错Broken pipe
fwrite(): send of 13 bytes failed with errno=32 Broken pipe fwrite(): send of 21 bytes failed with e ...
随机推荐
- ThreadLocal Java并发
ThreadLocal 文章来源:http://con.zhangjikai.com/ThreadLocal.html ThreadLocal 主要用来提供线程局部变量,也就是变量只对当前线程可见. ...
- CentOS 6U7分区大于2TB的磁盘以及挂载大于16TB分区磁盘的解决方案
一.内容介绍1.问题描述1).问题一 CentOS 6.x 在格式化大于16TB的ext4分区时,会提示如下错误: mke2fs 1.41.12 (17-May-2010)mkfs.ext4: Siz ...
- ububtu16.04下安装protobuf
重新下载protobuf,我下载的时最新的protobuf-all-3.5.1.tar.gz protobuf网址:https://github.com/google/protobuf/relea ...
- 蓝桥杯 - G将军有一支训练有素的军队 - [树形DP]
G将军有一支训练有素的军队,这个军队除开G将军外,每名士兵都有一个直接上级(可能是其他士兵,也可能是G将军).现在G将军将接受一个特别的任务,需要派遣一部分士兵(至少一个)组成一个敢死队,为了增加敢死 ...
- oracle trunc 函数处理日期格式,日期类型很有用的几个sql
select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual; --显示当前时间2011-12-29 16:24:34 select trunc ...
- Linux/Unix命令行安装weblogic软件
--通过java -jar wls1036_generic.jar启动安装weblogic软件进程: [weblogic@localhost mnt]$ java -jar wls1036_gener ...
- stack overflow underflow
Introduction to algorithms / Thomas H. Cormen...[etal.].—3rded. If we attempt to pop an empty stack, ...
- android udev
http://www.freesoftwaremagazine.com/articles/drivers_linux http://blog.csdn.net/jianchi88/article/de ...
- 用PHP编写一个APP的API
第一部分,通信接口的实现 标签(空格分隔): PHP 手机后台 api 通信接口 Andy PHP开发手机API时,一般返回XML或JSON数据类型的数据,除了要返回从源数据(程序本身需要的数据)外还 ...
- HashMap实现原理分析(面试问题:两个hashcode相同 的对象怎么存入hashmap的)
1. HashMap的数据结构 数据结构中有数组和链表来实现对数据的存储,但这两者基本上是两个极端. 数组 数组存储区间是连续的,占用内存严重,故空间复杂的很大.但数组的二分查找时间复杂度小,为O(1 ...