provectus / kafka-ui

Open-Source Web UI for Apache Kafka Management
Apache License 2.0
9.74k stars 1.18k forks source link

Cannot Connect to IBM Event Streams #2465

Closed KyriacosP closed 2 years ago

KyriacosP commented 2 years ago

Describe the bug I'm trying to connect to an IBM Event Streams instance (IBMs managed kafka) using kafka-ui. I'm using docker compose to connect with this configuration:

---
version: '2'
services:

  kafka-ui:
    container_name: kafka-ui
    image: provectuslabs/kafka-ui:latest
    ports:
      - 8080:8080
    environment:
      KAFKA_CLUSTERS_0_NAME: sandbox
      KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: <multible brokers>
      KAFKA_CLUSTERS_0_PROPERTIES_SECURITY_PROTOCOL: SASL_SSL
      KAFKA_CLUSTERS_0_PROPERTIES_SASL_MECHANISM: PLAIN
      KAFKA_CLUSTERS_0_PROPERTIES_SASL_JAAS_CONFIG: 'org.apache.kafka.common.security.plain.PlainLoginModule required username="xxxxx" password="xxxxx";'
      KAFKA_CLUSTERS_0_SSL_PROTOCOL: TLSv1.2

I get the following error after the container starts:

 ERROR [parallel-5] c.p.k.u.u.NumberUtil: Conversion clusterVersion  to float value failed
kafka-ui  | 2022-08-18 10:20:13,209 ERROR [parallel-5] c.p.k.u.s.MetricsService: Failed to collect cluster sandbox info
kafka-ui  | java.lang.IllegalStateException: Error while creating AdminClient for Cluster sandbox
kafka-ui  |     at com.provectus.kafka.ui.service.AdminClientServiceImpl.lambda$createAdminClient$3(AdminClientServiceImpl.java:45)
kafka-ui  |     at reactor.core.publisher.Mono.lambda$onErrorMap$31(Mono.java:3733)
kafka-ui  |     at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:94)
kafka-ui  |     at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onError(FluxMapFuseable.java:140)
kafka-ui  |     at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:119)
kafka-ui  |     at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816)
kafka-ui  |     at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:249)
kafka-ui  |     at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
kafka-ui  |     at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
kafka-ui  |     at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
kafka-ui  |     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
kafka-ui  |     at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
kafka-ui  |     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
kafka-ui  |     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
kafka-ui  |     at java.base/java.lang.Thread.run(Thread.java:830)
kafka-ui  | Caused by: java.lang.NumberFormatException: empty String
kafka-ui  |     at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1842)
kafka-ui  |     at java.base/jdk.internal.math.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
kafka-ui  |     at java.base/java.lang.Float.parseFloat(Float.java:461)
kafka-ui  |     at com.provectus.kafka.ui.util.NumberUtil.parserClusterVersion(NumberUtil.java:22)
kafka-ui  |     at com.provectus.kafka.ui.service.ReactiveAdminClient.getSupportedUpdateFeatureForVersion(ReactiveAdminClient.java:88)
kafka-ui  |     at com.provectus.kafka.ui.service.ReactiveAdminClient.lambda$create$0(ReactiveAdminClient.java:84)
kafka-ui  |     at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:113)
kafka-ui  |     ... 10 common frames omitted

I get the same error when trying to connect using a docker container. Any help is appreciated!

github-actions[bot] commented 2 years ago

Hello there KyriacosP! 👋

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. 👀

Haarolean commented 2 years ago

Hi, thanks for reaching out. We'll look into this gladly, but, is this event streams publicly available for free? After a quick search I haven't found anything like a demo or a free tier thing.

KyriacosP commented 2 years ago

i don't think that they have a free tier, sorry.

edit: sorry about that, they seem to have a free tier called lite plan but you need an ibm cloud account

Haarolean commented 2 years ago

@KyriacosP seems like this platform returns an empty string instead of a proper version number. We're used to verify some of the features availability by kafka's cluster version, which is impossible in this case, I guess.

Please try this docker image with a workaround: public.ecr.aws/provectus/kafka-ui-custom-build:2473 Let me know how it goes.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because no requested feedback has been provided. It will be closed if no further activity occurs. Thank you for your contributions.

KyriacosP commented 2 years ago

@Haarolean Sorry for the late reply i have tested the image. It seems to work fine i still get the same error on startup but only in the logs, kafka-ui works fine after that. Thank you!

Haarolean commented 2 years ago

@Haarolean Sorry for the late reply i have tested the image. It seems to work fine i still get the same error on startup but only in the logs, kafka-ui works fine after that. Thank you!

Glad to hear. That's intended, at least we know something went wrong. Let me know if you experience any other issue(-s) with event streams.

KyriacosP commented 2 years ago

Do we have any time frame for when will this fix be released?

Haarolean commented 2 years ago

@KyriacosP you can pull master-labeled docker image :)

KyriacosP commented 2 years ago

@Haarolean thank you!