# 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

**URL:** https://discourse.nodered.org/t/hello-im-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/75534
**Category:** General
**Tags:** http-request, docker
**Created:** [21 February 2023 19:54 UTC](https://discourse.nodered.org/t/hello-im-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/75534 "2023-02-21T19:54:39Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![kevinpetroni](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@kevinpetroni](https://discourse.nodered.org/u/kevinpetroni)
#### Post date: [21 February 2023 19:54 UTC](https://discourse.nodered.org/t/hello-im-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/75534/1 "2023-02-21T19:54:39Z")

</div>

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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/c/5cebd338ee56f7e92778627a60f5528761ae755f.png)](https://user-images.githubusercontent.com/124711123/220428883-39c6d125-1d45-4081-99f1-04a3b4993d17.png)

Note: I put my local ip to get, but if i put localhost I have the same result

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

[![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/9/49d2b418848906af3adca638ee07d169414d512a.png)](https://user-images.githubusercontent.com/124711123/220429344-3f57649a-5ed3-45f6-b9b7-dc3246f9906a.png)

My node red version is 3.0.2  
Strapi version is 4.6.1  
My node red is running on docker  
To make a test, I'm not use any authentication

I hope you help me 😃

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [21 February 2023 20:54 UTC](https://discourse.nodered.org/t/hello-im-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/75534/2 "2023-02-21T20:54:18Z")

</div>

> [@kevinpetroni](#):
>
> My node red is running on docker

And where is "the strapi" running ?  
The docker container is not "localhost", use the ip instead.

---

<div class="post-metadata">

### Author: ![kevinpetroni](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@kevinpetroni](https://discourse.nodered.org/u/kevinpetroni)
#### Post date: [21 February 2023 23:07 UTC](https://discourse.nodered.org/t/hello-im-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/75534/3 "2023-02-21T23:07:31Z")

</div>

Strapi is running in a command line on my terminal, cause the strapi latest version of docker-compose is old, I use my ip to make a GET but don't work too, shom me the same message.

---

<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: [22 February 2023 21:10 UTC](https://discourse.nodered.org/t/hello-im-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/75534/4 "2023-02-22T21:10:19Z")

</div>

> [@kevinpetroni](#):
>
> I use my ip to make a GET but don't work too, shom me the same message.

If it showed you the same message then you did not use the ip, since the message said it could not connect to localhost. Tell us the ip addresses of the various components in your system and show us the actual error message.

Also show us it working in Insomnia using that IP.

Also open a shell inside the docker container and check you can ping that ip.

---

<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: [23 April 2023 21:11 UTC](https://discourse.nodered.org/t/hello-im-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/75534/5 "2023-04-23T21:11:20Z")

</div>

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