Skip to content

ESP8266httpUpdate.update() incompatible with nginx #1157

Closed
@skandragon

Description

@skandragon

I am attempting to perform an upgrade from a server running nginx, and am having no real luck. It appears only some of the data is being transferred to the ESP, and I'm quite sure it's not a problem with nginx:

10.42.0.47 - - [06/Dec/2015:03:42:40 +0000] "GET /explorer/esp.bin HTTP/1.1" 200 69819 "-" "ESP8266-http-Update"
10.42.0.47 - - [06/Dec/2015:03:43:10 +0000] "GET /explorer/esp.bin HTTP/1.1" 200 28939 "-" "ESP8266-http-Update"
10.42.0.47 - - [06/Dec/2015:03:47:26 +0000] "GET /explorer/esp.bin HTTP/1.1" 200 71279 "-" "ESP8266-http-Update"
10.42.0.47 - - [06/Dec/2015:03:52:02 +0000] "GET /explorer/esp.bin HTTP/1.1" 200 28939 "-" "ESP8266-http-Update"
10.42.0.47 - - [06/Dec/2015:05:32:51 +0000] "GET /explorer/esp.bin HTTP/1.1" 200 228000 "-" "ESP8266-http-Update"
10.42.0.47 - - [06/Dec/2015:05:33:43 +0000] "GET /explorer/esp.bin HTTP/1.1" 200 202679 "-" "ESP8266-http-Update"
10.42.0.47 - - [06/Dec/2015:05:34:43 +0000] "GET /explorer/esp.bin HTTP/1.1" 200 28939 "-" "ESP8266-http-Update"
10.42.0.47 - - [06/Dec/2015:05:41:08 +0000] "GET /explorer/esp.bin HTTP/1.1" 200 28939 "-" "ESP8266-http-Update"

Here's a tcpdump of the last connection shown:

05:41:08.622315 IP 10.42.0.47.4099 > 10.42.120.1.80: Flags [S], seq 16134, win 5840, options [mss 1460], length 0
05:41:08.622364 IP 10.42.120.1.80 > 10.42.0.47.4099: Flags [S.], seq 2641987090, ack 16135, win 29200, options [mss 1460], length 0
05:41:08.624701 IP 10.42.0.47.4099 > 10.42.120.1.80: Flags [.], ack 1, win 5840, length 0
05:41:08.626063 IP 10.42.0.47.4099 > 10.42.120.1.80: Flags [P.], seq 1:341, ack 1, win 5840, length 340
05:41:08.626097 IP 10.42.120.1.80 > 10.42.0.47.4099: Flags [.], ack 341, win 30016, length 0
05:41:08.626264 IP 10.42.120.1.80 > 10.42.0.47.4099: Flags [.], seq 1:1461, ack 341, win 30016, length 1460
05:41:08.626293 IP 10.42.120.1.80 > 10.42.0.47.4099: Flags [.], seq 1461:2921, ack 341, win 30016, length 1460
05:41:08.626323 IP 10.42.120.1.80 > 10.42.0.47.4099: Flags [.], seq 2921:4381, ack 341, win 30016, length 1460
05:41:08.626343 IP 10.42.120.1.80 > 10.42.0.47.4099: Flags [.], seq 4381:5841, ack 341, win 30016, length 1460
05:41:08.631852 IP 10.42.0.47.4099 > 10.42.120.1.80: Flags [.], ack 2921, win 2920, length 0
05:41:08.634229 IP 10.42.0.47.4099 > 10.42.120.1.80: Flags [.], ack 5841, win 0, length 0
05:41:08.730753 IP 10.42.0.47.4099 > 10.42.120.1.80: Flags [.], ack 5841, win 5840, length 0
05:41:08.730778 IP 10.42.120.1.80 > 10.42.0.47.4099: Flags [P.], seq 5841:7301, ack 341, win 30016, length 1460
05:41:08.730789 IP 10.42.120.1.80 > 10.42.0.47.4099: Flags [.], seq 7301:8761, ack 341, win 30016, length 1460
05:41:08.730799 IP 10.42.120.1.80 > 10.42.0.47.4099: Flags [.], seq 8761:10221, ack 341, win 30016, length 1460
05:41:08.730807 IP 10.42.120.1.80 > 10.42.0.47.4099: Flags [P.], seq 10221:11681, ack 341, win 30016, length 1460
05:41:08.730814 IP 10.42.0.47.4099 > 10.42.120.1.80: Flags [F.], seq 341, ack 5841, win 5840, length 0
05:41:08.734321 IP 10.42.0.47.4099 > 10.42.120.1.80: Flags [R.], seq 342, ack 7301, win 5840, length 0
05:41:08.735513 IP 10.42.0.47.4099 > 10.42.120.1.80: Flags [R.], seq 341, ack 8761, win 5840, length 0
05:41:08.735533 IP 10.42.0.47.4099 > 10.42.120.1.80: Flags [R.], seq 341, ack 10221, win 5840, length 0
05:41:08.737900 IP 10.42.0.47.4099 > 10.42.120.1.80: Flags [R.], seq 341, ack 11681, win 5840, length 0

It works exactly once after a fresh reboot, but subsequent upgrade attempts fail even if that one succeeds.

I've attached a working tcpdump to https://gist.github.com/skandragon/47d4769ff988a3e1ce65 rather than put it inline here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions