{"schemaVersion":"1.0","canonicalUrl":"https://automationtester.in/failures/dns-resolution-failed-in-ci","slug":"dns-resolution-failed-in-ci","title":"DNS resolution failed in CI","signature":"getaddrinfo ENOTFOUND service-name","frameworks":["CI","Jest","Playwright"],"classification":"environment","summary":"The runtime could not translate a configured host name into an address in the CI environment.","causes":[{"title":"The service alias is missing","explanation":"The test expects a container or CI service name that was not declared.","diagnostic":"List the services and inspect the resolved environment variable without printing credentials.","fix":"Declare the service with the expected alias or update the base host."},{"title":"A production-only hostname leaked into tests","explanation":"Environment precedence may select an unreachable host.","diagnostic":"Trace which env file or secret sets the host in this job.","fix":"Use an explicit test configuration and validate it before the suite starts."},{"title":"DNS was temporarily unavailable","explanation":"Runner or network instability can cause a transient lookup failure.","diagnostic":"Compare failures across unrelated hosts and runner instances.","fix":"Retry only the readiness probe with a short bound, then surface the runner as unhealthy."}],"prevention":["Validate hosts before tests.","Use stable CI service aliases.","Do not silently fall back to production endpoints."],"related":["econnrefused-in-ci","dependency-module-not-found"],"references":[{"label":"Node.js common system errors","url":"https://nodejs.org/api/errors.html#common-system-errors"}]}