ECONNRESET proxy error between dev server and API

10,692

What I discovered, and what seems to have solved the problem, is that I was running too many different servers on ports that were too close together. My servers were running on port 3000, 3010, and 3009. I noticed that whenever the server at 3009 was running, I would get the above error. When I changed the port for that server from 3009 to 9999, all proxy errors ceased.

Share:
10,692
Trey Granderson
Author by

Trey Granderson

Digital Creator on the Front End. Hungrily consuming knowledge.

Updated on June 08, 2022

Comments

  • Trey Granderson
    Trey Granderson almost 2 years

    When I run my development server, I get the following error.

    Proxy error: Could not proxy request /graphql from localhost:3000 to http://localhost:3010.
    See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNRESET).
    

    It is preventing me from proxying any requests from the development server to the API.

    After debugging, I realized it was not a problem with the code because my colleague and I are working from the same repo and he does not have this error. Also, sometimes if I restart my terminal the error will go away before it comes back again.

    Would greatly appreciate guidance on what is the root of this issue and how I can resolve it.

  • dman
    dman over 2 years
    There is no logic to this.... you can not have ports running to close together.