# Install/Update script fails, 502 error

**URL:** <https://discourse.nodered.org/t/install-update-script-fails-502-error/89138>\
**Category:** General\
**Created:** [1 July 2024 06:42 UTC](https://discourse.nodered.org/t/install-update-script-fails-502-error/89138 "2024-07-01T06:42:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![impvan](https://avatars.discourse-cdn.com/v4/letter/i/8797f3/32.png) [@impvan](https://discourse.nodered.org/u/impvan)\
**Post date:** [1 July 2024 06:42 UTC](https://discourse.nodered.org/t/install-update-script-fails-502-error/89138/1 "2024-07-01T06:42:20Z")

</div>

Using the usual Pi update script:  
`bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)`  
...it fails at "Install new NodeJS" with `curl: (22) The requested URL returned error: 502`.  
This also happens if i append --node18 or --node20.  
The log shows: `W: Failed to fetch https://deb.nodesource.com/node_20.x/dists/nodistro/InRelease 502 Bad Gateway [IP: 143.204.15.127 443]`  
The error was present about 18:00GMT yesterday, which I put down to maybe weekend repo maintenance ~ but still seeing the error this morning.  
Any ideas?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [1 July 2024 09:06 UTC](https://discourse.nodered.org/t/install-update-script-fails-502-error/89138/2 "2024-07-01T09:06:18Z")

</div>

> [@impvan](#):
>
> [https://deb.nodesource.com/node\_20.x/dists/nodistro/InRelease](https://deb.nodesource.com/node_20.x/dists/nodistro/InRelease)

Sounds like you have a network issue. What happens if you run, in a command window  
`wget https://deb.nodesource.com/node_20.x/dists/nodistro/InRelease`

---

<div class="post-metadata">

**Author:** ![impvan](https://avatars.discourse-cdn.com/v4/letter/i/8797f3/32.png) [@impvan](https://discourse.nodered.org/u/impvan)\
**Post date:** [1 July 2024 17:30 UTC](https://discourse.nodered.org/t/install-update-script-fails-502-error/89138/3 "2024-07-01T17:30:16Z")

</div>

It claims it's connected, but doesn't respond to the GET request:

```auto
Resolving deb.nodesource.com (deb.nodesource.com)... 143.204.15.127
Connecting to deb.nodesource.com (deb.nodesource.com)|143.204.15.127|:443... connected.
HTTP request sent, awaiting response... 502 Bad Gateway
2024-07-01 18:28:33 ERROR 502: Bad Gateway.

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [1 July 2024 17:56 UTC](https://discourse.nodered.org/t/install-update-script-fails-502-error/89138/4 "2024-07-01T17:56:44Z")

</div>

I am not an expert in such things, but I suspect it is a firewall issue, or a problem between the PC and the Internet.

If it is a corporate system, ask your IT guys.

---

<div class="post-metadata">

**Author:** ![impvan](https://avatars.discourse-cdn.com/v4/letter/i/8797f3/32.png) [@impvan](https://discourse.nodered.org/u/impvan)\
**Post date:** [1 July 2024 17:58 UTC](https://discourse.nodered.org/t/install-update-script-fails-502-error/89138/5 "2024-07-01T17:58:07Z")

</div>

Nothing corporate, just a household headless install on a Pi.

I'll continue having a poke around 🙂

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [1 July 2024 18:27 UTC](https://discourse.nodered.org/t/install-update-script-fails-502-error/89138/6 "2024-07-01T18:27:42Z")

</div>

> [@impvan](#):
>
> a household headless install on a Pi

If you put the url into the browser on your PC does it fetch it ok?

---

<div class="post-metadata">

**Author:** ![impvan](https://avatars.discourse-cdn.com/v4/letter/i/8797f3/32.png) [@impvan](https://discourse.nodered.org/u/impvan)\
**Post date:** [1 July 2024 18:46 UTC](https://discourse.nodered.org/t/install-update-script-fails-502-error/89138/7 "2024-07-01T18:46:58Z")

</div>

Running the wget in a terminal on the PC pulls it down fine. Running it in the browser brings a 12k file which appears to be a list of files with MD5 and SHA hashes.  
I've also cleared the Pi traffic through the router, so there should be no router firewalling going on.  
It's an oddun for sure...  
As the water level is rising in my cellar sump, and the pump has to be driven manually without NR running, I think a re-install from scratch might be the best option for now!

---

<div class="post-metadata">

**Author:** ![impvan](https://avatars.discourse-cdn.com/v4/letter/i/8797f3/32.png) [@impvan](https://discourse.nodered.org/u/impvan)\
**Post date:** [5 July 2024 21:19 UTC](https://discourse.nodered.org/t/install-update-script-fails-502-error/89138/8 "2024-07-05T21:19:33Z")

</div>

Just to close this off, I never got to the bottom of what was causing the 502.

A new install from scratch and copying over the flows file cured it.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [19 July 2024 21:20 UTC](https://discourse.nodered.org/t/install-update-script-fails-502-error/89138/9 "2024-07-19T21:20:21Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
