Error: connect ETIMEDOUT at TCPConnectWrap.afterConnect [as oncomplete]

site: goofy-visvesvaraya-147dde.netlify.app

I’m getting the error seen in the subject when I try to build my site. Can’t find any info on the cause.
Here’s the relevant logs:

11:10:22 PM: error  gatsby-source-wordpress  Error: connect ETIMEDOUT 162.241.217.90:443
11:10:22 PM:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
11:10:22 PM: GraphQL request to https://admin.cartel.tv/graphql/ failed.
11:10:22 PM: Please ensure the following statements are true
11:10:22 PM:   - your WordPress URL is correct in gatsby-config.js
11:10:22 PM:   - your server is responding to requests
11:10:22 PM:   - WPGraphQL and WPGatsby are installed and active in your WordPress backend
11:10:22 PM:   - Your WordPress debug.log does not contain critical errors
11:10:22 PM: not finished createSchemaCustomization - 132.474s
11:10:22 PM: not finished  gatsby-source-wordpress  ingest WPGraphQL schema - 129.446s
11:10:22 PM: error Command failed with exit code 1. (https://ntl.fyi/exit-code-1)

I have verified that the WordPress URL is correct (hasn’t changed since successful builds), that the server is responding to requests, and that WPGraphQL and WPGatsby are installed and active.

The only other similar support post said that it eventually just started working for them, but that hasn’t happened for me yet and I’m hoping for a bit more insight into the error.

Full build logs here:

11:06:46 PM: Build ready to start
11:06:48 PM: build-image version: d2c6dbeac570350a387d832f64bc980dc964ad65 (focal)
11:06:48 PM: build-image tag: v4.8.0
11:06:48 PM: buildbot version: 29e546ddee264a16af472b38ccba15b350150213
11:06:48 PM: Building without cache
11:06:48 PM: Starting to prepare the repo for build
11:06:48 PM: No cached dependencies found. Cloning fresh repo
11:06:48 PM: git clone https://github.com/CartelTV/cartel
11:06:49 PM: Preparing Git Reference refs/heads/main
11:06:50 PM: Parsing package.json dependencies
11:06:51 PM: Starting build script
11:06:51 PM: Installing dependencies
11:06:51 PM: Python version set to 2.7
11:06:51 PM: Attempting node version 'v14.17.0' from .nvmrc
11:06:51 PM: Downloading and installing node v14.17.0...
11:06:52 PM: Downloading https://nodejs.org/dist/v14.17.0/node-v14.17.0-linux-x64.tar.xz...
11:06:52 PM: Computing checksum with sha256sum
11:06:52 PM: Checksums matched!
11:06:54 PM: Now using node v14.17.0 (npm v6.14.13)
11:06:54 PM: Started restoring cached build plugins
11:06:54 PM: Finished restoring cached build plugins
11:06:55 PM: Attempting ruby version 2.7.2, read from environment
11:06:56 PM: Using ruby version 2.7.2
11:06:56 PM: Using PHP version 8.0
11:06:56 PM: Started restoring cached yarn cache
11:06:56 PM: Finished restoring cached yarn cache
11:06:56 PM: No yarn workspaces detected
11:06:56 PM: Started restoring cached node modules
11:06:56 PM: Finished restoring cached node modules
11:06:56 PM: Installing NPM modules using Yarn version 1.22.10
11:06:57 PM: yarn install v1.22.10
11:06:57 PM: [1/4] Resolving packages...
11:06:57 PM: [2/4] Fetching packages...
11:07:33 PM: info fsevents@2.3.2: The platform "linux" is incompatible with this module.
11:07:33 PM: info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
11:07:33 PM: [3/4] Linking dependencies...
11:07:33 PM: warning "gatsby > @typescript-eslint/eslint-plugin > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
11:07:33 PM: warning "gatsby-source-graphql > @graphql-tools/utils@7.10.0" has unmet peer dependency "graphql@^14.0.0 || ^15.0.0".
11:07:33 PM: warning "gatsby > eslint-plugin-graphql > graphql-config > @endemolshinegroup/cosmiconfig-typescript-loader > ts-node@9.1.1" has unmet peer dependency "typescript@>=2.7".
11:07:33 PM: warning "gatsby-source-graphql > @graphql-tools/links > @graphql-tools/delegate@7.1.5" has unmet peer dependency "graphql@^14.0.0 || ^15.0.0".
11:07:33 PM: warning "gatsby-source-graphql > @graphql-tools/wrap@7.0.8" has unmet peer dependency "graphql@^14.0.0 || ^15.0.0".
11:07:33 PM: warning " > gatsby-plugin-image@2.10.1" has unmet peer dependency "@babel/core@^7.12.3".
11:07:33 PM: warning "gatsby-plugin-sass > sass-loader@10.2.1" has unmet peer dependency "webpack@^4.36.0 || ^5.0.0".
11:07:33 PM: warning "gatsby-source-graphql > @graphql-tools/links@7.1.0" has unmet peer dependency "@apollo/client@~3.2.5 || ~3.3.0".
11:07:33 PM: warning "gatsby-source-graphql > @graphql-tools/links@7.1.0" has unmet peer dependency "graphql@^14.0.0 || ^15.0.0".
11:07:33 PM: warning "gatsby-source-graphql > apollo-link@1.2.14" has unmet peer dependency "graphql@^0.11.3 || ^0.12.3 || ^0.13.0 || ^14.0.0 || ^15.0.0".
11:07:33 PM: warning "gatsby-source-graphql > apollo-link-http@1.5.17" has unmet peer dependency "graphql@^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0".
11:07:33 PM: warning "gatsby-source-graphql > @graphql-tools/links > apollo-upload-client@14.1.3" has unmet peer dependency "graphql@14 - 15".
11:07:33 PM: warning "gatsby-source-graphql > apollo-link > apollo-utilities@1.3.4" has unmet peer dependency "graphql@^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0".
11:07:33 PM: warning "gatsby-source-graphql > apollo-link-http > apollo-link-http-common@0.2.16" has unmet peer dependency "graphql@^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0".
11:07:33 PM: warning "gatsby-source-graphql > @graphql-tools/links > apollo-upload-client > @apollo/client@3.5.10" has unmet peer dependency "graphql@^14.0.0 || ^15.0.0 || ^16.0.0".
11:07:33 PM: warning "gatsby-source-graphql > @graphql-tools/links > apollo-upload-client > @apollo/client > @graphql-typed-document-node/core@3.1.1" has unmet peer dependency "graphql@^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0".
11:07:33 PM: warning "gatsby-source-graphql > @graphql-tools/links > apollo-upload-client > @apollo/client > graphql-tag@2.12.6" has unmet peer dependency "graphql@^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0".
11:07:46 PM: [4/4] Building fresh packages...
11:07:50 PM: Done in 53.10s.
11:07:50 PM: NPM modules installed using Yarn
11:07:50 PM: Started restoring cached go cache
11:07:50 PM: Finished restoring cached go cache
11:07:50 PM: go version go1.16.5 linux/amd64
11:07:50 PM: go version go1.16.5 linux/amd64
11:07:50 PM: Installing missing commands
11:07:50 PM: Verify run directory
11:07:52 PM: ​
11:07:52 PM: ────────────────────────────────────────────────────────────────
11:07:52 PM:   Netlify Build                                                 
11:07:52 PM: ────────────────────────────────────────────────────────────────
11:07:52 PM: ​
11:07:52 PM: ❯ Version
11:07:52 PM:   @netlify/build 27.1.1
11:07:52 PM: ​
11:07:52 PM: ❯ Flags
11:07:52 PM:   baseRelDir: true
11:07:52 PM:   buildId: 62832d66f5c0ca262cba5ffa
11:07:52 PM:   deployId: 62832d66f5c0ca262cba5ffc
11:07:52 PM: ​
11:07:52 PM: ❯ Current directory
11:07:52 PM:   /opt/build/repo
11:07:52 PM: ​
11:07:52 PM: ❯ Config file
11:07:52 PM:   No config file was defined: using default values.
11:07:52 PM: ​
11:07:52 PM: ❯ Context
11:07:52 PM:   production
11:07:52 PM: ​
11:07:52 PM: ❯ Installing plugins
11:07:52 PM:    - @netlify/plugin-gatsby@1.0.3
11:08:03 PM: ​
11:08:03 PM: ❯ Loading plugins
11:08:03 PM:    - @netlify/plugin-gatsby@1.0.3 from Netlify app
11:08:03 PM: ​
11:08:03 PM: ❯ Outdated plugins
11:08:03 PM:    - @netlify/plugin-gatsby@1.0.3: latest version is 3.0.0
11:08:03 PM:      Migration guide: https://ntl.fyi/gatsby-plugin-migration
11:08:03 PM:      To upgrade this plugin, please uninstall and re-install it from the Netlify plugins directory (https://app.netlify.com/plugins)
11:08:04 PM: ​
11:08:04 PM: ────────────────────────────────────────────────────────────────
11:08:04 PM:   1. @netlify/plugin-gatsby (onPreBuild event)                  
11:08:04 PM: ────────────────────────────────────────────────────────────────
11:08:04 PM: ​
11:08:04 PM: No Gatsby cache found. Building fresh.
11:08:04 PM: Add `gatsby-plugin-netlify` to `gatsby-config.js` if you would like to support Gatsby redirects. 🎉
11:08:04 PM: ​
11:08:04 PM: (@netlify/plugin-gatsby onPreBuild completed in 10ms)
11:08:04 PM: ​
11:08:04 PM: ────────────────────────────────────────────────────────────────
11:08:04 PM:   2. Build command from Netlify app                             
11:08:04 PM: ────────────────────────────────────────────────────────────────
11:08:04 PM: ​
11:08:04 PM: $ yarn build
11:08:04 PM: yarn run v1.22.10
11:08:05 PM: $ gatsby build
11:08:08 PM: success compile gatsby files - 0.836s
11:08:08 PM: success load gatsby config - 0.064s
11:08:09 PM: warning Warning: there are unknown plugin options for "gatsby-source-wordpress": includedRoutes
11:08:09 PM: Please open an issue at https://ghub.io/gatsby-source-wordpress if you believe this option is valid.
11:08:09 PM: success load plugins - 1.114s
11:08:09 PM: success onPreInit - 0.010s
11:08:09 PM: success initialize cache - 0.073s
11:08:09 PM: success copy gatsby files - 0.114s
11:08:09 PM: success Compiling Gatsby Functions - 0.190s
11:08:09 PM: success onPreBootstrap - 0.199s
11:08:12 PM: success  gatsby-source-wordpress  ensuring plugin requirements are met - 3.021s
11:08:13 PM: ⠀
11:08:13 PM: info  gatsby-source-wordpress 
11:08:13 PM: 	This is either your first build or the cache was cleared.
11:08:13 PM: 	Please wait while your WordPress data is synced to your Gatsby cache.
11:08:13 PM: 	Maybe now's a good time to get up and stretch? :D
11:08:15 PM: warning Warning: there are unknown plugin options for "gatsby-source-wordpress": includedRoutes
11:08:15 PM: Please open an issue at https://ghub.io/gatsby-source-wordpress if you believe this option is valid.
11:08:15 PM: warning Warning: there are unknown plugin options for "gatsby-source-wordpress": includedRoutes
11:08:15 PM: Please open an issue at https://ghub.io/gatsby-source-wordpress if you believe this option is valid.
11:08:16 PM: warning Warning: there are unknown plugin options for "gatsby-source-wordpress": includedRoutes
11:08:16 PM: Please open an issue at https://ghub.io/gatsby-source-wordpress if you believe this option is valid.
11:10:22 PM: error  gatsby-source-wordpress  Error: connect ETIMEDOUT 162.241.217.90:443
11:10:22 PM:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
11:10:22 PM: GraphQL request to https://admin.cartel.tv/graphql/ failed.
11:10:22 PM: Please ensure the following statements are true
11:10:22 PM:   - your WordPress URL is correct in gatsby-config.js
11:10:22 PM:   - your server is responding to requests
11:10:22 PM:   - WPGraphQL and WPGatsby are installed and active in your WordPress backend
11:10:22 PM:   - Your WordPress debug.log does not contain critical errors
11:10:22 PM: not finished createSchemaCustomization - 132.474s
11:10:22 PM: not finished  gatsby-source-wordpress  ingest WPGraphQL schema - 129.446s
11:10:22 PM: error Command failed with exit code 1. (https://ntl.fyi/exit-code-1)
11:10:22 PM: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
11:10:22 PM: ​
11:10:22 PM: ────────────────────────────────────────────────────────────────
11:10:22 PM:   "build.command" failed                                        
11:10:22 PM: ────────────────────────────────────────────────────────────────
11:10:22 PM: ​
11:10:22 PM:   Error message
11:10:22 PM:   Command failed with exit code 1: yarn build (https://ntl.fyi/exit-code-1)
11:10:22 PM: ​
11:10:22 PM:   Error location
11:10:22 PM:   In Build command from Netlify app:
11:10:22 PM:   yarn build
11:10:22 PM: ​
11:10:22 PM:   Resolved config
11:10:22 PM:   build:
11:10:22 PM:     command: yarn build
11:10:22 PM:     commandOrigin: ui
11:10:22 PM:     publish: /opt/build/repo/public
11:10:22 PM:     publishOrigin: ui
11:10:22 PM:   plugins:
11:10:22 PM:     - inputs: {}
11:10:22 PM:       origin: ui
11:10:22 PM:       package: '@netlify/plugin-gatsby'
11:10:22 PM: Caching artifacts
11:10:22 PM: Started saving node modules
11:10:22 PM: Finished saving node modules
11:10:22 PM: Started saving build plugins
11:10:22 PM: Finished saving build plugins
11:10:22 PM: Started saving yarn cache
11:10:28 PM: Finished saving yarn cache
11:10:28 PM: Started saving pip cache
11:10:28 PM: Finished saving pip cache
11:10:28 PM: Started saving emacs cask dependencies
11:10:28 PM: Finished saving emacs cask dependencies
11:10:28 PM: Started saving maven dependencies
11:10:28 PM: Finished saving maven dependencies
11:10:28 PM: Started saving boot dependencies
11:10:28 PM: Finished saving boot dependencies
11:10:28 PM: Started saving rust rustup cache
11:10:28 PM: Finished saving rust rustup cache
11:10:28 PM: Started saving go dependencies
11:10:28 PM: Finished saving go dependencies
11:10:29 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:10:29 PM: Creating deploy upload records
11:10:30 PM: Failing build: Failed to build site
11:10:30 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
11:10:30 PM: Finished processing build request in 3m42.122036606s

Any help would be greatly appreciated.

Thanks.

Hi, @mikeriley131. It is important to note that Netlify doesn’t write the plugin you are using:

This means that we don’t have any more insight into what that plugin is doing than you do. The only details we have about the error are the same log lines you have shared with us. We don’t have additional information about the failed connection.

For build commands and plugins, the logging of any errors in that code must be logged by that code. Netlify does not have invisible monitoring of third-party code that only we can see. In other words, if the plugin doesn’t log it, we don’t have any other way to get the data.

It does look like you were able to resolve this on your own in the meantime, though. I’m sure the next person searching here would love to know how you fixed it. If you have the bandwidth to share the solution here, please feel free to do so and I’m sure the next person that comes across this with thank you.

No one enjoys the “denvercoder9” experience (but no pressure as I’m sure you’re a busy person):

Thanks for the detail, Luke.

I wish I had more info, but it just started working again.
Must have been some issue with the WordPress host that is not covered in the suggestions in the logs.

For future reader of this thread, give it a full 24 hours and then try again.