If you are using Linux (Ubuntu), the service most likely tries to use IPv6 first, which may cause the error.
You can force Node.js to prefer IPv4 by setting the following environment variable:
export NODE_OPTIONS=--dns-result-order=ipv4first
In most cases, this will resolve the problem.