Error Code Portal
Node.jsNode.jsError code

ERR_SOCKET_CLOSED_BEFORE_CONNECTION

socket closed before connection

Code ERR_SOCKET_CLOSED_BEFORE_CONNECTION · An issue reported by Node.js.

When calling net.Socket.write() on a connecting socket and the socket was closed before the connection was established.

Troubleshooting and diagnostic links

First check that the document's product, version, and environment match your situation.