Linkerd-proxy rewrites host destionation port from 8084 to 80, making the request fail #4902
-
I am using Pomerium (an authentication proxy) to authenticate access to linkerd-web. Linkerd-web exposes HTTP on port 8084. Without linkerd injection enabled in the pomerium namespace, things work fine. When I enable injection, linkerd-web is no longer reachable from my ingress. After a 90+ message debugging session with the lovely @Matei207, we were able to track down the issue to this:
Linkerd-proxy rewrites the host address to port 80, from 8084. This sounds like a bug. ReproductionTo reproduce this setup a pod/service in a linkerd enabled namespace that both expose their http service on a port different from 80. Then simply send a request to the service. Enable debug and you will see something like:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Hi, I was on slack with @toonsevrin and we couldn't reach a conclusion to the issue. It seems that the port is re-written to 80, the services had the correct ports listed in the spec and from what I have seen there isn't an issue with the headers. The request went from an ingress to the pomerium-proxy and finally to linkerd-web. I've attached some logs below.
|
Beta Was this translation helpful? Give feedback.
-
We're not rewriting the port, take a look at: This means that it is destined for You'll either want to correct the host or use |
Beta Was this translation helpful? Give feedback.
-
I see so if I'm correct the HOST header should be set to linkerd-web.linkerd:8084 on the HTTP request by the client? Seems like I should create a PR in Pomerium and not here 👍 |
Beta Was this translation helpful? Give feedback.
We're not rewriting the port, take a look at:
"authority": "linkerd-web.linkerd"
This means that it is destined for
linkerd-web.linkerd:80
. If the port isn't included in authority, it is assumed to be the default (80).You'll either want to correct the host or use
l5d-dst-override
.