-
Notifications
You must be signed in to change notification settings - Fork 347
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
Multiple Gateway listeners with different hostnames and same certificate not working in a browser session #2675
Comments
Does this perhaps involve HTTP/2 connection coalescing by the browser? |
hey @jaynis would help if you shared
|
This was what I meant with "connection sharing / reuse". I further looked into this and I think the HTTP/2 connection coalescing in conjunction with my TLS certificate, which is valid / has SANs for both hosts ( Envoy creates two listeners, one for each host and as my certificate is valid for both hosts, it can be used for each of the listeners. Now, when a request is sent to @arkodg I will try to provide the access logs as per your request later, but this is how the debug log of a failing request looks like:
My apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: foo-example # bar-example on the other route
namespace: default
spec:
hostnames:
- foo.example.com # bar.example.com on the other route
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: envoy-gateway-https
namespace: default
rules:
- backendRefs:
- group: ""
kind: Service
name: foo-service # bar-service on the other route
port: 8080
weight: 1
matches:
- path:
type: PathPrefix
value: / |
ah you're hitting envoyproxy/envoy#6767
Since you are also specifying the |
Yes that sounds pretty much like what I experience. Thank you for referencing that. Another workaround would be to use separate certificates per listener but as one is not always in control of the certificates I guess your suggestion is a bit more practical 👍 . |
Can we move this to backlog @arkodg ? |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. |
I have configured two listeners on a
Gateway
for two different (sub)domains, e.g.foo.example.com
andbar.example.com
:If I try to reach
foo.example.com
orbar.example.com
with a CLI tool such ascurl
both domains are working fine and the desired content is correctly served. However, if I try to do the same from within a browser session with Chrome or Firefox, only one of both is working and the other one responds with 404's. Which one is working and which one not depends on the order in which I attempt to reach it: If I open Chrome and navigate tofoo.example.com
the desired content is served correctly, but if I go tobar.example.com
afterwards I receive a 404. If I close the browser and open it again and this time first navigate tobar.example.com
it is correctly served and subsequent requests tofoo.example.com
receive 404's. Therefore I assume this might have something to do with connection sharing / reuse, but this is only a wild guess.In the envoy debug logs I can see the failing request and the reason for the 404 seems to be a problem with the route matching:
If I remove the
hostname
constraint from theGateway
entirely, all domains are working fine as well as withcurl
as in a browser session.The text was updated successfully, but these errors were encountered: