windows下打开命令窗口,安装pm2:npm install pm2 -g
pm2成功安装,在项目目录下用pm2启动服务:pm2 start index.js,结果启动失败,错误如下:

.pm2\pm2.log last 15 lines:
PM2 | 2018-11-13T12:57:17: PM2 log: App [index:0] exited with code [1] via signal [SIGINT]
\index.js had too many unstable restarts (16). Stopped. "errored"

 
Error: EBADF: bad file descriptor, uv_pipe_open
at Object.exports._forkChild (child_process.js:110:5)
at Object.setupChannel (internal/process.js:247:8)
at startup (bootstrap_node.js:63:16)
at bootstrap_node.js:608:3
child_process.js:110
p.open(fd);
^
Error: EBADF: bad file descriptor, uv_pipe_open
at Object.exports._forkChild (child_process.js:110:5)
at Object.setupChannel (internal/process.js:247:8)
at startup (bootstrap_node.js:63:16)
at bootstrap_node.js:608:3
 
 
解决方案:
windows下用pm2启动node的时候,用cluster_mode启动,就可以成功启动node服务了。
命令如下:pm2 start index.js -i 0 -f    以cluster模式启动 node服务

windows pm2 启动nodejs失败:Error: EBADF: bad file descriptor, uv_pipe_open的更多相关文章

  1. dpdk EAL: Error reading from file descriptor 23: Input/output error

    执行test程序时输出: EAL: Error reading from file descriptor 23: Input/output error 原因: 在虚拟机添加的网卡,dpdk不支持导致的 ...

  2. java.net.SocketException: recvfrom failed: EBADF (Bad file descriptor)

    1. 问题说明: 与服务器之间进行socket通信的时候,客户端关闭socket之后,会抛出一个IOException,异常信息如下: java.net.SocketException: recvfr ...

  3. 使用pm2启动nodejs+express+mysql管理系统步骤

    背景: 由于个人兴趣,了解了一下nodejs+express+mysql项目.在项目搭建完成并开发完成并部署时,遇到一个尴尬的问题,就是后台的servive服务启动问题.日常开发时,打开2个cm窗口, ...

  4. 虚拟机EAL: Error reading from file descriptor

    这个是虚拟机安装固有的BUG,代码差异如下: diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linux ...

  5. DPDK运行出现EAL Error reading from file descriptor 23 Input output error

    原因 dpdk不支持该网卡导致,需要修改一行代码,跳过dpdk pci 检查. 解决方法 修改lib/librte_eal/linuxapp/igb_uio/igb_uio.c 将文件中该行修改 pc ...

  6. 使用pm2管理nodejs应用

    PM2 is a production process manager for Node.js applications with a built-in load balancer. It allow ...

  7. 玩转Windows服务系列——无COM接口Windows服务启动失败原因及解决方案

    将VS创建的Windows服务项目编译生成的程序,通过命令行 “服务.exe -Service”注册为Windows服务后,就可以通过服务管理器进行管理了. 问题 通过服务管理器进行启动的时候,发现服 ...

  8. Jenkins 远程启动nodejs失败,使用pm2守护Nodejs

    一.概述 使用Jenkins 远程ssh到linux,使用命令: ssh root@192.168.10.1 'cd /data/test;nohup npm start &' 发现linux ...

  9. windows 无法启动 SQL Server (MSSQLSERVER) 服务(位于本地计算机上)。错误 1069由于登入失败而无法启动 。

    windows 无法启动 SQL Server (MSSQLSERVER) 服务(位于本地计算机上).错误 1069由于登入失败而无法启动. 今天登录测试服务器突然出现无法登录的情况,经排查发现,SQ ...

随机推荐

  1. redis:set集合类型的操作(无序集合)

    1. set集合类型的操作(无序集合) 集合具有无序性(没有顺序).确定性(描述是确定的).唯一性(没有重复的元素) 1.1. sadd key member [member ...] 语法:sadd ...

  2. Microsoft.AspNet.Identity: UserID用整型数据表示, 而不是GUID

    第一篇:  这个好像不太好 http://stackoverflow.com/questions/19553424/how-to-change-type-of-id-in-microsoft-aspn ...

  3. Understanding Built-In User and Group Accounts in IIS 7

    Understanding Built-In User and Group Accounts in IIS 7 By lzb October 19, 2018 Introduction In earl ...

  4. ES6项目构建(babel+gulp+webpack)

    (一)基础架构 (二)任务自动化(gulp) (三)编译工具(babel,webpack) (四)代码实现 一.基础构架 1.app : 放置前端代码 css : css文件 js : js文件 cl ...

  5. Css3 实现循环留言滚动效果(一)

    一.常见留言滚动效果示例 html代码 <div class="runList"> <div class="runitem"> < ...

  6. 手把手教你制作微信小程序,开源、免费、快速搞定

    最近做了个"罗孚传车"的小程序 一时兴起,做了一个小程序,将个人收集的同汽车相关的行业资讯和学习资料,分享到小程序中,既作为历史资料保存,又提供给更多的人学习和了解,还能装一下:) ...

  7. SSE图像算法优化系列二十五:二值图像的Euclidean distance map(EDM)特征图计算及其优化。

    Euclidean distance map(EDM)这个概念可能听过的人也很少,其主要是用在二值图像中,作为一个很有效的中间处理手段存在.一般的处理都是将灰度图处理成二值图或者一个二值图处理成另外一 ...

  8. Nginx 反向代理504 Gateway Time-out

    location /ssfwpt { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_ ...

  9. C语言结构体变量私有化

    操作系统 : CentOS7.3.1611_x64 gcc版本 :4.8.5 问题描述 C语言结构体定义中的变量默认是公有(Public)属性,如果实现成员变量的私有(Private)化? 解决方案 ...

  10. EAS开发之挂菜单

        一:以管理员账号登录   二:挂菜单     点击菜单栏"系统"——客户化菜单编辑——选中上级目录——点击 新建——命名.键入唯一编码,把ui.java类的全路径,拷贝到 ...