Skip to content
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

nginx info:client prematurely closed connection #638

Open
delleceste opened this issue Apr 11, 2022 · 0 comments
Open

nginx info:client prematurely closed connection #638

delleceste opened this issue Apr 11, 2022 · 0 comments

Comments

@delleceste
Copy link

Hello.
I Use QNetworkAccessManager / QNetworkRequest / QNetworkReply to post a get on a subscriber channel.
By default, the connection is keep alive, but the info message does not change even if I set Connection: close in the header (and in that case, I unexpectedly still receive updates on the channel).
When I decide to quit the application, I close the initial request. From nginx point of view, I am closing a keep alive request prematurely, indeed before receiving one "last" message that finishes the initial request.
I can't find a proper solution to the issue, maybe You have a suggestion.

Sniffing the traffic:

14:01:53.170542 IP 172.20.0.54.59144 > 192.168.205.25.8001: Flags [P.], seq 1:194, ack 1, win 502, options [nop,nop,TS val 1347969617 ecr 3518348859], length 193
E....@@.=.o....6.......A.L.p.=.......$.....
PXbQ...;GET /sub/rchans HTTP/1.1
Host: taeyang.elettra.eu:8001
Accept: text/event-stream
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
Accept-Language: en-US,*
User-Agent: Mozilla/5.0

14:01:53.170822 IP 192.168.205.25.8001 > 172.20.0.54.59144: Flags [P.], seq 1:151, ack 194, win 508, options [nop,nop,TS val 3518348898 ecr 1347969617], length 150
E...T;@[email protected]...=...L.1....:......
...bPXbQHTTP/1.1 200 OK
Server: nginx/1.21.6
Date: Mon, 11 Apr 2022 12:01:53 GMT
Content-Type: text/event-stream; charset=utf-8
Connection: keep-alive

and also the communication close handshake seems to be fine:

14:01:57.224460 IP 172.20.0.54.59144 > 192.168.205.25.8001: Flags [F.], seq 194, ack 1336, win 501, options [nop,nop,TS val 1347973669 ecr 3518351726], length 0

14:01:57.224716 IP 192.168.205.25.8001 > 172.20.0.54.59144: Flags [F.], seq 1336, ack 195, win 508, options [nop,nop,TS val 3518352952 ecr 1347973669], length 0
E..4T?@[email protected]...=...L.2....:3.....
...8PXr%
14:01:57.266741 IP 172.20.0.54.59144 > 192.168.205.25.8001: Flags [.], ack 1337, win 501, options [nop,nop,TS val 1347973713 ecr 3518352952], length 0
E..4.F@.=.pq...6.......A.L.2.=.............
PXrQ...8

NGINX logs:

2022/04/11 14:01:57 [info] 4092415#0: *366 client prematurely closed connection, client: 172.20.0.54, server: taeyang.elettra.eu, request: "GET /sub/rchans HTTP/1.1", host: "taeyang.elettra.eu:8001"

Kind regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant