0

'Error: connect ENOENT unix:/run/php-fpm/php-fpm.sock\n at Object.exports._errnoException (util.js:860:11)\n at exports._exceptionWithHostPort (util.js:883:20)\n at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1063:14)'

When I am connecting to my server, which requests PHP file from second server then error happens.

Sock file exists but PHP server fails to connect to it using net.Stream.

How can I fix this problem?

var connection = new net.Stream();
...
connection.connect(options.fastcgiHost);
Piesek64
  • 67
  • 1
  • 8
  • `/run/php-fpm/...` looks like an invalid path, shouldn't that be `/var/run/php-fpm/...`? – robertklep Nov 27 '15 at 20:34
  • No, path is valid (ls /run/php-fpm/php-fpm.sock works and /run is just /run). – Piesek64 Nov 28 '15 at 08:15
  • What is `net.Stream()` exactly? I thought that it was called [`net.connect()`](https://nodejs.org/api/net.html#net_socket_connect_path_connectlistener). – robertklep Nov 28 '15 at 08:22
  • Even when using `var connection = net.connect({path:options.fastcgiHost});` instead of previous code it's not working. Same error. – Piesek64 Nov 28 '15 at 08:25
  • When path is without unix: it's returning hang up. In finality I will use C module. – Piesek64 Nov 28 '15 at 08:29

0 Answers0