Builds suddenly stopped working

My Netlify subdomain is helix-int.netlify.app and actual domain ishelix-int.com

I have been deploying my Jamstack website (built on Webflow and then converted to Jamstack using https://udesly.app) using the same Netlify.toml file for over a year, about 150 deploys in total, and have never had a failed built up until August 13th. Since then, every build has failed. I have made no changes to the Netlify.toml file or any of the build settings. Here is my Netlify.toml file:

[build]
publish = “public”
command = “CI= npm run build”
functions = “functions”

[[redirects]]
from = “/api/*”
to = “/.netlify/functions/:splat”
status = 200
force = true

And here’s the text I’m getting at build:

7:45:39 PM: Netlify Build

7:45:39 PM: ────────────────────────────────────────────────────────────────

7:45:39 PM: ​

7:45:39 PM: ❯ Version

7:45:39 PM: @netlify/build 29.22.5

7:45:39 PM: ​

7:45:39 PM: ❯ Flags

7:45:39 PM: baseRelDir: true

7:45:39 PM: buildId: 652d3050f8b1b5000817873d

7:45:39 PM: deployId: 652d3050f8b1b5000817873f

7:45:39 PM: ​

7:45:39 PM: ❯ Current directory

7:45:39 PM: /opt/build/repo

7:45:39 PM: ​

7:45:39 PM: ❯ Config file

7:45:39 PM: /opt/build/repo/netlify.toml

7:45:39 PM: ​

7:45:39 PM: ❯ Context

7:45:39 PM: production

7:45:39 PM: ​

7:45:39 PM: build.command from netlify.toml

7:45:39 PM: ────────────────────────────────────────────────────────────────

7:45:39 PM: ​

7:45:39 PM: $ CI= npm run build

7:45:40 PM: > prebuild

7:45:40 PM: > npm run optimize

7:45:40 PM: > optimize

7:45:40 PM: > node ./_utils/scripts/optimize-assets.js

[Lots of media links, had to take these out in order to post because Netlify support forums won’t let me publish a post with more than 6 URLs in it…bit weird for an IT support forum but OK…

7:45:42 PM: https://d3e54v103j8qbb.cloudfront.net/js/jquery-3.5.1.min.dc5e7f18c8.js downloaded

7:45:42 PM: node:events:491

7:45:42 PM: throw er; // Unhandled “error” event

7:45:42 PM: ^

7:45:42 PM: Error: connect ECONNREFUSED 50.253.244.138:443

7:45:42 PM: at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)

7:45:42 PM: Emitted “error” event on ClientRequest instance at:

7:45:42 PM: at TLSSocket.socketErrorListener (node:_http_client:494:9)

7:45:42 PM: at TLSSocket.emit (node:events:513:28)

7:45:42 PM: at emitErrorNT (node:internal/streams/destroy:157:8)

7:45:42 PM: at emitErrorCloseNT (node:internal/streams/destroy:122:3)

7:45:42 PM: at processTicksAndRejections (node:internal/process/task_queues:83:21) {

7:45:42 PM: errno: -111,

7:45:42 PM: code: “ECONNREFUSED”,

7:45:42 PM: syscall: “connect”,

7:45:42 PM: address: “50.253.244.138”,

7:45:42 PM: port: 443

7:45:42 PM: }

7:45:42 PM: ​

7:45:42 PM: “build.command” failed

7:45:42 PM: ────────────────────────────────────────────────────────────────

7:45:42 PM: ​

7:45:42 PM: Error message

7:45:42 PM: Command failed with exit code 1: CI= npm run build (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)

7:45:42 PM: ​

7:45:42 PM: Error location

7:45:42 PM: In build.command from netlify.toml:

7:45:42 PM: CI= npm run build

7:45:42 PM: ​

7:45:42 PM: Resolved config

7:45:42 PM: build:

7:45:42 PM: command: CI= npm run build

7:45:42 PM: commandOrigin: config

7:45:42 PM: environment:

7:45:42 PM: - CI

7:45:42 PM: publish: /opt/build/repo/public

7:45:42 PM: publishOrigin: config

7:45:42 PM: functionsDirectory: /opt/build/repo/functions

7:45:42 PM: redirects:

7:45:42 PM: - force: true

7:45:44 PM: Build failed due to a user error: Build script returned non-zero exit code: 2

7:45:44 PM: Failing build: Failed to build site

7:45:44 PM: Finished processing build request in 38.277s

7:45:44 PM: Failed during stage “building site”: Build script returned non-zero exit code: 2

Again, I have made zero changes to the Netlify.toml and build config. I even went back and restored an old version of Netlify.toml just to make triple sure that nothing had changed. All builds of this site have been working perfectly with this same Netlify.toml file for over a year.

I’ve tried various solutions I’ve found via searches, such as changing the build command to CI= npm run build and CI=‘’ npm run build, as well as making these changes in the Netlify build settings, and nothing has worked.

Much obliged for any help on this matter as it’s driving me crazy.

Hi @cbentley,

Thanks for reaching out!

I’m unable to find that deploy within your deploy log. Looking at the latest deploy:

I see this issue:

7:55:06 AM: node:events:491
7:55:06 AM:       throw er; // Unhandled "error" event
7:55:06 AM:       ^
7:55:06 AM: Error: connect ECONNREFUSED 50.253.244.138:443
7:55:06 AM:     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)
7:55:06 AM: Emitted "error" event on ClientRequest instance at:
7:55:06 AM:     at TLSSocket.socketErrorListener (node:_http_client:494:9)
7:55:06 AM:     at TLSSocket.emit (node:events:513:28)
7:55:06 AM:     at emitErrorNT (node:internal/streams/destroy:157:8)
7:55:06 AM:     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
7:55:06 AM:     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
7:55:06 AM:   errno: -111,
7:55:06 AM:   code: "ECONNREFUSED",
7:55:06 AM:   syscall: "connect",
7:55:06 AM:   address: "50.253.244.138",
7:55:06 AM:   port: 443
7:55:06 AM: }

The error indicates an issue with connecting to the IP address “50.253.244.138” on port 443 and that the connection was refused. If you try the build again do you continue to have issues?

Hi Melvin,

Thanks kindly for your response! I looked again through my site files and can’t find this IP address anywhere. It’s definitely not in Netlify.toml, .eleventy.js, or package.json. I don’t know where it’s coming from or why it’s suddenly a problem. Builds are still failing as of now.

Does the error code give you any clues as to where this issue might be located? When I visit without the port specified I get a default Apache2 installation page.

Hi @cbentley,

The IP address 50.253.244.138 seems to come from here:

analytics.helix-int.com has the IP address: 50.253.244.138

Melvin, you’re a godsend!

Builds were failing because of a backup noscript tracking pixel for our custom analytics, taking that out resolved the issue.

Thanks kindly for the support!

thanks so much for sharing that with the community.