3

I'm working on BasicHTTPClient for send the data from the esp32 cam board to webserver through GET method i have googled about this error can some explain me this error and tell me how to slove it

thank you in advance!

Lokesh Jr
  • 33
  • 1
  • 5

2 Answers2

6

Reset means that either there was nothing listening on the TCP port you tried to connect to (for instance, the web server wasn't running, or you had the wrong port number for it, or there was a firewall blocking access), or if you had already connected that the server your software was talking to abruptly went away (crashed, exited, or a firewall was brought up).

I noticed that you tagged your question with localhost. If you're attempting to connect to http://localhost or http://127.0.0.1 from the ESP32, that will absolutely not work. localhost is shorthand for "the same computer" - it's not the name of some other computer your web server is running on. If you're trying to connect to localhost from the ESP32, you're trying to connect to a web server running on the ESP32, which is also certainly not the case, and you would in fact get a reset as a response. You need to use the correct name or IP address of the computer you're trying to connect to.

romkey
  • 6,218
  • 3
  • 16
  • 12
  • how to check if the firewall is blocking my request? By the way, i have changed the localhost to the 000webhost and now I'm using proper IP address And thank you for your time! – Lokesh Jr May 22 '22 at 14:09
  • You'll have to read the documentation for the computer running the server to see how to check the firewall. – romkey May 22 '22 at 16:24
  • 1
    I just noticed that I'm using localhost instead of my computer's IP, thanks for pointing it out. – matez Jul 27 '22 at 19:19
  • @matez, same history – Olejan Oct 20 '22 at 08:42
0

In my case, I just needed to define the Wi-Fi network as private in the settings Windows and turn off the firewall