Build failing - DNS error

We had a DNS problem yesterday, causing all of our sites to go down because of unverified SOA records. We got this fixed, and all of our sites have been working since yesterday afternoon. When everything went down yesterday, we started getting build failures with this error:

networkError: TypeError: fetch failed
9:35:04 AM: at Object.fetch (node:internal/deps/undici/undici:11457:11)
9:35:04 AM: at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
9:35:04 AM: cause: Error: getaddrinfo ENOTFOUND strapi-dev.tranont.com
9:35:04 AM: at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
9:35:04 AM: errno: -3008,
9:35:04 AM: code: β€œENOTFOUND”,
9:35:04 AM: syscall: β€œgetaddrinfo”,
9:35:04 AM: hostname: β€œstrapi-dev.tranont.com”
9:35:04 AM: }

I assume this is because of the DNS problems we were having, but we still can’t get a build to run in Netlify. We’re selecting to clear cache when running builds, but I wonder if there is still caching at play that is causing these builds to fail with a DNS error?

Website: https://www.tranont.com/
The DNS error is occuring with our Strapi servers: https://strapi.tranont.com/, https://strapi-dev.tranont.com/

Here is a full build log:

9:32:25 AM: build-image version: fcb0c1b3ada6d25c1cb58e8bc514f5f23cc14f15 (focal)
9:32:25 AM: buildbot version: d4068f75b500fda01f8eb2592656f157c0c28aa7
9:32:25 AM: Building without cache
9:32:25 AM: Starting to prepare the repo for build
9:32:26 AM: No cached dependencies found. Cloning fresh repo
9:32:26 AM: git clone --filter=blob:none https://github.com/Tranont/tranont-ssr
9:32:26 AM: Preparing Git Reference refs/heads/develop
9:32:28 AM: Starting to install dependencies
9:32:28 AM: Python version set to 3.8
9:32:28 AM: Attempting Ruby version 2.7.2, read from environment
9:32:29 AM: Using Ruby version 2.7.2
9:32:30 AM: Started restoring cached go cache
9:32:30 AM: Finished restoring cached go cache
9:32:31 AM: go version go1.19.13 linux/amd64
9:32:31 AM: Using PHP version 8.0
9:32:32 AM: Attempting Node.js version β€œv18.16.0” from .nvmrc
9:32:32 AM: Downloading and installing node v18.16.0…
9:32:32 AM: Downloading https://nodejs.org/dist/v18.16.0/node-v18.16.0-linux-x64.tar.xz…
9:32:32 AM: Computing checksum with sha256sum
9:32:33 AM: Checksums matched!
9:32:35 AM: Now using node v18.16.0 (npm v9.5.1)
9:32:35 AM: Enabling Node.js Corepack
9:32:35 AM: Started restoring cached build plugins
9:32:35 AM: Finished restoring cached build plugins
9:32:35 AM: Started restoring cached corepack dependencies
9:32:35 AM: Finished restoring cached corepack dependencies
9:32:35 AM: Started restoring cached yarn cache
9:32:35 AM: Finished restoring cached yarn cache
9:32:35 AM: No yarn workspaces detected
9:32:35 AM: Started restoring cached node modules
9:32:35 AM: Finished restoring cached node modules
9:32:35 AM: Installing npm packages using Yarn version 1.22.19
9:32:36 AM: yarn install v1.22.19
9:32:36 AM: [1/4] Resolving packages…
9:32:36 AM: [2/4] Fetching packages…
9:32:36 AM: warning Pattern [β€œ@apollo/client@latest”] is trying to unpack in the same destination β€œ/opt/buildhome/.yarn_cache/v6/npm-@apollo-client-3.7.16-418cb23566a6d52e9e22d34484167149269efd40-integrity/node_modules/@apollo/client” as pattern [β€œ@apollo/client@^3.4.16”]. This could result in non-deterministic behavior, skipping.
9:33:04 AM: [3/4] Linking dependencies…
9:33:04 AM: warning " > apollo-link@1.2.14" has incorrect peer dependency β€œgraphql@^0.11.3 || ^0.12.3 || ^0.13.0 || ^14.0.0 || ^15.0.0”.
9:33:04 AM: warning β€œapollo-link > apollo-utilities@1.3.4” has incorrect peer dependency β€œgraphql@^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0”.
9:33:04 AM: warning " > nextjs-breadcrumbs@1.1.9" has incorrect peer dependency β€œnext@^11.0.1”.
9:33:04 AM: warning " > nextjs-breadcrumbs@1.1.9" has incorrect peer dependency β€œreact@^17.0.2”.
9:33:04 AM: warning " > react-markdown@8.0.7" has unmet peer dependency β€œ@types/react@>=16”.
9:33:04 AM: warning " > @typescript-eslint/eslint-plugin@6.7.4" has unmet peer dependency β€œ@typescript-eslint/parser@^6.0.0 || ^6.0.0-alpha”.
9:33:04 AM: warning " > eslint-config-airbnb@19.0.4" has unmet peer dependency β€œeslint-plugin-jsx-a11y@^6.5.1”.
9:33:04 AM: warning Workspaces can only be enabled in private projects.
9:33:37 AM: [4/4] Building fresh packages…
9:33:42 AM: Done in 65.89s.
9:33:42 AM: npm packages installed using Yarn
9:33:42 AM: Successfully installed dependencies
9:33:42 AM: Starting build script
9:33:43 AM: Detected 1 framework(s)
9:33:43 AM: β€œnext” at version β€œ13.4.7”
9:33:43 AM: Section completed: initializing
9:33:45 AM: ​
9:33:45 AM: Netlify Build
9:33:45 AM: ────────────────────────────────────────────────────────────────
9:33:45 AM: ​
9:33:45 AM: ❯ Version
9:33:45 AM: @netlify/build 29.32.4
9:33:45 AM: ​
9:33:45 AM: ❯ Flags
9:33:45 AM: baseRelDir: true
9:33:45 AM: buildId: 65b28d18774d3303f2371160
9:33:45 AM: deployId: 65b28d18774d3303f2371162
9:33:45 AM: ​
9:33:45 AM: ❯ Current directory
9:33:45 AM: /opt/build/repo
9:33:45 AM: ​
9:33:45 AM: ❯ Config file
9:33:45 AM: /opt/build/repo/netlify.toml
9:33:45 AM: ​
9:33:45 AM: ❯ Context
9:33:45 AM: production
9:33:45 AM: ​
9:33:45 AM: ❯ Installing plugins
9:33:45 AM: - @netlify/plugin-nextjs@4.41.3
9:33:53 AM: ​
9:33:53 AM: ❯ Using Next.js Runtime - v4.41.3
9:33:54 AM: ​
9:33:54 AM: @netlify/plugin-nextjs (onPreBuild event)
9:33:54 AM: ────────────────────────────────────────────────────────────────
9:33:54 AM: ​
9:33:55 AM: No Next.js cache to restore.
9:33:55 AM: Netlify configuration property β€œbuild.environment.NEXT_PRIVATE_TARGET” value changed.
9:33:55 AM: ​
9:33:55 AM: (@netlify/plugin-nextjs onPreBuild completed in 77ms)
9:33:55 AM: ​
9:33:55 AM: Build command from Netlify app
9:33:55 AM: ────────────────────────────────────────────────────────────────
9:33:55 AM: ​
9:33:55 AM: $ yarn build
9:33:55 AM: yarn run v1.22.19
9:33:55 AM: $ export NEXT_PUBLIC_BUILD_ID=$BUILD_ID;export NEXT_PUBLIC_SITE_NAME=$SITE_NAME;export NEXT_PUBLIC_COMMIT_SHA=$COMMIT_REF;export NEXT_PUBLIC_CONTEXT=$CONTEXT; next build
9:33:55 AM: - warn You have enabled experimental feature (scrollRestoration) in next.config.js.
9:33:55 AM: - warn Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.
9:33:55 AM: - warn No build cache found. Please configure build caching for faster rebuilds. Read more: No Cache Detected | Next.js
9:33:55 AM: - info Linting and checking validity of types…
9:34:15 AM: ./pages/_document.js
9:34:15 AM: 13:11 Warning: Synchronous scripts should not be used. See: No Sync Scripts | Next.js @next/next/no-sync-scripts
9:34:15 AM: 14:11 Warning: Synchronous scripts should not be used. See: No Sync Scripts | Next.js @next/next/no-sync-scripts
9:34:15 AM: 54:11 Warning: Prefer next/script component when using the inline script for Google Analytics. See: Using Google Analytics with Next.js (through `next/script`) | Next.js @next/next/next-script-for-ga
9:34:15 AM: 68:11 Warning: Prefer next/script component when using the inline script for Google Analytics. See: Using Google Analytics with Next.js (through `next/script`) | Next.js @next/next/next-script-for-ga
9:34:15 AM: 110:11 Warning: Prefer next/script component when using the inline script for Google Analytics. See: Using Google Analytics with Next.js (through `next/script`) | Next.js @next/next/next-script-for-ga
9:34:15 AM: ./pages/upgrade/step-3.js
9:34:15 AM: 97:13 Warning: Unexpected alert. no-alert
9:34:15 AM: ./pages/wealth/index.js
9:34:15 AM: 101:11 Warning: Do not use an <a> element to navigate to /wealth/blue-number/. Use <Link /> from next/link instead. See: No HTML link for pages | Next.js @next/next/no-html-link-for-pages
9:34:15 AM: 101:11 Warning: Do not use an <a> element to navigate to /wealth/blue-number/. Use <Link /> from next/link instead. See: No HTML link for pages | Next.js @next/next/no-html-link-for-pages
9:34:15 AM: 101:11 Warning: Do not use an <a> element to navigate to /wealth/blue-number/. Use <Link /> from next/link instead. See: No HTML link for pages | Next.js @next/next/no-html-link-for-pages
9:34:15 AM: ./components/account/CancelSubscriptionPopup.js
9:34:15 AM: 46:11 Warning: Unexpected alert. no-alert
9:34:15 AM: ./components/account/ChangeSubscriptionDate.js
9:34:15 AM: 49:9 Warning: Unexpected alert. no-alert
9:34:15 AM: ./components/account/PauseSubscriptionPopup.js
9:34:15 AM: 48:9 Warning: Unexpected alert. no-alert
9:34:15 AM: info - Need to disable some ESLint rules? Learn more here: Configuring: ESLint | Next.js
9:34:15 AM: - info Creating an optimized production build…
9:34:18 AM: Browserslist: caniuse-lite is outdated. Please run:
9:34:18 AM: npx update-browserslist-db@latest
9:34:18 AM: Why you should do it regularly: GitHub - browserslist/update-db: CLI tool to update caniuse-lite to refresh target browsers from Browserslist config
9:34:44 AM: Browserslist: caniuse-lite is outdated. Please run:
9:34:44 AM: npx browserslist@latest --update-db
9:34:44 AM: Why you should do it regularly: GitHub - browserslist/browserslist: πŸ¦” Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-preset-env
9:34:47 AM: - warn Compiled with warnings
9:34:47 AM: ./node_modules/next-i18next/dist/commonjs/serverSideTranslations.js
9:34:47 AM: Critical dependency: the request of a dependency is an expression
9:34:47 AM: Import trace for requested module:
9:34:47 AM: ./node_modules/next-i18next/dist/commonjs/serverSideTranslations.js
9:34:47 AM: ./node_modules/next-i18next/serverSideTranslations.js
9:34:47 AM: ./components/checkout/AddressStep.js
9:34:47 AM: ./components/checkout/StepsHandler.js
9:34:47 AM: - info Collecting page data…
9:35:04 AM: ApolloError: fetch failed
9:35:04 AM: at new ApolloError (/opt/build/repo/node_modules/@apollo/client/errors/errors.cjs:31:28)
9:35:04 AM: at /opt/build/repo/node_modules/@apollo/client/core/core.cjs:1863:19
9:35:04 AM: at both (/opt/build/repo/node_modules/@apollo/client/utilities/utilities.cjs:1085:53)
9:35:04 AM: at /opt/build/repo/node_modules/@apollo/client/utilities/utilities.cjs:1078:72
9:35:04 AM: at new Promise ()
9:35:04 AM: at Object.then (/opt/build/repo/node_modules/@apollo/client/utilities/utilities.cjs:1078:24)
9:35:04 AM: at Object.error (/opt/build/repo/node_modules/@apollo/client/utilities/utilities.cjs:1086:49)
9:35:04 AM: at notifySubscription (/opt/build/repo/node_modules/zen-observable/lib/Observable.js:140:18)
9:35:04 AM: at onNotify (/opt/build/repo/node_modules/zen-observable/lib/Observable.js:179:3)
9:35:04 AM: at SubscriptionObserver.error (/opt/build/repo/node_modules/zen-observable/lib/Observable.js:240:7)
9:35:04 AM: at /opt/build/repo/node_modules/@apollo/client/utilities/utilities.cjs:1068:68
9:35:04 AM: at Array.forEach ()
9:35:04 AM: at iterateObserversSafely (/opt/build/repo/node_modules/@apollo/client/utilities/utilities.cjs:1068:25)
9:35:04 AM: at Object.error (/opt/build/repo/node_modules/@apollo/client/utilities/utilities.cjs:1172:21)
9:35:04 AM: at notifySubscription (/opt/build/repo/node_modules/zen-observable/lib/Observable.js:140:18)
9:35:04 AM: at onNotify (/opt/build/repo/node_modules/zen-observable/lib/Observable.js:179:3)
9:35:04 AM: at SubscriptionObserver.error (/opt/build/repo/node_modules/zen-observable/lib/Observable.js:240:7)
9:35:04 AM: at Object.error (/opt/build/repo/node_modules/@apollo/client/link/error/error.cjs:53:34)
9:35:04 AM: at notifySubscription (/opt/build/repo/node_modules/zen-observable/lib/Observable.js:140:18)
9:35:04 AM: at onNotify (/opt/build/repo/node_modules/zen-observable/lib/Observable.js:179:3)
9:35:04 AM: at SubscriptionObserver.error (/opt/build/repo/node_modules/zen-observable/lib/Observable.js:240:7)
9:35:04 AM: at notifySubscription (/opt/build/repo/node_modules/zen-observable/lib/Observable.js:140:18)
9:35:04 AM: at onNotify (/opt/build/repo/node_modules/zen-observable/lib/Observable.js:179:3)
9:35:04 AM: at SubscriptionObserver.error (/opt/build/repo/node_modules/zen-observable/lib/Observable.js:240:7)
9:35:04 AM: at handleError (/opt/build/repo/node_modules/@apollo/client/link/http/http.cjs:324:67)
9:35:04 AM: at /opt/build/repo/node_modules/@apollo/client/link/http/http.cjs:625:48
9:35:04 AM: at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
9:35:04 AM: graphQLErrors: ,
9:35:04 AM: protocolErrors: ,
9:35:04 AM: clientErrors: ,
9:35:04 AM: networkError: TypeError: fetch failed
9:35:04 AM: at Object.fetch (node:internal/deps/undici/undici:11457:11)
9:35:04 AM: at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
9:35:04 AM: cause: Error: getaddrinfo ENOTFOUND strapi-dev.tranont.com
9:35:04 AM: at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
9:35:04 AM: errno: -3008,
9:35:04 AM: code: β€œENOTFOUND”,
9:35:04 AM: syscall: β€œgetaddrinfo”,
9:35:04 AM: hostname: β€œstrapi-dev.tranont.com”
9:35:04 AM: }
9:35:04 AM: },
9:35:04 AM: extraInfo: undefined
9:35:04 AM: }
9:35:04 AM: > Build error occurred
9:35:04 AM: Error: Failed to collect page data for /wealth/[slug]
9:35:04 AM: at /opt/build/repo/node_modules/next/dist/build/utils.js:1161:15
9:35:04 AM: at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
9:35:04 AM: type: β€œError”
9:35:04 AM: }
9:35:04 AM: error Command failed with exit code 1. (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
9:35:04 AM: info Visit yarn run | Yarn for documentation about this command.
9:35:04 AM: ​
9:35:04 AM: β€œbuild.command” failed
9:35:04 AM: ────────────────────────────────────────────────────────────────
9:35:04 AM: ​
9:35:04 AM: Error message
9:35:04 AM: Command failed with exit code 1: yarn build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
9:35:04 AM: ​
9:35:04 AM: Error location
9:35:04 AM: In Build command from Netlify app:
9:35:04 AM: yarn build
9:35:04 AM: ​
9:35:04 AM: Resolved config
9:35:04 AM: build:
9:35:04 AM: command: yarn build
9:35:04 AM: commandOrigin: ui
9:35:04 AM: environment:
9:35:04 AM: - CCAVENUE_API_BASE_URL
9:35:04 AM: - CCAVENUE_API_WORKING_KEY
9:35:04 AM: - ENVIRONMENT
9:35:04 AM: - GQL_SHOW_DRAFTS
9:35:04 AM: - I18NEXUS_API_KEY
9:35:04 AM: - NEXT_PUBLIC_API_URL
9:35:04 AM: - NEXT_PUBLIC_CCAVENUE_API_ACCESS_CODE
9:35:04 AM: - NEXT_PUBLIC_CCAVENUE_MERCHANT_ID
9:35:04 AM: - NEXT_PUBLIC_CCAVENUE_WEB_BASE_URL
9:35:04 AM: - NEXT_PUBLIC_GTM_DEBUG
9:35:04 AM: - NEXT_PUBLIC_ROOT
9:35:04 AM: - NEXT_PUBLIC_SENTRY_DNS
9:35:04 AM: - NEXT_PUBLIC_SMARTY_API_KEY
9:35:04 AM: - NEXT_PUBLIC_STRAPI_API_TOKEN
9:35:04 AM: - REVALIDATE_TIME_SECONDS
9:35:04 AM: - V2_ENABLED
9:35:04 AM: - V2_FLAG_KEY
9:35:04 AM: - NEXT_PRIVATE_TARGET
9:35:04 AM: publish: /opt/build/repo/.next
9:35:04 AM: publishOrigin: ui
9:35:04 AM: plugins:
9:35:04 AM: - inputs: {}
9:35:04 AM: origin: ui
9:35:04 AM: package: β€œ@netlify/plugin-nextjs”
9:35:04 AM: redirects:
9:35:04 AM: - force: true
9:35:04 AM: from: https://member.tranont.com
9:35:04 AM: status: 301
9:35:04 AM: to: https://www.tranont.com
9:35:04 AM: - force: true
9:35:04 AM: from: https://sso.tranont.com
9:35:04 AM: status: 301
9:35:04 AM: to: https://www.tranont.com
9:35:04 AM: redirectsOrigin: config
9:35:05 AM: Failed during stage β€œbuilding site”: Build script returned non-zero exit code: 2
9:35:05 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
9:35:05 AM: Failing build: Failed to build site
9:35:05 AM: Finished processing build request in 2m39.824s

DNS issues seem to be resolved but these builds keep randomly failing. We got one to pass, and then subsequent builds with no changes fail.

1 Like

can you share the site id to the site that keeps failing?