-
Issue submitter TODO list
Describe the bug (actual behavior)Kafka UI is not rendered. Host responds with 502 Error code. Expected behaviorKafka UI is rendered Your installation details
# values.yaml
yamlApplicationConfig:
kafka:
clusters:
- name: bazz
bootstrapServers: kafka-headless:9092
ingress:
enabled: true
annotations:
external-dns.alpha.kubernetes.io/hostname: kafka-ui.foo.bar
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
host: kafka-ui.foo.bar
ingressClassName: nginx
nodeSelector:
role: runners
Steps to reproduce
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html> ScreenshotsNo response Logs>kubectl get svc --namespace kafka
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
kafka ClusterIP xxxxxx <none> 9092/TCP
kafka-headless ClusterIP None <none> 9092/TCP,9094/TCP,9093/TCP
kafka-kafka-ui ClusterIP xxxxxx <none> 80/TCP
>kubectl get ingress --namespace kafka
NAME CLASS HOSTS ADDRESS PORTS
kafka-kafka-ui nginx kafka-ui.foo.bar xxx 80
>kubectl get pods --namespace kafka
NAME READY STATUS RESTARTS
kafka-0 1/1 Running 0
kafka-kafka-ui-86d9dfc595-vggzp 1/1 Running 0 >kubectl logs kafka-kafka-ui-86d9dfc595-vggzp --namespace kafka | tail
Kubeconfig user entry is using deprecated API version client.authentication.k8s.io/v1alpha1. Run 'aws eks update-kubeconfig' to update.
2023-05-19 15:14:44,704 DEBUG [parallel-2] c.p.k.u.s.ClustersStatisticsScheduler: Start getting metrics for kafkaCluster: bazz
2023-05-19 15:14:44,710 DEBUG [parallel-1] c.p.k.u.s.ClustersStatisticsScheduler: Metrics updated for cluster: bazz
2023-05-19 15:15:14,704 DEBUG [parallel-2] c.p.k.u.s.ClustersStatisticsScheduler: Start getting metrics for kafkaCluster: bazz
2023-05-19 15:15:14,711 DEBUG [parallel-1] c.p.k.u.s.ClustersStatisticsScheduler: Metrics updated for cluster: bazz
2023-05-19 15:15:44,704 DEBUG [parallel-2] c.p.k.u.s.ClustersStatisticsScheduler: Start getting metrics for kafkaCluster: bazz
2023-05-19 15:15:44,710 DEBUG [parallel-1] c.p.k.u.s.ClustersStatisticsScheduler: Metrics updated for cluster: gamma-events
2023-05-19 15:16:14,704 DEBUG [parallel-2] c.p.k.u.s.ClustersStatisticsScheduler: Start getting metrics for kafkaCluster: bazz
2023-05-19 15:16:14,711 DEBUG [parallel-1] c.p.k.u.s.ClustersStatisticsScheduler: Metrics updated for cluster: bazz
2023-05-19 15:16:44,704 DEBUG [parallel-2] c.p.k.u.s.ClustersStatisticsScheduler: Start getting metrics for kafkaCluster: bazz
2023-05-19 15:16:44,710 DEBUG [parallel-1] c.p.k.u.s.ClustersStatisticsScheduler: Metrics updated for cluster: bazz Additional contextAll cluster resources are up and running fine. From pod to ingress. And Bootstrap servers were successfully reached. No port mapping was overridden, all defaults are in use. I postulate it shouldn't be the issue root cause. a forwarding from ingress -> service -> pod look on point. No error logged by the container when hitting the endpoint |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Hello there exaucae! 👋 Thank you and congratulations 🎉 for opening your very first issue in this project! 💖 In case you want to claim this issue, please comment down below! We will try to get back to you as soon as we can. 👀 |
Beta Was this translation helpful? Give feedback.
-
I suggest looking closer into your infra, it's not like it's possible to anyone to look into your infra with k8s and helm |
Beta Was this translation helpful? Give feedback.
-
I've checked the infra before drafting #3847. It sure costs me nothing do that again : ) Meanwhile I've got this interesting log in the kafka-ui container. It appears when I hit the host URL I'm curious about how it can try to decode something when I open a URL in the browser. Perphaps it failed to get something from the Kafka cluster? 2023-05-20 12:16:14,698 WARN [reactor-http-epoll-2] r.n.h.s.HttpServerOperations: [afd40da4, L:/192.168.44.214:8080 - R:/192.168.88.213:52156] Decoding failed: FULL_REQUEST(decodeResult: failure(java.lang.IllegalArgumentException: text is empty (possibly HTTP/0.9)), version: HTTP/1.0, content: UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf(ridx: 0, widx: 0, cap: 0))
64
GET /bad-request HTTP/1.0
63
2023-05-20 12:16:14,704 WARN [reactor-http-epoll-3] r.n.h.s.HttpServerOperations: [ec664d1d, L:/192.168.44.214:8080 - R:/192.168.88.213:52160] Decoding failed: FULL_REQUEST(decodeResult: failure(java.lang.IllegalArgumentException: Invalid separator), version: HTTP/1.0, content: UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf(ridx: 0, widx: 0, cap: 0))
62
GET /bad-request HTTP/1.0
61
2023-05-20 12:16:14,709 WARN [reactor-http-epoll-4] r.n.h.s.HttpServerOperations: [66920159, L:/192.168.44.214:8080 - R:/192.168.88.213:52172] Decoding failed: FULL_REQUEST(decodeResult: failure(java.lang.IllegalArgumentException: text is empty (possibly HTTP/0.9)), version: HTTP/1.0, content: UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf(ridx: 0, widx: 0, cap: 0))
60
GET /bad-request HTTP/1.0
59
2023-05-20 12:16:14,999 WARN [reactor-http-epoll-1] r.n.h.s.HttpServerOperations: [9c907dd1, L:/192.168.44.214:8080 - R:/192.168.88.213:52188] Decoding failed: FULL_REQUEST(decodeResult: failure(java.lang.IllegalArgumentException: text is empty (possibly HTTP/0.9)), version: HTTP/1.0, content: UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf(ridx: 0, widx: 0, cap: 0))
58
GET /bad-request HTTP/1.0
57
2023-05-20 12:16:15,010 WARN [reactor-http-epoll-2] r.n.h.s.HttpServerOperations: [5c60f01e, L:/192.168.44.214:8080 - R:/192.168.88.213:52196] Decoding failed: FULL_REQUEST(decodeResult: failure(java.lang.IllegalArgumentException: text is empty (possibly HTTP/0.9)), version: HTTP/1.0, content: UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf(ridx: 0, widx: 0, cap: 0))
56
GET /bad-request HTTP/1.0
55
2023-05-20 12:16:15,016 WARN [reactor-http-epoll-3] r.n.h.s.HttpServerOperations: [93a3c128, L:/192.168.44.214:8080 - R:/192.168.88.213:52198] Decoding failed: FULL_REQUEST(decodeResult: failure(java.lang.IllegalArgumentException: text is empty (possibly HTTP/0.9)), version: HTTP/1.0, content: UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf(ridx: 0, widx: 0, cap: 0))
54
GET /bad-request HTTP/1.0 |
Beta Was this translation helpful? Give feedback.
-
Here's a positive update, @Haarolean : the issue is fixed. It was due a misconfiguration in the ingress backend protocol. I had it to HTTPS (see values.yml above) but kafka backend service wasn't set up for HTTPS. Reverting to HTTP backend protocol was enough. Although a better fix would be to setup kafka-ui more securely. In the debugging process, I found the meaning of the logs I was referring to in my previous comment. It translates to this:
In hope it helps someone else. Finally, at this very place of showingServer errors, it my be useful to have a console.log. Sometimes, you don't have direct access to the cluster. But the browser logs can help you quickstart the debugging in the right way. |
Beta Was this translation helpful? Give feedback.
Here's a positive update, @Haarolean : the issue is fixed. It was due a misconfiguration in the ingress backend protocol. I had it to HTTPS (see values.yml above) but kafka backend service wasn't set up for HTTPS. Reverting to HTTP backend protocol was enough. Although a better fix would be to setup kafka-ui more securely.
In the debugging process, I found the meaning of the logs I was referring to in my previous comment. It translates to this:
In hope it helps someone else.
Finally, at this very place of showingSer…