-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
HTTP_UPDATE_FAILD Error (6): Update error: ERROR[6]: Stream Read Timeout #5023
Comments
I'm getting the same - which is annoying.... I compiled with a few debug settings and managed to get this out of the serial debug:
If I look on the web server with tcpdump, I can see a few packets go through, then what seems to be 2 x retransmissions, then a RST / FIN. My environment:
I've tried with |
The updater is not fully network aware and does not cope well with network lags. Try with (edit You already tried with higher bandwidth) This is the error The updater should check whether the stream (being a WiFiClient here) is still connected. There is an old ongoing updater PR #4054, I will try to finish that work. |
In my case, the server is on the same network - so there is no latency between the ESP and the apache web server. In fact:
The first one I tried (pasted the log from) was using high bandwidth option. Switching to low_memory made no difference. I even tried with both If it helps, the perl code I use for the cgi that the ESP talks to uses:
That will print out 256 bytes at a time to the ESP. I tried inserting a 50ms delay every 256 bytes to no effect either. |
Ok, so I had an interesting discovery just now.... When I switched out my managed Cisco 3802i access point and enabled the built in wifi on my VDSL router, I was able to do a httpUpdate with no issues at all. I tested this with TWO different devices (an ESP01 and a D1 mini). Both updated without an issue. So, the question is, what is the difference in this scenario between the two different bits of wireless infrastructure? The SSID / security mode is the same on both bits of equipment. |
A question of delay / latency ? Try to raise your 256, that would have a better effect with higher bandwidth (1460 instead of lower memory(536)) |
I might have to try over the weekend to see if I can get a working and non-working tcpdump of the two different access points. It didn't seem to matter what was on the ESP01 (it was probably default) - but changing the AP over to the 'dumb' one in the VDSL modem worked first time - whereas it failed for weeks using the Cisco 3802i. |
tcpdump on web server filtered for the ESP01's IP address with the Cisco AP connected and online:
I believe the igmp packets are the mdns advertisements starting after the update has failed. |
It looks like as if packets are no more received on the esp side. OTA is not working, is the ESP further responsive without rebooting ?
I won't tell you to read through #2330 |
The http server on the ESP responds fine. I can even visit /update on the ESP and upload a new firmware without issue. |
I have the same issue, HTTP_UPDATE_FAILED Error (-11): HTTP error: read Timeout or Stream timeout. On the server side I see that only partial content is received:
Every time exactly 64512 bytes, although my firmware is much bigger (~3megs). Thanks, |
After enabling full debugging I ran into the "SSL cert too big" issue - so I decided to go for self-signed and removed the chain. I no longer get the memory error or any leads in the debug. It simply complains about Stream Read Timeout. The same update against the same server works perfectly over HTTP - so no network/latency/etc issue for sure.
|
Unfortunately after migrating to 2.4.2 I'm having the same problem, I've tested it on several wifi networks, most of the time... |
My Debug: SerialCommand: SystemFirmwareUpdate(http://SERVER/esp8266/firmware.bin); |
Hello people good night. Anyone else with the same problem? The only test that worked very well was to use my 4G shared internet phone. Is it something related to the type of WIFI encryption?
|
I Have the same problem, the update dont get completed. My Debug has (Was tested with the WebUpdate sketch and using Chrome to upload the image) New client ets Jan 8 2013,rst cause:4, boot mode:(3,6) wdt reset |
Hi, I'm dealing with this problem since yesterday. In my case my web page is host in a apache server and respponse with a http 1.1 This is what the ESP send to server (Note http 1.0)
Server response in http 1.1
// use HTTP/1.0 for update since the update handler not support any transfer Encoding maybe it's a problem with encoding |
Maybe the error is in _parseForm function. I will do some tests. I Think its some error from there, because the OTA stops (the write is not called, i put some debugs in Updater.cpp) and the Parsing set the UPLOAD_FILE_WRITE. |
Now i'm suffering with spiffs update. |
Hi, We are also having this issue with OTA. If using core v2.4.2 we can do an OTA from an URL in a server on Internet without problems. Now with last stage core (11-oct-2018) we can do an OTA from a local file but we can not do an OTA from an URL in a server on Internet. I tested using lwIP2 (high bandwidth) and also lwIP2 (high bandwidth - no features). |
@ascillato Can you give your debug output ? |
Thanks. I updated to the last commit c8497da and stills fails The Hardware is a NodeMCU 4MB ( Flash size selected is 4M (1M) ) (If downloading the file manually and then uploading via web menu, OTA works fine) Used Serial Debug:
|
I can't reproduce yet, edit can you enable all debug options ? |
When using core 2.4.2 it works fine. This behaviour is just with the actual Stage core from the codebase |
@ascillato can you please try with 9bc8ea1 ? There was just recently an update to httpClient, and I want to factor that specific commit out. |
Ok, will try that |
I tried the example in the 1st post here, using the tasmota url (http://thehackbox.org/tasmota/sonoff-4m.bin). Everything ran like a champ, no issues seen at all, and it d/l'd and restarted as a tasmota something or other. Does anyone have a repeatably failing example using a public-facing web server and this code?
|
Hi, sorry for my late response, was very busy. I tried also the sketch posted at the beginning pointing to the tasmota url (http://thehackbox.org/tasmota/sonoff-4m.bin) and using the core from today (15-oct-2018) (2eb5b56) and works fine. No issues. So, I went to the updated example for HTTP_OTA (because the use of ESPhttpUpdate.update of the first post is deprecated in actual STAGE core) and also works fine. So, to avoid the warning at compilation that says deprecated function, we need to use new syntax for ESPhttpUpdate.update: Before (deprecated): Now:
So, in Tasmota we were missing the extra So, Now I think this issue can be closed now due to the issue is no longer in the core. Thanks a lot for the support! 👍 |
Platform Web server : Apache with PHP or Fenix, does not matter... Problem Description Here below the debug log captured from Serial1 and a screen shot from WireShark. Update |
Hi, Have you tried using last core version from master branch and the example provided for that? It works fine for me now. |
I switched to the staging version of esp8266 framework on PIO using the following in platformio.ini:
ESP version shows:
This now successfully does an OTA update (via URL /update) on my Cisco access points. I'd like to thank @ivankravets for his help on setting me in the right direction for testing this with PlatformIO. |
I've now started testing with OTA pull from a web server. The code is simple:
When this runs, I get the following result:
Are there any known issues with running in this method? The hardware is an ESP01_1m - so I don't easily have a serial port to debug with on this particular program. (I might be able to attempt the same on a different device later) |
you didn't put which file to download |
The script on the web side will check the HTTP header posted and return the correct binary file. The output from the web server is:
This is via the Cisco AP that didn't update at all using http://$ip/update until this patchset was merged, so not sure if there are still issues. |
Updated to last staging and works for me. Right now on local network all seem fine, will try soon with external server and let you know the outcomes. |
I am having the same issue with 2.4.2 version. Is there any tutorial or explanation about how to use a stage version of this code in Arduino IDE or Visual Code ? |
Yes, it is - right in the readme.md -> Using git version ... |
After failure of both update and updateSPIFFS with 2.4.2, I checked latest version both updates work great. I kept same functions (did not have to use the WiFiClient) Thank you. |
I came here because I seem to have hit this exact same bug while trying to do an OTA HTTP upgrade - I get Stream Read Timeout (with both a remote HTTP server, and a local one, on the same network). I also tried both nginx and apache2, just to exclude any server-specific issue - same result with both. @Pablo2048 - I'm sorry, but even after going through the readme I cannot figure out how to use the staging version with the Arduino IDE under Windows. I can see the instructions for cloning the git repo in a certain folder on Mac and Linux - but there is absolutely no mention of Windows in there. So maybe someone can help me, @apicquot , and others in the same situation - how do we upgrade to the latest staging version? On Windows (Win10, x64), using Arduino IDE? Thank you! |
@bogd So if you are unable to locate Arduino installation directory try to install Arduino IDE as an portable one (STFW for instructions on how to do it). Then you can put git version inside portable/sketchbook/hardware directory. |
For Arduino IDE: i simply downloaded the git and replaced the 2.4.2 folder with the new git (I made sure that path to new library was unchanged) I then ran the get.py as mentioned in the README file and it worked. This is not for sure the cleanest way to install it but it worked (I struggle with the README install as well) |
@apicquot - thank you! My problem was that I couldn't find that folder (2.4.2) under Windows. I finally managed to locate it - it is NOT under the Arduino installation directory, but instead it is under /Users/(username)/Library/Arduino15/packages (you can find the exact location in Arduino IDE, under File/Preferences/"more preferences can be edited..." . Hopefully this will help someone else struggling with the same issue. @Pablo2048 - you seem to have a wonderful personality... Nevertheless, thank you for the reply :) |
The original issue here seems fixed (thread has wandered off-topic). Closing. |
@bogd, did you manage to do the install ? https://arduino-esp8266.readthedocs.io/en/latest/installing.html#using-git-version is more detailed: I realised that the stage version has to go in the sketchbook folder - not in the board manager folder. hope it helps |
@CRCinAU @d-a-v @josep112
Debug Output
|
Hi, I have the same issue with SDK 2.6.0 Regards, |
Its probably your code. Try looking at these examples - both with on http and https. |
I used the Arduino example sketch. |
@toribola This is a closed issue. |
Platform
Problem Description
I had hope that with core 2.4.2 my problem would be solved but I have the error in the update fimrware HTTP_UPDATE_FAILD Error (6), I already did the test on the same network and the problem only happens with servers outside, I already tested in many are all from my country, the ping is low but I can not solve any idea what I can do? I've already tried
ESPhttpUpdate.setHttpTimeout (16000); but without success, I'm using the example code
The text was updated successfully, but these errors were encountered: