Problems after update error http request

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

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?

time limit is 60s and responds to ping

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

I only see MQTT messages.

No http in.

Sorry, I'm confused.

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

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

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

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

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?

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 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

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

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.

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

1 Like