Pm2: Bash on Ubuntu on Windows pm2 crashed

Created on 7 Aug 2016  路  15Comments  路  Source: Unitech/pm2

I use the new Ubuntu integration in win10

This pm2 installation is the development branch

crash by starting with following message

[PM2] Spawning PM2 daemon with pm2_home=/home/sven/.pm2
[PM2] PM2 Successfully daemonized
util.js:1008
  var errname = uv.errname(err);
                   ^

Error: err >= 0
    at Error (native)
    at Object.exports._errnoException (util.js:1008:20)
    at exports._exceptionWithHostPort (util.js:1035:20)
    at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)

all other starts come with this message

events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: connect Unknown system error -63104512 /home/sven/.pm2/rpc.sock
    at Object.exports._errnoException (util.js:1012:11)
    at exports._exceptionWithHostPort (util.js:1035:20)
    at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)

Software versions used

OS         : Ubuntu 14.04.5 LTS
node.js    : 6.3.1
PM2        : 2.0.3

PM2 Log output

2016-08-06 18:46:55: RPC interface [READY] on port /home/sven/.pm2/rpc.sock
2016-08-06 18:55:49: [PM2][WORKER] Started with refreshing interval: 30000
2016-08-06 18:55:49: [[[[ PM2/God daemon launched ]]]]
2016-08-06 18:55:49: BUS system [READY] on port /home/sven/.pm2/pub.sock
2016-08-06 18:55:49: RPC interface [READY] on port /home/sven/.pm2/rpc.sock
2016-08-06 19:02:50: ===============================================================================
2016-08-06 19:02:50: --- New PM2 Daemon started ----------------------------------------------------
2016-08-06 19:02:50: Time                 : Sat Aug 06 2016 19:02:50 GMT+0200 (DST)
2016-08-06 19:02:50: PM2 version          : 2.0.3
2016-08-06 19:02:50: Node.js version      : 6.3.1
2016-08-06 19:02:50: Current arch         : x64
2016-08-06 19:02:50: PM2 home             : /home/sven/.pm2
2016-08-06 19:02:50: PM2 PID file         : /home/sven/.pm2/pm2.pid
2016-08-06 19:02:50: RPC socket file      : /home/sven/.pm2/rpc.sock
2016-08-06 19:02:50: BUS socket file      : /home/sven/.pm2/pub.sock
2016-08-06 19:02:50: Application log path : /home/sven/.pm2/logs
2016-08-06 19:02:50: Process dump file    : /home/sven/.pm2/dump.pm2
2016-08-06 19:02:50: Concurrent actions   : 4
2016-08-06 19:02:50: SIGTERM timeout      : 1600
2016-08-06 19:02:50: ===============================================================================
2016-08-06 19:05:30: ===============================================================================
2016-08-06 19:05:30: --- New PM2 Daemon started ----------------------------------------------------
2016-08-06 19:05:30: Time                 : Sat Aug 06 2016 19:05:30 GMT+0200 (DST)
2016-08-06 19:05:30: PM2 version          : 2.0.3
2016-08-06 19:05:30: Node.js version      : 6.3.1
2016-08-06 19:05:30: Current arch         : x64
2016-08-06 19:05:30: PM2 home             : /home/sven/.pm2
2016-08-06 19:05:30: PM2 PID file         : /home/sven/.pm2/pm2.pid
2016-08-06 19:05:30: RPC socket file      : /home/sven/.pm2/rpc.sock
2016-08-06 19:05:30: BUS socket file      : /home/sven/.pm2/pub.sock
2016-08-06 19:05:30: Application log path : /home/sven/.pm2/logs
2016-08-06 19:05:30: Process dump file    : /home/sven/.pm2/dump.pm2
2016-08-06 19:05:30: Concurrent actions   : 4
2016-08-06 19:05:30: SIGTERM timeout      : 1600
2016-08-06 19:05:30: ===============================================================================
2016-08-07 12:40:38: ===============================================================================
2016-08-07 12:40:38: --- New PM2 Daemon started ----------------------------------------------------
2016-08-07 12:40:38: Time                 : Sun Aug 07 2016 12:40:38 GMT+0200 (DST)
2016-08-07 12:40:38: PM2 version          : 2.0.3
2016-08-07 12:40:38: Node.js version      : 6.3.1
2016-08-07 12:40:38: Current arch         : x64
2016-08-07 12:40:38: PM2 home             : /home/sven/.pm2
2016-08-07 12:40:38: PM2 PID file         : /home/sven/.pm2/pm2.pid
2016-08-07 12:40:38: RPC socket file      : /home/sven/.pm2/rpc.sock
2016-08-07 12:40:38: BUS socket file      : /home/sven/.pm2/pub.sock
2016-08-07 12:40:38: Application log path : /home/sven/.pm2/logs
2016-08-07 12:40:38: Process dump file    : /home/sven/.pm2/dump.pm2
2016-08-07 12:40:38: Concurrent actions   : 4
2016-08-07 12:40:38: SIGTERM timeout      : 1600
2016-08-07 12:40:38: ===============================================================================
Won't fix Windows

Most helpful comment

I'm not on the Windows Insider Fast Ring (which uses 16.04 already) but I have just upgraded my Bash on Windows to 14.04.5 LTS (on the latest stable windows version) and I still get the same error.

// edit:
Node version 6.9.1 (installed via nvm) and pm2 version 2.1.15

All 15 comments

another error if i start pm2 list

 pm2 list
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: connect Unknown system error -38459232 /home/sven/.pm2/rpc.sock
    at Object.exports._errnoException (util.js:1012:11)
    at exports._exceptionWithHostPort (util.js:1035:20)
    at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)

ls -la .pm2/

ls: .pm2/pub.sock: Das Argument ist ung眉ltig
insgesamt 20
drwxrwxrwx 2 sven sven    0 Aug 10 21:19 .
drwxr-xr-x 2 sven sven    0 Aug  9 23:38 ..
-rw-rw-rw- 1 sven sven 1727 Aug  6 18:46 conf.js
-rw-rw-rw- 1 sven sven    2 Aug 10 21:19 dump.pm2
drwxrwxrwx 2 sven sven    0 Aug  6 18:46 logs
-rw-rw-rw- 1 sven sven    2 Aug  6 18:46 module_conf.json
drwxrwxrwx 2 sven sven    0 Aug  6 18:46 pids
-rw-rw-rw- 1 sven sven 5708 Aug 10 21:19 pm2.log
-rw-rw-rw- 1 sven sven    2 Aug 10 21:19 pm2.pid
srwxrwxrwx 1 sven sven    0 Aug 10 21:19 pub.sock
srwxrwxrwx 1 sven sven    0 Aug 10 21:19 rpc.sock
-rw-rw-rw- 1 sven sven   13 Aug  6 18:46 touch

Yeah we got multiple report of pm2 not working on the windows 10 linux subsystem, we are trying to setup the linux subsystem without success for now. From the stacktrace its seems coming from node itself, maybe that the subsystem doesnt support socket ?

We managed to reproduce the issue, it looks like PM2 works quite well on the linux subsystem, there is just that exception that pops at PM2 initialization (rm ~/.pm2 ; pm2 ls)

same error

[PM2] Spawning PM2 daemon with pm2_home=/home/sven/.pm2
[PM2] PM2 Successfully daemonized
util.js:1008
  var errname = uv.errname(err);
                   ^

Error: err >= 0
    at Error (native)
    at Object.exports._errnoException (util.js:1008:20)
    at exports._exceptionWithHostPort (util.js:1035:20)
    at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)

I got this issue too on my win10 bash.

util.js:869
  var errname = uv.errname(err);
                   ^

Error: err >= 0
    at Error (native)
    at Object.exports._errnoException (util.js:869:20)
    at exports._exceptionWithHostPort (util.js:896:20)
    at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1077:14)
Makefile:12: recipe for target 'start' failed
make: *** [start] Error 1

After digging into Microsoft forums, its seems that not every syscall is working as expected, for example networking isnt fully implemented, just need to wait here.

Are you at least looking for a workaround or do we just have to wait until some unknown syscall may or may not get fixed?

@gpasq The whole implementation of pm2 is using socket to communicate with the daemon, we cannot make a workaround, sorry.

Same error here. Windows 10 and Bash on Ubuntu on Windows. And indeed, it seems to be a problem with Bash on Ubuntu on Windows. Let's hope it is fixed once they leave beta 馃槂

Same error here. :). Let's hope it is fixed once they leave beta

Same error. ehh

Same error, some solution?

This is issue still happens in new version of windows bash?
Please tell us your windows bash version

I'm not on the Windows Insider Fast Ring (which uses 16.04 already) but I have just upgraded my Bash on Windows to 14.04.5 LTS (on the latest stable windows version) and I still get the same error.

// edit:
Node version 6.9.1 (installed via nvm) and pm2 version 2.1.15

Sadly i guess we would need to wait some time before Microsoft implement all syscall of linux.
However you can use pm2 on windows, there are some problems but you should be able to use it.

Was this page helpful?
0 / 5 - 0 ratings