node-red-nodes icon indicating copy to clipboard operation
node-red-nodes copied to clipboard

ECONNREFUSED connection nodered to strapi

Open kevinpetroni opened this issue 3 years ago • 4 comments

Hello, I'm having a problem with the node red, when I will inject post in http to the strapi, I get a error: RequestError: connect ECONNREFUSED localhost:1337.

image

Note: I put my local ip to get

When I "GET in Insomnia", I get the results

image

My node red version is 3.0.2 Strapi version is 4.6.1

To make a test, I'm not use any authentication

I hope you help me :D

kevinpetroni avatar Feb 21 '23 18:02 kevinpetroni

Hi @kevinpetroni

The issue templates we provide asks for general how-to questions get asked on the forum (discourse.nodered.org) where the full user community can help, rather than rely on the core contributors.

Where exactly is Node-RED running? The fact you are using the ip address in Node-RED, but localhost in insomnia suggests they are not both running on the same device.

Does the device running Node-RED have access to that up address?

knolleary avatar Feb 21 '23 18:02 knolleary

Thanks! I will aks for this problem on the forum.

So, yes, Node red and Insomnia it's running in the same device. I'm using my node red on docker, if i put my local ip´ou localhost the result is the same.

kevinpetroni avatar Feb 21 '23 19:02 kevinpetroni

localhost when running in a container points to the container, not the machine that is hosting the container.

hardillb avatar Feb 21 '23 20:02 hardillb

I know, but have no diference, if I use IP, I have the same error

image

kevinpetroni avatar Feb 21 '23 23:02 kevinpetroni