Issue in GCP : getaddrinfo ENOTFOUND issue in Google Cloud Platform

Viewed 828

Getting Error: getaddrinfo ENOTFOUND for external API call.

I have shifted some of my company's infra to GCP. The issue I am facing is that suddenly out of the blue our GCP instances which are behind a VPC are giving us error

Error: getaddrinfo ENOTFOUND somedomain.xyz.in

    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:64:26) {

  errno: 'ENOTFOUND',

  code: 'ENOTFOUND',

  syscall: 'getaddrinfo',

  hostname: 'somedomain.xyz.in'

This error suddenly pops up and goes away automatically after sometime. Sometimes through one instance I am able to ping the above mentioned DNS whereas sometimes the SAME DNS is not ping-able from same instance. I have my billing etc all enabled. If someone has any solution please let me know.

Couple of more details :

  1. I am using Ubuntu18.04 LTS
  2. Instance on GCP are running a NODEJS program which pings the above mentioned external IP using HTTPS.
  3. The external service to which our system pings is hosted on Digital Ocean and is on Public IP and is mapped to a DNS.
  4. The call is made using needle package of NPM.
0 Answers
Related