-
Notifications
You must be signed in to change notification settings - Fork 13.3k
connection Refused : HTTP error code -1 #7052
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
The error is pretty clear: the server is refusing your connection for some reason. Either the IP is wrong, or the port is wrong, or the url endpoint is wrong, or the url parameters are wrong, or the http method is wrong, or your server set up (e.g.: firewall) is wrong, or your webserver application (e.g.: webserver config) is wrong, or your php script is wrong. Or something else I'm not thinking of. |
I am facing the same issue. with similar code.
I am running this code in a timescheduler every 10 seconds. The exact URL works from the browser. The server is a common PHP server. |
Exactly my issue, the website works just fine on my browser but not on my esp8266 |
I resolved the issue by using standard coding practice. |
Thanks a lot for the quick reply! |
Wanted to add that I battled this same issue for days while doing SSL connections. What worked for me was adding these properties to the WiFiClientSecure and HTTPClient objects:
|
Platform
Settings in IDE
Problem Description
showing connection refused error.
Below is my code
Nodemcu CODE
Debug image
https://user-images.githubusercontent.com/35455643/73595076-71ed0580-453a-11ea-84a8-b11362d61355.png
The text was updated successfully, but these errors were encountered: