-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Client ends HTTP TLS session with RST #6477
Comments
The expected FIN->FIN->ACK sequence appears to occur when the docker container is started inside of a virtual machine, for example in a RST occurs when the docker container is started directly on the host, both Ubuntu 20.04 amd64 and MacOS M1 arm64 host. I see a similar RST behavior for gRPC client https://github.com/marcindulak/grpc-client-tcp-rst, for cleartext HTTP2 (h2c). |
Caddy itself isn't doing anything this low level at the TCP layer. You'll probably want to report this on https://github.com/golang/go if you think it's an issue. I don't understand why you think it is an issue though. |
So the difference in behavior is whether the container is started on the host or in a VM? And with the VM setup, the connection is routed into the VM and into the container? I do agree though, that we don't have any TCP-specific code in our code base, and this is probably something to report to Go instead, if there's a bug. Thanks! We can reopen if this is wrong. |
Yes there is a difference between starting the container on a host, or in a vm on the same host. With an installation of docker inside of a VM, using the steps 1-5, I get no RST. The connection is made from the host into the container over ssh, and the steps 1-5 performed in the VM. After seeing this, as another attempt, on the host, killed all open browsers and disconnected the network, still got RST from containers started on the host. RST is not expected, unless someone says "yes, we are doing RST explicitly instead of FIN" for resource usage optimization or other purposes. I'm looking for a smaller example, but until now what I found is caddy and gRPC (both Golang (RST sometimes) and Python (RST probably always)). |
The client ends HTTP TLS session with RST, instead of TCP FIN/FIN/ACK.
First, let me say that I'm not sure this a problem with caddy. I reproduce the problem using curl 8.9.0 and GNU Wget 1.24.5 as clients, against caddy v2.8.4 h1:q3pe0wpBj1OcHFZ3n/1nl4V4bxBrYoSoab7rL9BMYNk= as the server. I don't see the problem against nginx/1.27.0 as the server. The host is an M1 MacOS arm64.
To reproduce
Result
Here is the packet sequence from caddy as the server, read with
docker exec -it caddy sh -c "tshark -r test.pcapng"
Note that last RST packet
Here is the corresponding packet sequence from nginx as the server.
The problem with ending RST is also present for HTTP2.
The pcapng files are attached.
Contain RST, curl/wget request to caddy
http2.pcapng.gz
http1.1.pcapng.gz
http1.1wget.pcapng.gz
Without RST, curl request to nginx
http1.1nginx.pcapng.gz
The text was updated successfully, but these errors were encountered: