Forest server request error -3008

We quite regularly experience this issue in our “recette” environment.

Here is the log we get when that happen:

[forest] 🌳🌳🌳  Unexpected error: Forest server request error: getaddrinfo ENOTFOUND api.forestadmin.com
{
  "jse_shortmsg": "Forest server request error",
  "jse_cause": {
    "errno": -3008,
    "code": "ENOTFOUND",
    "syscall": "getaddrinfo",
    "hostname": "api.forestadmin.com"
  },
  "jse_info": {},
  "stack": "VError: Forest server request error: getaddrinfo ENOTFOUND api.forestadmin.com
    at /opt/syndic-one-rebirth/node_modules/forest-express-sequelize/node_modules/forest-express/dist/services/forest-server-requester.js:52:23
    at Request.callback (/opt/syndic-one-rebirth/node_modules/forest-express-sequelize/node_modules/forest-express/node_modules/superagent/lib/node/index.js:893:3)
    at ClientRequest.<anonymous> (/opt/syndic-one-rebirth/node_modules/forest-express-sequelize/node_modules/forest-express/node_modules/superagent/lib/node/index.js:810:12)
    at ClientRequest.emit (events.js:315:20)
    at TLSSocket.socketErrorListener (_http_client.js:469:9)
    at TLSSocket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
From previous event:
    at Object.perform (/opt/syndic-one-rebirth/node_modules/forest-express-sequelize/node_modules/forest-express/dist/services/forest-server-requester.js:17:10)
    at OidcConfigurationRetrieverService._callee$ (/opt/syndic-one-rebirth/node_modules/forest-express-sequelize/node_modules/forest-express/dist/services/oidc-configuration-retriever.js:49:77)
    at tryCatch (/opt/syndic-one-rebirth/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/opt/syndic-one-rebirth/node_modules/regenerator-runtime/runtime.js:293:22)
    at Generator.next (/opt/syndic-one-rebirth/node_modules/regenerator-runtime/runtime.js:118:21)
    at asyncGeneratorStep (/opt/syndic-one-rebirth/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/opt/syndic-one-rebirth/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
    at /opt/syndic-one-rebirth/node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
    at new Promise (<anonymous>)
    at OidcConfigurationRetrieverService.<anonymous> (/opt/syndic-one-rebirth/node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12)
    at OidcConfigurationRetrieverService._fetchConfiguration (/opt/syndic-one-rebirth/node_modules/forest-express-sequelize/node_modules/forest-express/dist/services/oidc-configuration-retriever.js:60:37)
    at OidcConfigurationRetrieverService._callee2$ (/opt/syndic-one-rebirth/node_modules/forest-express-sequelize/node_modules/forest-express/dist/services/oidc-configuration-retriever.js:106:60)
    at tryCatch (/opt/syndic-one-rebirth/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/opt/syndic-one-rebirth/node_modules/regenerator-runtime/runtime.js:293:22)
    at Generator.next (/opt/syndic-one-rebirth/node_modules/regenerator-runtime/runtime.js:118:21)
    at asyncGeneratorStep (/opt/syndic-one-rebirth/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/opt/syndic-one-rebirth/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
    at /opt/syndic-one-rebirth/node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
    at new Promise (<anonymous>)
    at OidcConfigurationRetrieverService.<anonymous> (/opt/syndic-one-rebirth/node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12)
    at OidcConfigurationRetrieverService.retrieve (/opt/syndic-one-rebirth/node_modules/forest-express-sequelize/node_modules/forest-express/dist/services/oidc-configuration-retriever.js:134:26)
    at OidcClientManagerService._callee$ (/opt/syndic-one-rebirth/node_modules/forest-express-sequelize/node_modules/forest-express/dist/services/oidc-client-manager.js:73:63)
    at tryCatch (/opt/syndic-one-rebirth/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/opt/syndic-one-rebirth/node_modules/regenerator-runtime/runtime.js:293:22)
    at Generator.next (/opt/syndic-one-rebirth/node_modules/regenerator-runtime/runtime.js:118:21)
    at asyncGeneratorStep (/opt/syndic-one-rebirth/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/opt/syndic-one-rebirth/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
    at /opt/syndic-one-rebirth/node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
    at new Promise (<anonymous>)
    at OidcClientManagerService.<anonymous> (/opt/syndic-one-rebirth/node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12)
    at OidcClientManagerService.getClientForCallbackUrl (/opt/syndic-one-rebirth/node_modules/forest-express-sequelize/node_modules/forest-express/dist/services/oidc-client-manager.js:112:41)
    at AuthenticationService._callee$ (/opt/syndic-one-rebirth/node_modules/forest-express-sequelize/node_modules/forest-express/dist/services/authentication.js:94:54)
    at tryCatch (/opt/syndic-one-rebirth/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/opt/syndic-one-rebirth/node_modules/regenerator-runtime/runtime.js:293:22)
    at Generator.next (/opt/syndic-one-rebirth/node_modules/regenerator-runtime/runtime.js:118:21)
    at asyncGeneratorStep (/opt/syndic-one-rebirth/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/opt/syndic-one-rebirth/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)"

On the client site, we get the “Log in again” pop up error message. After several attempts, it’s working eventually.

Hello,

It seems that there is a problem with your DNS server. Are you using a custom one?

Hello I work with Jérémy on this subject,

yes we have a custom DNS.

We try to ping the address api.forestadmin.com on the server, the URL is resolved but we get no response for the ping :

root@SVAPI-PRE-01:~# ping api.forestadmin.com
PING api.forestadmin.com.herokudns.com (54.73.26.109) 56(84) bytes of data.

api.forestadmin.com.herokudns.com ping statistics —
3 packets transmitted, 0 received, 100% packet loss, time 2014ms

root@SVAPI-PRE-01:~# ping api.forestadmin.com
PING api.forestadmin.com.herokudns.com (108.128.72.146) 56(84) bytes of data.

Yes, it’s normal, our server is not configured to answer to pings.

The error that you are getting indicates that your machine is not finding an IP address for the name api.forestadmin.com either because your DNS server is not answering or because it answers that this name is unknown.