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

Envoy always got remote_reset on HTTP/2 with Microsoft-IIS/10.0 #32869

Closed
mrnonz opened this issue Mar 13, 2024 · 6 comments
Closed

Envoy always got remote_reset on HTTP/2 with Microsoft-IIS/10.0 #32869

mrnonz opened this issue Mar 13, 2024 · 6 comments
Labels
area/http investigate Potential bug that needs verification stale stalebot believes this issue/PR has not been touched recently

Comments

@mrnonz
Copy link

mrnonz commented Mar 13, 2024

Title: Envoy always got remote reset on HTTP/2 with Microsoft-IIS/10.0

Description:

I try to use envoy upstream to partner Microsoft-IIS/10.0 and got remote reset error and every thing work fine when I disabled http2 on alpn.

Please help me read trace log and find this problem.

Envoy: v1.29.2
TLSv1.2

My traffic like curl -(HTTP http/1.1)-> envoy -(TLS http/2) -> Microsoft-IIS will fail.
but for curl -(TLS http/2) -> Microsoft-IIS will success.

Here my config on envoy

         {
            "dns_lookup_family": "V4_ONLY",
            "load_assignment": {
               "cluster_name": "upstream",
               "endpoints": [
                  {
                     "lb_endpoints": [
                        {
                           "endpoint": {
                              "address": {
                                 "socket_address": {
                                    "address": "partner.com",
                                    "port_value": 443
                                 }
                              }
                           }
                        }
                     ]
                  }
               ]
            },
            "name": "partner.com",
            "respect_dns_ttl": true,
            "transport_socket": {
               "name": "envoy.transport_sockets.tls",
               "typed_config": {
                  "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext",
                  "common_tls_context": {
                     "alpn_protocols": "h2", // After change this to http/1.1 request will success
                     "tls_params": {
                        "tls_maximum_protocol_version": "TLSv1_3",
                        "tls_minimum_protocol_version": "TLSv1_2"
                     },
                     "validation_context": {
                        "match_typed_subject_alt_names": [
                           {
                              "matcher": {
                                 "exact": "partner.com"
                              },
                              "san_type": "DNS"
                           }
                        ],
                        "trusted_ca": {
                           "filename": "/etc/ssl/certs/ca-certificates.crt"
                        }
                     }
                  },
                  "sni": "partner.com"
               }
            },
            "type": "LOGICAL_DNS",
            "typed_extension_protocol_options": {
               "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": {
                  "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions",
                  "auto_config": { },
                  "common_http_protocol_options": {
                     "idle_timeout": {
                        "seconds": 10
                     },
                     "max_connection_duration": {
                        "seconds": 3600
                     }
                  }
               }
            }
         },

and I attached success log of http/1.1 and fail log http/2 as well.
success-http1.1.log
fail-h2.log

@mrnonz mrnonz added the triage Issue requires triage label Mar 13, 2024
@nezdolik nezdolik added area/http investigate Potential bug that needs verification and removed triage Issue requires triage labels Mar 13, 2024
@nezdolik
Copy link
Member

cc @alyssawilk @RyanTheOptimist

@alyssawilk
Copy link
Contributor

if Envoy is getting a remote reset, IIS is resetting and you need to look at logs there. The most common failure mode here AFIK is having scheme not match crypto (e.g. https scheme over cleartext.

@mrnonz
Copy link
Author

mrnonz commented Mar 19, 2024

But when I try to curl to IIS everything look good, even when open on Chrome, Safari browser good as well.

I don't know why that happen and I request partner to turn HTTP2 off.

@wtzhang23
Copy link
Contributor

wtzhang23 commented Mar 20, 2024

Tangentially related but I'm currently having issues where when Envoy upgrades plaintext connections to https. Envoy seems to use the downstream :scheme/xff/downstream connection to infer the scheme. This can cause problems with HTTP2 servers that validate whether the scheme pseudo-header matches the transport layer protocol (example).

Stuff I haven't verified but looked into while digging (still personally looking for ways to address this in the VHDS service in a per-route basis):

  • If your operation applies globally to the HttpConnectionManager, the scheme header transformation configuration might work?
  • Otherwise, header mutation rules enabling allow_all_routing might work? Seems like this is only for the ExternalProcessor filter

Copy link

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Apr 19, 2024
Copy link

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/http investigate Potential bug that needs verification stale stalebot believes this issue/PR has not been touched recently
Projects
None yet
Development

No branches or pull requests

4 participants