build icon indicating copy to clipboard operation
build copied to clipboard

cURL error 56 when checking for new release using precondition

Open codeskipper opened this issue 8 months ago • 2 comments

URL:

https://nodejs.org/dist

Browser Name:

cURL

Browser Version:

curl 8.7.1 (x86_64-apple-darwin24.0) libcurl/8.7.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.63.0

Operating System:

macOS 15.3.1

How to reproduce the issue:

When running a cURL session to check for a new NodeJS release using preconditions for etag and If-Modified-Since, it sometimes exits with code 56 which indicates a network issue. When this happens, it also returns http code 412 which just indicates no match for the preconditions.

The issue happens only some of the time when running the session, I have not been able to discern a pattern. It has happened just about every day on a CI job we run daily since around November 2024.

Here is an example session with the issue where I've added the --verbose option.

me@a-mac downloads % /usr/bin/curl --verbose --silent --show-error --no-buffer --dump-header - --speed-time 30 --location --url https://nodejs.org/dist/latest-v20.x/node-v20.18.3.pkg --fail --output /Users/$HOME/Library/AutoPkg/Cache/local.ws1.NodeJS-LTS/downloads/tmpd_5k3i_k --header 'If-None-Match: "0241fea6159a179d2f451f3a6171b688"' --header "If-Modified-Since: Mon, 10 Feb 2025 11:50:34 GMT"
* Host nodejs.org:443 was resolved.
* IPv6: (none)
* IPv4: 104.20.23.46, 104.20.22.46
*   Trying 104.20.23.46:443...
* Connected to nodejs.org (104.20.23.46) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
} [315 bytes data]
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* (304) (IN), TLS handshake, Unknown (8):
{ [19 bytes data]
* (304) (IN), TLS handshake, Certificate (11):
{ [4835 bytes data]
* (304) (IN), TLS handshake, CERT verify (15):
{ [520 bytes data]
* (304) (IN), TLS handshake, Finished (20):
{ [36 bytes data]
* (304) (OUT), TLS handshake, Finished (20):
} [36 bytes data]
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 / [blank] / UNDEF
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=*.nodejs.org
*  start date: Feb 28 00:00:00 2024 GMT
*  expire date: Mar 30 23:59:59 2025 GMT
*  subjectAltName: host "nodejs.org" matched cert's "nodejs.org"
*  issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA Domain Validation Secure Server CA
*  SSL certificate verify ok.
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://nodejs.org/dist/latest-v20.x/node-v20.18.3.pkg
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: nodejs.org]
* [HTTP/2] [1] [:path: /dist/latest-v20.x/node-v20.18.3.pkg]
* [HTTP/2] [1] [user-agent: curl/8.7.1]
* [HTTP/2] [1] [accept: */*]
* [HTTP/2] [1] [if-none-match: "0241fea6159a179d2f451f3a6171b688"]
* [HTTP/2] [1] [if-modified-since: Mon, 10 Feb 2025 11:50:34 GMT]
> GET /dist/latest-v20.x/node-v20.18.3.pkg HTTP/2
> Host: nodejs.org
> User-Agent: curl/8.7.1
> Accept: */*
> If-None-Match: "0241fea6159a179d2f451f3a6171b688"
> If-Modified-Since: Mon, 10 Feb 2025 11:50:34 GMT
>
* Request completely sent off
< HTTP/2 412
HTTP/2 412
< date: Fri, 28 Feb 2025 07:53:20 GMT
date: Fri, 28 Feb 2025 07:53:20 GMT
< content-type: application/x-xar
content-type: application/x-xar
< content-length: 0
content-length: 0
< cache-control: private, no-cache, no-store, max-age=0, must-revalidate
cache-control: private, no-cache, no-store, max-age=0, must-revalidate
< etag: "0241fea6159a179d2f451f3a6171b688"
etag: "0241fea6159a179d2f451f3a6171b688"
< last-modified: Mon, 10 Feb 2025 11:50:34 GMT
last-modified: Mon, 10 Feb 2025 11:50:34 GMT
< accept-range: bytes
accept-range: bytes
< strict-transport-security: max-age=31536000; includeSubDomains; preload
strict-transport-security: max-age=31536000; includeSubDomains; preload
< x-content-type-options: nosniff
x-content-type-options: nosniff
< server: cloudflare
server: cloudflare
< cf-ray: 918ed71bcdab56ba-OSL
cf-ray: 918ed71bcdab56ba-OSL
<

* The requested URL returned error: 412
* process_pending_input: nghttp2_session_mem_recv() returned -902:The user callback function failed
* Connection #0 to host nodejs.org left intact
curl: (56) The requested URL returned error: 412

I hope that helps troubleshooting the issue.

thanks.

codeskipper avatar Feb 28 '25 08:02 codeskipper