"RequestError: connect ECONNREFUSED 127.0.0.1:443"

Hello I Have this error message with node-red v 3.1.3 with request HTTP get

What is the probleme ? I have the same flow in node-red v3.0.2 is ok.

Thank You

Its exactly what it says.

The Node RED flow is trying to connect to a web service I guess, and said web service is not running.

I have the same flow in node-red v3.0.2 is o

So when you say same flow, is that on the same machine or different machine?
if different machine - then there is your problem, you need to update the flow residing in 3.1.3 to point its http request to the machine offering up the service you are trying to access - its currently trying to connect to its own machine

on the other machine but not same version with import export flow.

the server is ready beacause response with postman. The problem comes from node-red with version 3.1.3. and the url is an external server

127.0.0.1 is not an external server, that is localhost (the same machine that Node RED 3.1.3 is running on)

Somewhere in your flow, you are connecting to 127.0.0.1 on port 443 (ssl) and there are no services on that host.

check all you HTTP request Nodes, one of them is connecting to 127.0.0.1

that's my problem I don't understand why it points to this address when the msg.url is defined (photo)

Export your flow so we can see its full extent (remove anything secret if you need to)
all I see is an error about trying to connect to localhost/127.0.0.1

[{"id":"82a37dbd.5fdde","type":"http request","z":"27fbb3e7.bf102c","name":"GET Autorized","method":"GET","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Accept","keyValue":"","valueType":"other","valueValue":"application/json"},{"keyType":"Authorization","keyValue":"","valueType":"msg","valueValue":"authorization"}],"x":920,"y":180,"wires":[["4733da77.1e3a04"]]},{"id":"830d5844.1718a8","type":"template","z":"27fbb3e7.bf102c","name":"Key","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"client_id=web_app&username=gmaze@linkview.fr&password=Gm090787!&grant_type=password","output":"str","x":250,"y":180,"wires":[["65401623.9abfe8"]]},{"id":"b3920ad4.fdafd8","type":"inject","z":"27fbb3e7.bf102c","name":"","props":[{"p":"payload"}],"repeat":"1800","crontab":"","once":true,"onceDelay":"5","topic":"","payload":"","payloadType":"date","x":110,"y":180,"wires":[["830d5844.1718a8"]]},{"id":"17669d03.733753","type":"http request","z":"27fbb3e7.bf102c","name":"Post Token","method":"POST","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"Content-Type","keyValue":"","valueType":"other","valueValue":"application/x-www-form-urlencoded"}],"x":550,"y":180,"wires":[["9767b391.27ac5"]]},{"id":"65401623.9abfe8","type":"change","z":"27fbb3e7.bf102c","name":"Set Headers","rules":[{"t":"set","p":"url","pt":"msg","to":"https://auth.app.sywa.fr/auth/realms/sywa/protocol/openid-connect/token","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":180,"wires":[["17669d03.733753","6b2d3f27cea3b602"]]},{"id":"9767b391.27ac5","type":"change","z":"27fbb3e7.bf102c","name":"Set Headers & URL","rules":[{"t":"set","p":"access_token","pt":"msg","to":"payload.access_token","tot":"msg"},{"t":"set","p":"authorization","pt":"msg","to":"\"Bearer \" & $$.access_token","tot":"jsonata"},{"t":"set","p":"url","pt":"msg","to":"https://api.app.sywa.fr/access-controls/694/attendees","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":730,"y":180,"wires":[["82a37dbd.5fdde"]]},{"id":"4733da77.1e3a04","type":"debug","z":"27fbb3e7.bf102c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1110,"y":120,"wires":[]},{"id":"6b0479.aa1adb88","type":"comment","z":"27fbb3e7.bf102c","name":"Interrogation","info":"","x":110,"y":140,"wires":[]},{"id":"6b2d3f27cea3b602","type":"debug","z":"27fbb3e7.bf102c","name":"debug 4","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":580,"y":300,"wires":[]}]

I have no problems with that export - it works fine (3.1.3)

on the machine that 3.1.3 is running on, what does this resolve to, and are you using any proxies?

nslookup auth.app.sywa.fr

No i don't use proxy.

If use firefox in this same machine with url https://api.app.sywa.fr/access-controls/694/attendees I have a good reponse. ( unauthorized )

Are you using any Container (Home Assistant, Docker)?

If not, then I don't know what else to suggest.

Have you tried recreating the small flow that you shared, instead of importing?

Node RED is being told that auth.app.sywa.fr resolves to 127.0.0.1 - so somewhere Node RED is being fed incorrect information by a DNS Server.

There are no problems that has been reported (currently) with the HTTP request node in 3.1.3 and It's working fine here.

Maybe see what others say :man_shrugging:

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