Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 response for various Node.js downloads and pages #5149

Closed
twyatt opened this issue Mar 15, 2023 · 60 comments
Closed

404 response for various Node.js downloads and pages #5149

twyatt opened this issue Mar 15, 2023 · 60 comments
Labels

Comments

@twyatt
Copy link

twyatt commented Mar 15, 2023

URL:

https://nodejs.org/dist/v16.13.0/

Browser Name:

Chrome

Browser Version:

110.0.5481.177

Operating System:

MacOS 12.5.1

How to reproduce the issue:

  1. Attempt to click link to download node-v16.13.0-darwin-x64.tar.gz from https://nodejs.org/dist/v16.13.0/
  2. Expected to download file
  3. Instead, get a 404 page

Using Chome

node-16.13.0-darwin-x64.mov

Using command line

$ wget https://nodejs.org/dist/v16.13.0/node-v16.13.0-darwin-x64.tar.gz

--2023-03-15 14:19:10--  https://nodejs.org/dist/v16.13.0/node-v16.13.0-darwin-x64.tar.gz
Resolving nodejs.org (nodejs.org)... 104.20.23.46, 104.20.22.46
Connecting to nodejs.org (nodejs.org)|104.20.23.46|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2023-03-15 14:19:10 ERROR 404: Not Found.
@twyatt twyatt added the bug label Mar 15, 2023
@keithlayne
Copy link

I only tried one download, but it was a 404 as well. But https://status.nodejs.org/ is all green so I must be HTTPing wrong. 😛

@keithlayne
Copy link

More seriously, it's the gzip files that seem broken so far. The "download now" link for me (linux x64) uses the xz file...and that link works. Too bad the asdf plugin for node wants the gz version. (Probably should be using xz anyway)

@nschonni
Copy link
Member

@ovflowd The 404 is returning the new 404 page rather than the old nginx one, so I'm not sure if the new build isn't passing through a request correctly

/cc @nodejs/build

@ovflowd
Copy link
Member

ovflowd commented Mar 15, 2023

The only file that is giving 404 is https://nodejs.org/dist/v16.13.0/node-v16.13.0-darwin-x64.tar.gz so far. I've tried all other files of that directory and they're working.

The 404 is returning the new 404 page rather than the old nginx one, so I'm not sure if the new build isn't passing through a request correctly

Afaik we were always for every 404 within the server returning the Website 404. The only change we made was to also add the 404 to non-https requests.

@ovflowd
Copy link
Member

ovflowd commented Mar 15, 2023

More seriously, it's the gzip files that seem broken so far. The "download now" link for me (linux x64) uses the xz file...and that link works. Too bad the asdf plugin for node wants the gz version. (Probably should be using xz anyway)

@keithlayne actually no, only one file is 404'ing. All other gz files are working.

@ovflowd
Copy link
Member

ovflowd commented Mar 15, 2023

@nodejs/build can we check why only https://nodejs.org/dist/v16.13.0/node-v16.13.0-darwin-x64.tar.gz this file is somehow 404'ing?

@blimmer
Copy link

blimmer commented Mar 15, 2023

@keithlayne
Copy link

@ovflowd I was here becasue of this:

 ❯❯❯ asdf install nodejs 18.15.0
Trying to update node-build... ok
Downloading node-v18.15.0-linux-x64.tar.gz...
-> https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-x64.tar.gz
error: failed to download node-v18.15.0-linux-x64.tar.gz
-> https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-x64.tar.gz
error: failed to download node-v18.15.0-linux-x64.tar.gz

BUILD FAILED (Pop 22.04 using node-build 4.9.83-92-g23a7606c)

Binary installation failed; try compiling from source with `--compile` flag

So there are more problems than that one file.

@ovflowd
Copy link
Member

ovflowd commented Mar 15, 2023

@keithlayne this seems to be a CloudFlare cache issue. You can check by accessing https://direct.nodejs.org/dist/v16.13.0/ which is the direct connection to our server, and all the links there work normally.

I know this doesn't solve your issue, but I'm checking with the team what are our options.

@keithlayne
Copy link

keithlayne commented Mar 15, 2023

...and that file just started serving, in the last 15 seconds.

@ovflowd
Copy link
Member

ovflowd commented Mar 15, 2023

I can also check that this is being served directly within CloudFlare with curl -v

❯ curl -v https://nodejs.org/dist/v16.13.0/node-v16.13.0-darwin-x64.tar.gz
*   Trying 104.20.22.46:443...
* Connected to nodejs.org (104.20.22.46) port 443 (#0)
* ALPN: offers h2
* ALPN: offers http/1.1
*  CAfile: /etc/ssl/cert.pem
*  CApath: none

As 104.20.22.46 is a CloudFlare IP Address.

@ovflowd
Copy link
Member

ovflowd commented Mar 15, 2023

https://nodejs.org/dist/v18.13.0/node-v18.13.0-linux-arm64.tar.xz

https://direct.nodejs.org/dist/v18.13.0/node-v18.13.0-linux-arm64.tar.xz seems to be working fine. So double-down a CloudFlare cache issue.

@keithlayne
Copy link

@ovflowd That is really good info, thank you! Looks like I can use that url to solve my current pain. Once I started poking around I was starting to see some CF cache headers.

For anyone else who may run into this:

NODEJS_ORG_MIRROR=https://direct.nodejs.org/dist/ asdf install nodejs x.y.z

seems to work - but let's be responsible, node uses a CDN for a reason.

@ovflowd
Copy link
Member

ovflowd commented Mar 15, 2023

Please just a friendly reminder, avoid using direct.nodejs.org when possible. Our server sadly was not designed to handle the load that the web usually does to download Node.js 😅

seems to work - but let's be responsible, node uses a CDN for a reason.

Exactly! Thank you for your understanding 🙇

@twyatt
Copy link
Author

twyatt commented Mar 15, 2023

Thank you for the quick response!
At least for me, the Issue appears to have been resolved (I'm now able to download the file I originally reported an issue with).

@flash1293
Copy link

Seeing similar errors:

Could not find org.nodejs:node:18.14.2.
Searched in the following locations:
- https://nodejs.org/dist/v18.14.2/node-v18.14.2-linux-x64.tar.gz

@rwaite-addland
Copy link

This also seems to be affecting the azure devops NodeTool task:

image

@ovflowd
Copy link
Member

ovflowd commented Mar 16, 2023

FYI, we're still monitoring and working on solutions here.

@cduboc91

This comment was marked as resolved.

@SiWhite

This comment was marked as resolved.

@tniessen
Copy link
Member

tniessen commented Mar 16, 2023

@walec51 @SiWhite I have purged the cache for those files in all physical locations. (But don't actually use those versions, they have long reached end-of-life status and are unsupported. Even 14.x reaches end-of-life next month.)

As I said in my previous comment, some rarely used files, especially those belonging to outdated and unsupported Node.js versions, may be unavailable in some physical locations for a few hours.

@ovflowd
Copy link
Member

ovflowd commented Mar 17, 2023

Hey, y'all, as of now, we've done the last fixes that should have handled this incident. We're posting updates on our Status page, and we're going to follow up with a post-mortem afterwards. Thank you!

@ovflowd ovflowd closed this as completed Mar 17, 2023
@ashsearle
Copy link

ashsearle commented Mar 17, 2023

Have you changed behaviour of nodejs.org/dist to rate limit and return 403 response code off the back of this incident? (Asking as our CI system is failing due to 403s, not 404s).

Note: 403 response code received for HEAD request.

@ovflowd
Copy link
Member

ovflowd commented Mar 17, 2023

I don't think we support HEAD requests for nodejs.org/dist. (Correct me if I'm wrong, @nodejs/build)

@ashsearle
Copy link

In case of confusion: I meant a HEAD request for a full URL to a specific .tar.gz. AFAIK nothing in our CI system has changed (across multiple different projects)

@nschonni
Copy link
Member

Is this from Artifactory? There is some filtering being put int place because of problems from a lot of misconfigured instances nodejs/build#3223

@ghost
Copy link

ghost commented Mar 17, 2023

I'm seeing 403s using Gradle (via faking an Ivy repo) both on CI and on my local development machine trying to hit nodejs.org/dist, and 404s from our Artifactory proxy.

@marclefrancois
Copy link

+1 for the gradle problem reported by @tridium-gward

@ashsearle
Copy link

Is this from Artifactory? There is some filtering being put int place because of problems from a lot of misconfigured instances nodejs/build#3223

Our case was from Gradle too (specifically gradle-node-plugin, but I'm guessing the only significance is the plugin leads to a HEAD request, not just a GET.)

@ovflowd
Copy link
Member

ovflowd commented Mar 17, 2023

We've just fixed the issue by deploying a new CF Firewall rule.

@petty
Copy link

petty commented Mar 20, 2023

I'm still seeing failed builds with respect to Ivy:


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':project-theme-default:nodeSetup'.
> Could not resolve all files for configuration ':project-theme-default:detachedConfiguration1'.
   > Could not resolve org.nodejs:node:16.19.1.
     Required by:
         project :project-theme-default
      > Could not resolve org.nodejs:node:16.19.1.
         > Could not get resource 'https://nodejs.org/dist/v16.19.1/ivy.xml'.
            > Could not GET 'https://nodejs.org/dist/v16.19.1/ivy.xml'. Received status code 403 from server: Forbidden


@nschonni
Copy link
Member

https://nodejs.org/dist/v16.19.1/ivy.xml

That's a file that has never existed on the Node.js servers. Suggest you open up an issue on the Ivy plugin, as that would be an issue for their plugin

@ghost
Copy link

ghost commented Mar 20, 2023

@petty Are you creating your own Ivy repo? If so you need to ensure it's configured to only look for artifacts and not metadata (see metadataSources below):

    repositories {
      val nodeRemote = ivy {
        name = "NodeRemote"
        setUrl("https://nodejs.org/dist")
        patternLayout {
          artifact("/[revision]/[module]-[revision](-[classifier])(.[ext])")
        }
        metadataSources {
          // This isn't _actually_ an Ivy repo, so it has no metadata
          artifact()
        }
      }
      // Ensure the repo is a) only used to resolve org.nodejs and b) no other repos can provide
      // any org.nodejs artifacts
      exclusiveContent {
        forRepositories(nodeRemote)
        filter {
          includeGroup("org.nodejs")
        }
      }
    }

@tomzi8571
Copy link

tomzi8571 commented Mar 20, 2023

Also got the same problem since 17.3.2023:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':nodeSetup'.
> Could not resolve all files for configuration ':detachedConfiguration1'.
   > Could not resolve org.nodejs:node:12.22.6.
     Required by:
         project :
      > Could not resolve org.nodejs:node:12.22.6.
         > Could not get resource 'https://nodejs.org/dist/v12.22.6/ivy.xml'.
            > Could not GET 'https://nodejs.org/dist/v12.22.6/ivy.xml'. Received status code 403 from server: Forbidden

But also https://nodejs.org/dist/v12.22.6/ returns 500

@ovflowd
Copy link
Member

ovflowd commented Mar 20, 2023

@tomzi8571 as explained by @tridium-gward this is not an issue from our side. This file never existed and with the updated configuration it should now be properly handling the requests. So you have a misconfigured setup of your "Ivy"

@petty
Copy link

petty commented Mar 20, 2023

@tomzi8571 as explained by @tridium-gward this is not an issue from our side. This file never existed and with the updated configuration it should now be properly handling the requests. So you have a misconfigured setup of your "Ivy"

Ok, but this configuration hasn't changed in years ... and this also broke Friday ...

@nschonni
Copy link
Member

As a result of triaging this issue, additional blocking rules were setup in nodejs/build#3223. This never worked, but previously didn't hard block as before @petty. This was always a misconfiguration, and won't be rolled back

@tniessen
Copy link
Member

To add to @nschonni's explanation, this route likely returned 404 before, and your tooling might have silently ignored that particular error code. The new firewall configuration blocks requests from some misconfigured Artifactory/Gradle setups that would otherwise cause unnecessary load on our infrastructure, resulting in status code 403.

@petty
Copy link

petty commented Mar 20, 2023

Ok, all good ... I just needed a newer version of the Gradle Node plugin (specifically moving from 1.3.0 to 1.5.3).

-    id 'com.github.node-gradle.node' version '1.3.0'
+    id 'com.github.node-gradle.node' version '1.5.3'

@cjiga
Copy link

cjiga commented Mar 20, 2023

The same problem with version: v10.15.3

`What went wrong:
Execution failed for task ':carelogic-webapp:nodeSetup'.

Could not resolve all dependencies for configuration 'detachedConfiguration1'.
Could not resolve org.nodejs:node:10.15.3.
Required by:
com.qualifacts.carelogic:carelogic-webapp:276.01
> Could not GET 'https://nodejs.org/dist/v10.15.3/ivy.xml'. Received status code 403 from server: Forbidden`

@ovflowd
Copy link
Member

ovflowd commented Mar 20, 2023

@cjiga please, read prior comments before posting here.

I'm locking this issue to avoid duplicated comments and pings to the people here.

@nodejs nodejs locked as off-topic and limited conversation to collaborators Mar 20, 2023
@ovflowd ovflowd unpinned this issue Mar 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests