You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a default install of nango's helm chart version 1.0 the following services (runner, persist, orchestrator, jobs) will not run properly due to an error Missing or invalid env vars: SERVER_PORT (invalid_type Expected number, received nan) error.
The full log entry is below:
file:///app/nango/packages/utils/dist/environment/parse.js:164
throw new Error(`Missing or invalid env vars: ${zodErrorToString(res.error.issues)}`);
^
Error: Missing or invalid env vars: SERVER_PORT (invalid_type Expected number, received nan)
at parseEnvs (file:///app/nango/packages/utils/dist/environment/parse.js:164:15)
at file:///app/nango/packages/shared/dist/services/providers.js:10:14
at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:122:5)
Node.js v20.18.1
The cause of this error is understood to be a combination of two things:
Kubernetes' "Service" resources publish an environment variables to other pods based on the service's name - for instance, a "Kind: Service" resource:
named "service" publishes an environment variable to all other services as follows SERVER_PORT=tcp://172.20.109.125:80
named "nango-persist" publishes an environment variable to all other services as follows NANGO_PERSIST_PORT=tcp://172.20.176.3:80
The nango applications read the variables SERVER_PORT or NANGO_PERSIST_PORT which, rather than being set to an expected value (example: 80) are the values published by other Nango Kubernetes Services.
I have a few ideas for resolution described below:
Have all Nango service names append a -svc suffix
Reconfigure the Nango applications to read environment variables that are not commonly set (prefixing with NANGO_seemed like a good idea)
Have the values.yaml file explicitly declare each of these values (this assumes that the explicit envvars would override the published envvars)
The text was updated successfully, but these errors were encountered:
colinbjohnson
changed the title
Pods Fail to Run with Default Helm Chart Install Due to *_PORT Environment Variable Being Set Incorrectly
Nango Pods Fail to Run with Default Helm Chart Install Due to *_PORT Environment Variable Being Set Incorrectly
Jan 12, 2025
With a default install of nango's helm chart version 1.0 the following services (runner, persist, orchestrator, jobs) will not run properly due to an error
Missing or invalid env vars: SERVER_PORT (invalid_type Expected number, received nan)
error.The full log entry is below:
The cause of this error is understood to be a combination of two things:
SERVER_PORT=tcp://172.20.109.125:80
NANGO_PERSIST_PORT=tcp://172.20.176.3:80
SERVER_PORT
orNANGO_PERSIST_PORT
which, rather than being set to an expected value (example:80
) are the values published by other Nango Kubernetes Services.I have a few ideas for resolution described below:
-svc
suffixNANGO_
seemed like a good idea)values.yaml
file explicitly declare each of these values (this assumes that the explicit envvars would override the published envvars)The text was updated successfully, but these errors were encountered: