-
Notifications
You must be signed in to change notification settings - Fork 13.3k
http.GET() return connection refused error (-1) #6169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
so, and instead of waiting and seeing if this isn't just an error of ipify.org, you open an issue??? |
i gave ipify as an example.. i also tried what is my ip api but again the same problem occurs... i also tried to |
@comertial enable debug mode (tools menu), and give all output from the BasicHttpClient sketch. |
For some reason that I can't explain resetting my modem did the job! |
Actually I was (or am) observing the same issue: random but persistent failures to connect reporting bogus "connection refused" errors. By "random but persistent" I mean that I would randomly start having the issue when connecting to a new AP (same sketch and board that had been connecting to another AP for months without issues), and then it would persist, and then some day it would disappear. Of course I was tinkering with several parameters and every time I thought I had worked around it by changing something. Today the issue went away after upgrading to the latest version of this project, but now I realise, I have also reset the router/AP, which in my case is my Android phone with Portable Hotspot turned on (by reset it I mean I turned Portable Hotspot off and on). So, I wonder whether the issue has been fixed in a recent release, or if this is yet another instance of it going away randomly after resetting the router. I had given some detailed debug output in In that particular report I was assuming that nothing was wrong in the http client itself (or wifi client or any layer below it) and I was originally reporting the lack of detail in the error reporting, which actually turned out to be plain wrong error reporting (bogus "connection refused" when no connection was being refused), but then it became clear that there IS something wrong in the client. So, is the issue (randomly failing http GETs and bogus "connection refused" errors) known to have been fixed? |
Ok, no, it's not fixed. I downgraded back to the version I was using (somewhere after a1e59e9, not much later) and I still can't reproduce the issue, with the same sketch and same board and same router (my Android phone ad portable hotspot) where I was observing the issue in the first place, and where I stopped observing it today after upgrading. But now downgrading doesn't bring back the issue, so it's clear it simply randomly disappeared as it did many times before, just as randomly as it often reappears. This issue is real and should be reopened, and it seems to be related to what I reported in #5137 I also wonder whether this is related to #4176 |
Basic Infos
Platform
Settings in IDE
Problem Description
I try to get my public ip with the ipify, but running the code i get connection refused.. i use the BasicHttpClient exactly as it is and i just change my ssid and password and the
http.begin("http://api.ipify.org/");
! thats all the changes but i get a connection refused.. until yesterday everything was working fine!I also tried the same example without changing anything else other than my ssid and passoword but again the same problem occurs!
Debug Messages
on serial monitor this is what is being printed:
The text was updated successfully, but these errors were encountered: