node-abstractsocket icon indicating copy to clipboard operation
node-abstractsocket copied to clipboard

Getting lib_uv_open error when trying to use cluster package

Open alex-lange opened this issue 5 years ago • 3 comments

Hi!

I am playing around with abstract sockets with our node server, and one issue I'm running into is getting it to work with the cluster library. It appears that when the workers try to connect, I get the following error:

Error: EEXIST: file already exists, uv_pipe_open
  File "net.js", line 1219, col 18, in createServerHandle
  File "net.js", line 1289, col 14, in Server.setupListenHandle [as _listen2]
  File "net.js", line 1357, col 12, in listenInCluster
  File "net.js", line 1417, col 5, in Server.listen
  File "internal/cluster/round_robin_handle.js", line 25, col 17, in new RoundRobinHandle
  File "internal/cluster/master.js", line 303, col 14, in queryServer
  File "internal/cluster/master.js", line 251, col 5, in Worker.onmessage
  File "internal/cluster/utils.js", line 47, col 8, in ChildProcess.onInternalMessage
  File "events.js", line 323, col 22, in ChildProcess.emit
  File "domain.js", line 482, col 12, in ChildProcess.EventEmitter.emit
  File "internal/child_process.js", line 876, col 12, in emit
  File "internal/process/task_queues.js", line 85, col 21, in processTicksAndRejections

I see that you contribute to libuv so maybe this will make sense to you. I am using node version 12.16.1.

The cluster code works when not using the cluster package, and also when using the cluster package with regular unix domain sockets.

alex-lange avatar May 20 '20 00:05 alex-lange

I have encountered the same issue. Did you find a way to work around? @alex-lange

zonyitoo avatar Jul 09 '20 17:07 zonyitoo

The error was returned from

https://github.com/nodejs/node/blob/d36e832a32dfb0c0c49bf9e3dee93ff231c97eb0/deps/uv/src/unix/pipe.c#L143-L144

zonyitoo avatar Jul 10 '20 15:07 zonyitoo

Hi @saghul , could you please check this out? I want to use this library with cluster.

zonyitoo avatar Jul 11 '20 12:07 zonyitoo