Node-socketio EHOSTUNREACH

I have raised topics previously which were vaguely linked to this, and have been trying to debug them (unsuccessfully). Perhaps I explained badly in those, so I will try a different approach/explanation.

I get worker timeouts on various items from time to time. I have trolled all the logs, and the one that looks off-colour is the node-socketio.log

  • My erpnext is set up as
  • My DNS server does not have an IP for that FQDN
    • yet (… perhaps that would be the quickest fix - to be confirmed)
  • When I get a timeout, the log file contains something like this…
    • is the IP address if the * from the DNS server
    • :8120 is the () port on which the ERPNext system is being served
{ Error: connect EHOSTUNREACH
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
  errno: 'EHOSTUNREACH',
  syscall: 'connect',
  address: '',
  port: 8120,
  response: undefined }

It seems to me that node is sending the request out to the IP address of the looked up machine, instead of the internal/local machine.

I tried adding an entry in /etc/hosts for

but this makes no difference to the result.

Does anyone know if there is a way to tell/trick node and/or any of the node modules (eg. the net.js as above) to use some internal equivalent of a hosts file?

Much appreciated