-
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
[httpUpdate] Update.writeStream failed! (ERROR[6]: Stream Read Timeout) #1676
Comments
do your server have some sort of buffering the output of the php script? |
I am uncertain of any buffering, when I download the bin file via the PHP script in a normal web browser it works fine and is fast. I will try an internal server on my LAN to see if there is a difference. |
OK I tried tonight to to a OTA http upgrade but placed the PHP script and bin file on a server in my local LAN. Worked fine. Before I was trying to do the same with my webhost's server, which I believe to be a more reasonable use case as it is very beneficial to update code from "the cloud" as opposed to a local server for many people. Now that it has been determined that there is a difference between the two, what can I do to figure out how to address the problem? Connecting to XXSSIDXXX WiFi connected. ets Jan 8 2013,rst cause:2, boot mode:(3,6) load 0x4010f000, len 1264, room 16 |
the best way it to use wire shark and checkt what the difference is in case of |
So I fired up a private virtual server at DigitalOcean, ran the same php script there and it works fine. Still getting stream read timeout when trying to do the same thing from my web host (Dreamhost). How can I go about figuring out what Dreamhost is doing differently? |
Well I have taken a wireshark trace of a good update to the DigitalOcean server, as well as an update that failed to the Dreamhost server with the stream read timeout error despite the file tranfer being successful. The trace was taken by port mirroring my router's WAN port and filtering with the IP of the web server hosting the php script and .bin file. To me both traces look pretty normal so I am not sure what is causing the failure on the esp8266 end. I am attaching the traces in case anyone can help. |
I have been experiencing the same issue when trying to upload the exact same binary that was already running on the chip. All other binaries work fine from my "cheap" webspace... |
Hmm. In my case the file being uploaded to the esp8266 is a different binary than what it is currently running, just a "hello world" for testing the process. |
Facing same issue while using nginx reverse proxy. |
@scottfuhrman @jdkanani Could you guys give me a link to the binary which fails to load (Dreamhost or nginx reverse proxy)? I'll test it on my side. Thanks. |
Hi @igrr, Same timeout issue: Here is my binary from a git release served via a PHP script: http://lab.megni.co.uk/esp/firmware.php?tag=0 I'm following the continuous testing and deployment workflow detailed here to build and deploy update from git release: http://blog.squix.org/2016/06/esp8266-continuous-delivery-pipeline-push-to-production.html The PHP script I'm running is in the Here is the update function: Server is apache running locally so timeout should not be an issue. Could be a simple fix of increasing the timeout of the request? |
Any progress on this? Could a bounty source be assigned? Is the same issue reported here? #1177 |
I'm getting this a lot at the moment and not exactly sure why..
|
Hi any update¿¿ I keep on getting this error. I have tried with local webservers in a raspberry pi , and using windows 10. Can it have a relation with using Php? Thanks |
The Stream Read Timeout started occurring again for me when upgrading from 2.4.0-rc2 to 2.4.0. However, OTA works when using lwIP v1.4 Prebuilt. Was lwIP v1.4 Prebuilt default in 2.4.0-rc2? OTA upgrade attempts with lwIP v2 Prebuilt (MSS536): 1 success, 9 fail (stream read timeout) thanks |
I have the same problem with wemos d1 mini and wemos d1 minipro boards and esp8266 2.4.0. adding some more debug in ESP8266httpUpdate.cpp as: I get: when I activate debug on update: For what I understand the problem is Update.writeStream(in) return 1 |
I'm also having the same problem since switching to 2.4.0 and lwIP v2 Prebuilt. After recompiling with wIP v1.4 Prebuilt OTA updates are working once again every time so lwIP v2 seems to has a serious bug effecting OTA. |
Please retry with latest git master and report. |
The last git work sometimes but do not solve for me. |
There is a new release of LWIP: |
I can give it it a go, whats the easiest way to compile my ESP8266 sketch with the new version of LWIP? |
It is a new release of our SDK. esp8266/Arduino (what we call the core here) uses the esp8266 on top of the espressif's esp8266-NonOS-SDK v2.1(+some commits), and v2.2 has just been just released. |
Ok thanks D.A.V I will wait for the 2.4.1 core release then. The IwIPv 1.4 although has stable OTA it cannot handle my with WebGUI running within my EPS8266 project so I will keep using IwIPv v2 and put up with having to run OTA updates a few times before it works. |
$15 bounty placed on fixing this. |
I cannot get deterministic response ... After this pull request #4365 There is no deterministic difference in behavior with lwip-v2 "Higher Bandwidth". I come back to use 2.3.0 |
I can confirm with IwIp v2 on SDK 2.4.0 fails with the stream error. I was puzzled by it when I found this open issue here. |
Please retest with release 2.4.1. There are known socket issues with 2.4.0. |
In order to narrow the issue, please confirm using:
otherwise (if git can't be available in your setup):
|
using git updated to 19/03/2018 and lwip-v2 "higher bandwidth" seems to work well ! |
sorry, there is a mistake in my previous message; should be: |
Thanks for this feedback ! The "lower memory" test was the next question :) |
Getting ERROR[6]: Stream Read Timeout - on both 3 variants = v1.4 Higher Bandwidth, v2 Lower Memory and v2 Higher Bandwidth |
Getting ERROR[6]: Stream Read Timeout on all variants, none of them seems to be working ? |
You can try this #include <Update.h> client.setTimeout(5); Will Done ~ ^^ |
Using the latest from Git, downloaded this morning.
Trying to do a http update, I always receive the error below. This is with using the example PHP script on the web server. When I fetch the file directly (not using the PHP server-side script), it works fine.
[httpUpdate] Update.writeStream failed! (ERROR[6]: Stream Read Timeout)
Confirmed I have 4M flash, tried using Arduino IDE 1.6.7 and 1.6.8 (nightly). Same result.
Debug output below:
1264, room 16
tail 0
chksum Booting...
Connecting to XXXXXX
wifi evt: 0
wifi evt: 3
WiFi connected.
[HTTP-Client][begin] host: XXXXXX port:80 url: /esp8266/upgrade_check.php https: 0 httpsFingerprint:
[HTTP-Client] connect http...
[hostByName] request IP for: XXXXXX
[hostByName] Host: XXXXXX IP: xx.xx.xx.xx
[HTTP-Client] connected to XXXXXX:80
[HTTP-Client][handleHeaderResponse] RX: 'HTTP/1.1 200 OK'
[HTTP-Client][handleHeaderResponse] RX: 'Date: Wed, 24 Feb 2016 16:27:29 GMT'
[HTTP-Client][handleHeaderResponse] RX: 'Server: Apache'
[HTTP-Client][handleHeaderResponse] RX: 'Content-Disposition: attachment; filename=prod_code.bin'
[HTTP-Client][handleHeaderResponse] RX: 'x-MD5: 64d43986a1e128adf07350b67441a6aa'
[HTTP-Client][handleHeaderResponse] RX: 'Content-Length: 208016'
[HTTP-Client][handleHeaderResponse] RX: 'MS-Author-Via: DAV'
[HTTP-Client][handleHeaderResponse] RX: 'Connection: close'
[HTTP-Client][handleHeaderResponse] RX: 'Content-Type: application/octet-stream'
[HTTP-Client][handleHeaderResponse] RX: ''
[HTTP-Client][handleHeaderResponse] code: 200
[HTTP-Client][handleHeaderResponse] size: 208016
[httpUpdate] Header read fin.
[httpUpdate] Server header:
[httpUpdate] - code: 200
[httpUpdate] - len: 208016
[httpUpdate] - MD5: 64d43986a1e128adf07350b67441a6aa
[httpUpdate] ESP8266 info:
[httpUpdate] - free Space: 749568
[httpUpdate] - current Sketch Size: 296276
[httpUpdate] - current version: 1.1
[httpUpdate] runUpdate flash...
[begin] roundedSize: 0x00033000 (208896)
[begin] updateEndAddress: 0x00100000 (1048576)
[begin] currentSketchSize: 0x00049000 (299008)
[begin] _startAddress: 0x000CD000 (839680)
[begin] _currentAddress: 0x000CD000 (839680)
[begin] _size: 0x00032C90 (208016)
ERROR[6]: Stream Read Timeout
[httpUpdate] Update.writeStream failed! (ERROR[6]: Stream Read Timeout)
[httpUpdate] Update failed
[HTTP-Client][end] tcp is closed
HTTP_UPDATE_FAILD Error (6): Update error: ERROR[6]: Stream Read Timeout
Any ideas?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: