# Problems after update error http request

**URL:** <https://discourse.nodered.org/t/problems-after-update-error-http-request/89418>\
**Category:** General\
**Created:** [11 July 2024 08:15 UTC](https://discourse.nodered.org/t/problems-after-update-error-http-request/89418 "2024-07-11T08:15:13Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![adambernaufeit](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@adambernaufeit](https://discourse.nodered.org/u/adambernaufeit)\
**Post date:** [11 July 2024 08:15 UTC](https://discourse.nodered.org/t/problems-after-update-error-http-request/89418/1 "2024-07-11T08:15:13Z")

</div>

since the update node red (https) from version 3.0.2 to 4.0.1 after calling http in the call comes from time to time and sometimes not, or sometimes it happens that the call does come, but with a long delay.  
Another thing it does is it keeps connecting and disconnecting mqtt

11 Jul 10:03:54 - [info] [mqtt-broker:8f86b404159619ae] Connected to broker: mqtt://nymmscmu11.magna.global:1883

11 Jul 10:04:54 - [info] [mqtt-broker:8f86b404159619ae] Disconnected from broker: mqtt://nymmscmu11.magna.global:1883

11 Jul 10:05:09 - [info] [mqtt-broker:8f86b404159619ae] Connected to broker: mqtt://nymmscmu11.magna.global:1883

11 Jul 10:06:09 - [info] [mqtt-broker:8f86b404159619ae] Disconnected from broker: mqtt://nymmscmu11.magna.global:1883

11 Jul 10:06:24 - [info] [mqtt-broker:8f86b404159619ae] Connected to broker: mqtt://nymmscmu11.magna.global:1883

11 Jul 10:07:24 - [info] [mqtt-broker:8f86b404159619ae] Disconnected from broker: mqtt://nymmscmu11.magna.global:1883

11 Jul 10:07:39 - [info] [mqtt-broker:8f86b404159619ae] Connected to broker: mqtt://nymmscmu11.magna.global:1883

11 Jul 10:08:39 - [info] [mqtt-broker:8f86b404159619ae] Disconnected from broker: mqtt://nymmscmu11.magna.global:1883

11 Jul 10:08:54 - [info] [mqtt-broker:8f86b404159619ae] Connected to broker: mqtt://nymmscmu11.magna.global:1883

11 Jul 10:09:54 - [info] [mqtt-broker:8f86b404159619ae] Disconnected from broker: mqtt://nymmscmu11.magna.global:1883

11 Jul 10:10:09 - [info] [mqtt-broker:8f86b404159619ae] Connected to broker: mqtt://nymmscmu11.magna.global:1883

11 Jul 10:11:06 - [info] [mqtt-broker:8f86b404159619ae] Disconnected from broker: mqtt://nymmscmu11.magna.global:1883

11 Jul 10:11:21 - [info] [mqtt-broker:8f86b404159619ae] Connected to broker: mqtt://nymmscmu11.magna.global:1883

11 Jul 10:12:21 - [info] [mqtt-broker:8f86b404159619ae] Disconnected from broker: mqtt://nymmscmu11.magna.global:1883

11 Jul 10:12:36 - [info] [mqtt-broker:8f86b404159619ae] Connected to broker: mqtt://nymmscmu11.magna.global:1883

11 Jul 10:13:36 - [info] [mqtt-broker:8f86b404159619ae] Disconnected from broker: mqtt://nymmscmu11.magna.global:1883

11 Jul 10:13:51 - [info] [mqtt-broker:8f86b404159619ae] Connected to broker: mqtt://nymmscmu11.magna.global:1883

11 Jul 10:14:51 - [info] [mqtt-broker:8f86b404159619ae] Disconnected from broker: mqtt://nymmscmu11.magna.global:1883

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [11 July 2024 10:14 UTC](https://discourse.nodered.org/t/problems-after-update-error-http-request/89418/2 "2024-07-11T10:14:58Z")

</div>

I take it you are IPV6.

What happens if you try to ping the MQTT broker?

What is the time out for connections for your MQTT?

---

<div class="post-metadata">

**Author:** ![adambernaufeit](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@adambernaufeit](https://discourse.nodered.org/u/adambernaufeit)\
**Post date:** [11 July 2024 10:23 UTC](https://discourse.nodered.org/t/problems-after-update-error-http-request/89418/3 "2024-07-11T10:23:36Z")

</div>

time limit is 60s and responds to ping

---

<div class="post-metadata">

**Author:** ![adambernaufeit](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@adambernaufeit](https://discourse.nodered.org/u/adambernaufeit)\
**Post date:** [11 July 2024 10:24 UTC](https://discourse.nodered.org/t/problems-after-update-error-http-request/89418/4 "2024-07-11T10:24:36Z")

</div>

but even if I disable mqtt, it doesn't solve the problem of occasional unavailability of http in

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [11 July 2024 10:27 UTC](https://discourse.nodered.org/t/problems-after-update-error-http-request/89418/5 "2024-07-11T10:27:09Z")

</div>

I only see MQTT messages.

No `http in`.

Sorry, I'm confused.

---

<div class="post-metadata">

**Author:** ![adambernaufeit](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@adambernaufeit](https://discourse.nodered.org/u/adambernaufeit)\
**Post date:** [11 July 2024 10:28 UTC](https://discourse.nodered.org/t/problems-after-update-error-http-request/89418/6 "2024-07-11T10:28:54Z")

</div>

yes, as I say, mqtt sometimes accepts a topic and sometimes not, and so does http in. The server sometimes takes a long time to connect, in general it behaves strangely after the update to a higher version

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [11 July 2024 12:00 UTC](https://discourse.nodered.org/t/problems-after-update-error-http-request/89418/7 "2024-07-11T12:00:45Z")

</div>

You may need to up the logging level to find out what is happening.

---

<div class="post-metadata">

**Author:** ![adambernaufeit](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@adambernaufeit](https://discourse.nodered.org/u/adambernaufeit)\
**Post date:** [11 July 2024 13:11 UTC](https://discourse.nodered.org/t/problems-after-update-error-http-request/89418/8 "2024-07-11T13:11:47Z")

</div>

i changed logging to trace and when i make rest api calls ten times in a row, the response comes only 3 times  
this is log:  
11 Jul 15:07:20 - [trace] [flow:2c5679472080d426] f619bbdf89af3c94 | function |  
11 Jul 15:07:20 - [trace] [flow:2c5679472080d426] 1e7a2b4faa4748dd | inject |  
11 Jul 15:07:20 - [trace] [flow:2c5679472080d426] c85d7513cb90c207 | ui\_text |  
11 Jul 15:07:20 - [trace] [flow:2c5679472080d426] 81f63a5746026d2f | function |  
11 Jul 15:07:20 - [trace] [flow:2c5679472080d426] efc50724da62e24f | function |  
11 Jul 15:07:20 - [trace] [flow:2c5679472080d426] 419d088fdcaaa475 | switch |  
11 Jul 15:07:20 - [trace] [flow:2c5679472080d426] 2ba0baeefcb8c1aa | change |  
11 Jul 15:07:20 - [trace] [flow:2c5679472080d426] 34a4d75457ada9bb | ui\_toast |  
11 Jul 15:07:20 - [trace] [flow:2c5679472080d426] dfa639b16e225244 | join |  
11 Jul 15:07:20 - [trace] [flow:2c5679472080d426] 1fb5fec339db0e22 | function |  
11 Jul 15:07:20 - [trace] [flow:2c5679472080d426] b8872c256de97383 | e-mail |  
11 Jul 15:07:20 - [trace] [flow:2c5679472080d426] 9f81968b11e3cafa | function |  
11 Jul 15:07:20 - [trace] [flow:2c5679472080d426] 2dd2d500a7b94f00 | debug |  
11 Jul 15:07:20 - [trace] [flow:2c5679472080d426] 9c095b231a1a2455 | q-gate |  
11 Jul 15:07:20 - [trace] [flow:2c5679472080d426] ------------------|--------------|-----------------  
11 Jul 15:07:20 - [trace] runtime event: {"id":"runtime-state","payload":{"state":"start"},"retain":true}  
11 Jul 15:07:20 - [info] Started flows  
11 Jul 15:07:20 - [info] [mqtt-broker:MQTT - MAGNA COMUNICATION] Connected to broker: mqtt://10.90.156.53/mqtt:5000  
11 Jul 15:07:20 - [info] [mqtt-broker:8f86b404159619ae] Connected to broker: mqtt://nymmscmu11.magna.global:1883  
11 Jul 15:07:41 - [info] [MSSQL-CN:MCZMSSQ31 - ITNBK\_APP] Connected to server : mczmssq31.magna.global, database : ITNBK\_APP, port : 1433, user : esvduser01  
11 Jul 15:07:41 - [info] [MSSQL-CN:VSTRIKOVNA] Connected to server : mczmssq31.magna.global, database : DBESVDPIL2, port : undefined, user : esvduser01  
11 Jul 15:07:42 - [trace] comms.open 15zbaQpdUBvTBufYoDfPKAqKLYruzwfgldXZNoNbyCY=  
11 Jul 15:09:21 - [info] [mqtt-broker:8f86b404159619ae] Disconnected from broker: mqtt://nymmscmu11.magna.global:1883  
11 Jul 15:09:36 - [info] [mqtt-broker:8f86b404159619ae] Connected to broker: mqtt://nymmscmu11.magna.global:1883

---

<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:** [11 July 2024 13:59 UTC](https://discourse.nodered.org/t/problems-after-update-error-http-request/89418/9 "2024-07-11T13:59:13Z")

</div>

Look in the mqtt broker log for more information on why it is disconnecting.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [11 July 2024 16:52 UTC](https://discourse.nodered.org/t/problems-after-update-error-http-request/89418/10 "2024-07-11T16:52:31Z")

</div>

A constantly disconnecting/reconnecting broker is more often than not down to an MQTT client ID clash. But that wouldn't explain the disconnecting TCP connection. Perhaps you should also check your device logs to see if anything odd is happening on the network?

---

<div class="post-metadata">

**Author:** ![adambernaufeit](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@adambernaufeit](https://discourse.nodered.org/u/adambernaufeit)\
**Post date:** [12 July 2024 08:57 UTC](https://discourse.nodered.org/t/problems-after-update-error-http-request/89418/11 "2024-07-12T08:57:10Z")

</div>

here is message from browser console: jquery.min.js:2 GET [https://externals.magnabohemia.cz/NymburkNodeRed/andon/checkPlace/1nbkTouran?hala=1&stroj=&zavod=nbk&projekt=Touran&\_=1720774510677](https://externals.magnabohemia.cz/NymburkNodeRed/andon/checkPlace/1nbkTouran?hala=1&stroj=&zavod=nbk&projekt=Touran&_=1720774510677) 502 (Bad Gateway)

| | send | @ | jquery.min.js:2 |
| --- | --- | --- | --- |
| | ajax | @ | jquery.min.js:2 |
| | (anonymní) | @ | nastaveniStanice.js:23 |

...it only happens once in about 10 attempts

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [12 July 2024 09:10 UTC](https://discourse.nodered.org/t/problems-after-update-error-http-request/89418/12 "2024-07-12T09:10:30Z")

</div>

whatever is serving that is probably crashing. Node-RED request is correctly reporting a 502 because thats what your endpoint is returning

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/a/9a71ac21b00b31e4d9f4cd84c1d611f8c184f095.png)

when i did get a response, it was super slow taking ~19 seconds suggesting the server is working too hard, or badly programmed or eating memory and crashing.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/c/5c6ea6eabf2ad71c6ef61fd3326f4d673c291106.png)

Also note: your endpoint is returning raw IDs and is unprotected. I would not be surprised if the slowness was due to being hacked.

---

<div class="post-metadata">

**Author:** ![adambernaufeit](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@adambernaufeit](https://discourse.nodered.org/u/adambernaufeit)\
**Post date:** [30 July 2024 10:54 UTC](https://discourse.nodered.org/t/problems-after-update-error-http-request/89418/13 "2024-07-30T10:54:40Z")

</div>

I solved the problem, it was caused by logging in after loading node red (admin login). I don't know why this is happening, but I turned off the mandatory login

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [30 July 2024 13:03 UTC](https://discourse.nodered.org/t/problems-after-update-error-http-request/89418/14 "2024-07-30T13:03:24Z")

</div>

> [@adambernaufeit](#):
>
> I don't know why this is happening, but I turned off the mandatory login

### You Node-RED instance is wide open to abuse on the internet.

### Look familiar?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/e/5eb0f5e15892d67eaf7c9dfd673ffced99d6acae.png)

### It will get abused by a bad actor - probably before the end of the week!

### Please do NOT put node-red on the internet without due care to security.
  

If you are not up-to-speed on this kind of thing, consider using a Node-RED hosting platform with security built in like [FlowFuse.com](http://FlowFuse.com)

---

<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:** [28 October 2024 13:04 UTC](https://discourse.nodered.org/t/problems-after-update-error-http-request/89418/15 "2024-10-28T13:04:14Z")

</div>

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