-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Istio ingress: duplicate listener 0.0.0.0_8081 found #10160
Comments
Weird, the config clearly shows that What does the k8s service look like? Istio will use the targetPort defined for 80 on Envoy.
|
k8s service (targetPort appears to be 8080):
Here's my Istio operator config as well -- realized that might be relevant (although it's also mostly default):
|
Getting the same error while installing v0.19.0:
Because of this, rest of the ingress traffic also stops working since I have made the gateways on port 80. Without knative-serving, I have an entry there with 80 instead of 8081. 80 because unlike @jasonnance I have |
@howardjohn Any idea how to debug this? |
I think the issue is you have a Service for port 80 -> target 8081, a Gateway for 80 (which maps to 0.0.0.0_8081 due to targetPort) and a Gateway for 8081 (which maps to 0.0.0.0_8081 due to targetPort). Istio doesn't like this I guess. I recall the same issue before, not sure if we have solved it already in a newer version or if its an open issue in istio/istio. |
To clarify, its probably both a user error (not sure why you would want the above config - both Gateways should be port 80 probably) and an Istio bug (if user does it, we need to handle it gracefully) |
The ingress Gateway listens to 8080 and the matching k8s svc maps 80 -> 8080 (default Istio setup, nothing specific to Knative). Then, we have a (Knative) Gateway listen on 8081 and a matching k8s svc mapping 80 -> 8080. This should work and does work (that's what runs in the Knative E2E tests). I am not sure what is the issue in this particular scenario though. |
In the original issue:
These 3 are enough to trigger it, then you have two Gateways which both map to port 8081. I don't think its standard knative setup, which is likely why its not a more common issue. |
Why though?
Am I missing something? This is the new Knative setup and it should work. |
Ah, I think I missed part of it. The confusion is There is a single istio-ingressgateway deployment, which has two services. one of them maps port 80 to 8080 and the other maps port 80 to 8081. So far, no problem. Then we create a Gateway on port 80, which sets up listeners on port 8080 and 8081 (Maybe? I actually doubt this works, need to verify), all good Then we create a Gateway on port 80801, which sets up another listener on port 8081 (it shouldn't, but the logic is wrong and doesn't merge), which breaks |
Hmm, maybe this is another instance where Istio is not deterministic and picks just one port? This is worrying. This has been running fine in our E2E tests for the past month and we don't see this issue (both 1.7.x and 1.8.x) |
@JRBANCEL do you have the same setup with multiple services with different port setups in your e2e tests? I was under the impression the original issue has some customization not in the standard knative setup that was triggering it |
We install Istio with this profile: https://github.com/knative-sandbox/net-istio/blob/master/third_party/istio-stable/istio-ci-no-mesh.yaml And these are the additional Gateway and Service objects: |
Huh.. if you are not seeing issues then I may be mistaken. We will need to investigate this more on the Istio side |
istio/istio#29643 are similar issue on Istio tracker |
Can you check the implementation when you have a second because that is not what I am seeing. Fresh Istio 1.8.1 install with the profile linked above:
After installing the ingress Gateway:
After installing the local Gateway and Service:
Even when I delete the local Gateway and leave the matching Service, there is nothing on 8081:
|
For me, with all the knative components installed, it gives:
the above stays when I delete the
|
/assign @JRBANCEL Moving this off of the serving triage query, we should move these discussions to net-istio. |
Not sure it's helpful to root causing this but I just wanted to confirm that it does appear to be a timing issue (not deterministic). I worked around the problem by installing and waiting for istio to be ready first. |
@mjgallag hey just to check, what happens if you happen to delete istio and reinstall it again while knative-serving is running? |
@Shashankft9 I didn't get this issue, but it did cause knative issues. A non knative service I have routed thru istio worked fine again right after I reinstalled istio. As for my knative services, they returned |
I reported a minimal repro of this issue to Istio: istio/istio#31084 |
It also happens in my env today when update istio. It impacts http endpoint access from external. As LB forward http 80 traffic to istio gateway port 8080. But 8080 missing from istio listener. It seems like timing issue in istio. I workaround the issue by remove knative-local-gateway service in istio-system namespace.
|
This should be fixed. in istio by istio/istio@ae8b0e2 |
Looks like this may be fixed in Istio. /close |
@evankanderson: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
It seems istio/istio@ae8b0e2 did not fix the issue. |
Quick update, istio/istio#33021 should fix the issue. |
Related: knative-extensions/net-istio#636 We'll need to pull in the next 1.9.x patch release when it's out |
We're pulling in the latest patches now - knative-extensions/net-istio#699 |
I can confirm this issue exists in istio 1.9.6. kubernetes version 1.20.7 |
@houshym do you have the following https://github.com/knative-sandbox/net-istio/pull/636/files experimental.istio.io/disable-gateway-port-translation: "true" |
@dprotaso I don't have. should I add it? |
According to that PR having that label on the gateway (with istio 1.9.6) should activate that functionality which supposedly fixes the behaviour. Hence why I was saying that should fix the issue for Knative's installation of Istio. |
Let me know if it doesn't - then maybe we should reach out to some Istio folks. I think for now we can close this issue - ok ... I can't transfer to another org :( |
/area networking
What version of Knative?
0.19.x
Expected Behavior
Istio ingress gateway with provided knative-istio-controller configuration exposes Knative services consistently.
Actual Behavior
After a Knative service is added to the knative-local-gateway, the istio-ingressgateway pod reports the following error, and the ingress never comes online:
Istio listener config:
This is running on a "toy" dev cluster which gets spun up and torn down each day and has all state managed using GitOps via Flux. Twice now, after tweaking a bunch of random stuff (ports, deleting/recreating gateways, etc), I've gotten the ingress into a working state, but when the cluster comes back up the following day with the same config, it's broken again.
When it works, the listener config looks like this:
As best I can tell, Istio is incorrectly merging the two gateways (default istio-ingressgateway and knative-local-gateway), but I'm not familiar enough with Istio/Knative Serving or their intersection to understand whether this is a problem with Knative's use of Istio or an Istio bug.
Steps to Reproduce the Problem
k8s 1.17
Istio 1.7.4
knative-istio-controller.yaml (relevant sections only, should be all default):
Knative service:
Gist with partial Istio proxy config dump showing the duplicate listeners in the failing state and the correct listeners in the working state (again, both states stemming from the same config shown above): https://gist.github.com/jasonnance/885e9772370ac6e46924844646597943
This is part of a more complex workflow involving Knative Eventing, so let me know if I've left out anything relevant.
Thanks!
The text was updated successfully, but these errors were encountered: