# Error: connect ECONNREFUSED 127.0.0.1:5000

**URL:** <https://community.postman.com/t/error-connect-econnrefused-127-0-0-1-5000/41937>\
**Category:** Help Hub\
**Created:** [December 10, 2022, 11:17am UTC](https://community.postman.com/t/error-connect-econnrefused-127-0-0-1-5000/41937 "2022-12-10T11:17:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![blake-mack](https://avatars.discourse-cdn.com/v4/letter/b/c6cbf5/32.png) [@blake-mack](https://community.postman.com/u/blake-mack)\
**Post date:** [December 10, 2022, 11:17am UTC](https://community.postman.com/t/error-connect-econnrefused-127-0-0-1-5000/41937/1 "2022-12-10T11:17:32Z")

</div>

Hello Postman community! I am new to postman and am currently just trying to follow along with an online tutorial setup to eventually make a small ai image generator app.

Specifically, the problem is that the post request I am trying to make is coming back with the error ‘Error: connect ECONNREFUSED 127.0.0.1:5000’. I am trying to make a post request that will return an object {success: true} that I have written in my application.

Currently I have tried:  
Checking for a firewall issue. I temporarily disabled it whilst trying to make the post request it in case that was causing the issue.

I also ran npm run dev in this app and it shows up as having connceted.

I even ran npm run dev in a separate app of mine to test that local host was not being blocked in my browser, but that app showed up fine as normal.

Please see the screenshots below for details of the setup (first two pictures) and the post request itself(third picture) for this post request:

 ![Screenshot (657)](https://us1.discourse-cdn.com/getpostman/original/3X/4/f/4f37d7f4e932faf08327cbb22f54639b1e6d02c1.png)  
 ![Screenshot (658)](https://us1.discourse-cdn.com/getpostman/original/3X/d/b/db63690edafda77a2e4836742c8b570ece4ad2dc.png)  
 ![Screenshot (656)](https://us1.discourse-cdn.com/getpostman/original/3X/3/3/33ad679825c9e4d783d26c17c19fd86e35f45739.png)

---

<div class="post-metadata">

**Author:** ![blake-mack](https://avatars.discourse-cdn.com/v4/letter/b/c6cbf5/32.png) [@blake-mack](https://community.postman.com/u/blake-mack)\
**Post date:** [December 10, 2022, 12:04pm UTC](https://community.postman.com/t/error-connect-econnrefused-127-0-0-1-5000/41937/2 "2022-12-10T12:04:24Z")

</div>

Solved! I simply had to make sure I was actually running the server before making the post request…

---

<div class="post-metadata">

**Author:** ![ferice](https://avatars.discourse-cdn.com/v4/letter/f/3be4f8/32.png) [@ferice](https://community.postman.com/u/ferice)\
**Post date:** [July 8, 2023, 2:35am UTC](https://community.postman.com/t/error-connect-econnrefused-127-0-0-1-5000/41937/3 "2023-07-08T02:35:02Z")

</div>

I am having the same issue with POSTMAN. It’s a Java application, and everything was working fine until I added spring boot security configuration. All of a sudden, I am getting the ECONNREFUSED error. However, it only occurs when I run the eclipse ide in debug mode. If I stops and runs it in normal mode, the requests are working as expected.

---

<div class="post-metadata">

**Author:** ![rishuuppal](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/rishuuppal/32/27440_2.png) [@rishuuppal](https://community.postman.com/u/rishuuppal)\
**Post date:** [February 13, 2024, 8:51pm UTC](https://community.postman.com/t/error-connect-econnrefused-127-0-0-1-5000/41937/4 "2024-02-13T20:51:42Z")

</div>

and how would u check if the server is running or not, I am new to this stuff

---

<div class="post-metadata">

**Author:** ![aerospace-geologist2](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@aerospace-geologist2](https://community.postman.com/u/aerospace-geologist2)\
**Post date:** [February 22, 2024, 1:33pm UTC](https://community.postman.com/t/error-connect-econnrefused-127-0-0-1-5000/41937/5 "2024-02-22T13:33:58Z")

</div>

Run the python script containing your API code. Then run postman again. This worked for me.
