Skip to content
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

The connection address you set is invalid #4474

Closed
4 tasks done
Tiper-In-Github opened this issue Aug 19, 2024 · 4 comments
Closed
4 tasks done

The connection address you set is invalid #4474

Tiper-In-Github opened this issue Aug 19, 2024 · 4 comments
Labels
status/triage Issues pending maintainers triage type/bug Something isn't working

Comments

@Tiper-In-Github
Copy link

Issue submitter TODO list

  • I've looked up my issue in FAQ
  • I've searched for an already existing issues here
  • I've tried running master-labeled docker image and the issue still persists there
  • I'm running a supported version of the application which is listed here

Describe the bug (actual behavior)

After I set the cluster address in the webUI, the program did not connect to the specified cluster as expected, but connected to localhost.

Expected behavior

in webUI:
image
in Docker container:
connector to 172.18.0.3:9093

Your installation details

version: "3"
services:
  zookeeper:
    image: 'bitnami/zookeeper:latest'
    ports:
      - '2181:2181'
    environment:
      - ALLOW_ANONYMOUS_LOGIN=yes
  kafka:
    image: 'bitnami/kafka:latest'
    ports:
      - '9092:9092'
      - '9093:9093'
    environment:
      - KAFKA_BROKER_ID=1
      - KAFKA_CFG_LISTENERS=PLAINTEXT://:9092
      - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092
      - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
      - ALLOW_PLAINTEXT_LISTENER=yes
      - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
      - KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:9093
      - KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka:9092,EXTERNAL://localhost:9093
      - KAFKA_INTER_BROKER_LISTENER_NAME=CLIENT
    depends_on:
      - zookeeper
  kafka-ui:
    container_name: kafka-ui
    image: provectuslabs/kafka-ui:latest
    ports:
      - 8080:8080
    depends_on:
      - kafka
    environment:
      DYNAMIC_CONFIG_ENABLED: "TRUE"

Steps to reproduce

Run the docker-compose up -d command and try to set the specific IP address in the webUI.

Screenshots

set:
image
in Docker container:
image

Logs

2024-08-19 11:27:27 2024-08-19 03:27:27,803 DEBUG [parallel-6] c.p.k.u.s.ClustersStatisticsScheduler: Metrics updated for cluster: localhostTest
2024-08-19 11:27:27 2024-08-19 03:27:27,804 DEBUG [parallel-8] c.p.k.u.s.ClustersStatisticsScheduler: Start getting metrics for kafkaCluster: localhostTest
2024-08-19 11:27:27 2024-08-19 03:27:27,804 INFO [parallel-8] o.a.k.c.a.AdminClientConfig: AdminClientConfig values:
2024-08-19 11:27:27 auto.include.jmx.reporter = true
2024-08-19 11:27:27 bootstrap.servers = [172.18.0.3:9093]
2024-08-19 11:27:27 client.dns.lookup = use_all_dns_ips
2024-08-19 11:27:27 client.id = kafka-ui-admin-1724038047-12
2024-08-19 11:27:27 connections.max.idle.ms = 300000
2024-08-19 11:27:27 default.api.timeout.ms = 60000
2024-08-19 11:27:27 metadata.max.age.ms = 300000
2024-08-19 11:27:27 metric.reporters = []
2024-08-19 11:27:27 metrics.num.samples = 2
2024-08-19 11:27:27 metrics.recording.level = INFO
2024-08-19 11:27:27 metrics.sample.window.ms = 30000
2024-08-19 11:27:27 receive.buffer.bytes = 65536
2024-08-19 11:27:27 reconnect.backoff.max.ms = 1000
2024-08-19 11:27:27 reconnect.backoff.ms = 50
2024-08-19 11:27:27 request.timeout.ms = 30000
2024-08-19 11:27:27 retries = 2147483647
2024-08-19 11:27:27 retry.backoff.ms = 100
2024-08-19 11:27:27 sasl.client.callback.handler.class = null
2024-08-19 11:27:27 sasl.jaas.config = null
2024-08-19 11:27:27 sasl.kerberos.kinit.cmd = /usr/bin/kinit
2024-08-19 11:27:27 sasl.kerberos.min.time.before.relogin = 60000
2024-08-19 11:27:27 sasl.kerberos.service.name = null
2024-08-19 11:27:27 sasl.kerberos.ticket.renew.jitter = 0.05
2024-08-19 11:27:27 sasl.kerberos.ticket.renew.window.factor = 0.8
2024-08-19 11:27:27 sasl.login.callback.handler.class = null
2024-08-19 11:27:27 sasl.login.class = null
2024-08-19 11:27:27 sasl.login.connect.timeout.ms = null
2024-08-19 11:27:27 sasl.login.read.timeout.ms = null
2024-08-19 11:27:27 sasl.login.refresh.buffer.seconds = 300
2024-08-19 11:27:27 sasl.login.refresh.min.period.seconds = 60
2024-08-19 11:27:27 sasl.login.refresh.window.factor = 0.8
2024-08-19 11:27:27 sasl.login.refresh.window.jitter = 0.05
2024-08-19 11:27:27 sasl.login.retry.backoff.max.ms = 10000
2024-08-19 11:27:27 sasl.login.retry.backoff.ms = 100
2024-08-19 11:27:27 sasl.mechanism = GSSAPI
2024-08-19 11:27:27 sasl.oauthbearer.clock.skew.seconds = 30
2024-08-19 11:27:27 sasl.oauthbearer.expected.audience = null
2024-08-19 11:27:27 sasl.oauthbearer.expected.issuer = null
2024-08-19 11:27:27 sasl.oauthbearer.jwks.endpoint.refresh.ms = 3600000
2024-08-19 11:27:27 sasl.oauthbearer.jwks.endpoint.retry.backoff.max.ms = 10000
2024-08-19 11:27:27 sasl.oauthbearer.jwks.endpoint.retry.backoff.ms = 100
2024-08-19 11:27:27 sasl.oauthbearer.jwks.endpoint.url = null
2024-08-19 11:27:27 sasl.oauthbearer.scope.claim.name = scope
2024-08-19 11:27:27 sasl.oauthbearer.sub.claim.name = sub
2024-08-19 11:27:27 sasl.oauthbearer.token.endpoint.url = null
2024-08-19 11:27:27 security.protocol = PLAINTEXT
2024-08-19 11:27:27 security.providers = null
2024-08-19 11:27:27 send.buffer.bytes = 131072
2024-08-19 11:27:27 socket.connection.setup.timeout.max.ms = 30000
2024-08-19 11:27:27 socket.connection.setup.timeout.ms = 10000
2024-08-19 11:27:27 ssl.cipher.suites = null
2024-08-19 11:27:27 ssl.enabled.protocols = [TLSv1.2, TLSv1.3]
2024-08-19 11:27:27 ssl.endpoint.identification.algorithm = https
2024-08-19 11:27:27 ssl.engine.factory.class = null
2024-08-19 11:27:27 ssl.key.password = null
2024-08-19 11:27:27 ssl.keymanager.algorithm = SunX509
2024-08-19 11:27:27 ssl.keystore.certificate.chain = null
2024-08-19 11:27:27 ssl.keystore.key = null
2024-08-19 11:27:27 ssl.keystore.location = null
2024-08-19 11:27:27 ssl.keystore.password = null
2024-08-19 11:27:27 ssl.keystore.type = JKS
2024-08-19 11:27:27 ssl.protocol = TLSv1.3
2024-08-19 11:27:27 ssl.provider = null
2024-08-19 11:27:27 ssl.secure.random.implementation = null
2024-08-19 11:27:27 ssl.trustmanager.algorithm = PKIX
2024-08-19 11:27:27 ssl.truststore.certificates = null
2024-08-19 11:27:27 ssl.truststore.location = null
2024-08-19 11:27:27 ssl.truststore.password = null
2024-08-19 11:27:27 ssl.truststore.type = JKS
2024-08-19 11:27:27
2024-08-19 11:27:27 2024-08-19 03:27:27,806 INFO [parallel-8] o.a.k.c.u.AppInfoParser: Kafka version: 3.5.0
2024-08-19 11:27:27 2024-08-19 03:27:27,806 INFO [parallel-8] o.a.k.c.u.AppInfoParser: Kafka commitId: c97b88d5db4de28d
2024-08-19 11:27:27 2024-08-19 03:27:27,806 INFO [parallel-8] o.a.k.c.u.AppInfoParser: Kafka startTimeMs: 1724038047806
2024-08-19 11:27:27 2024-08-19 03:27:27,809 INFO [kafka-admin-client-thread | kafka-ui-admin-1724038047-12] o.a.k.c.NetworkClient: [AdminClient clientId=kafka-ui-admin-1724038047-12] Node 1 disconnected.
2024-08-19 11:27:27 2024-08-19 03:27:27,809 WARN [kafka-admin-client-thread | kafka-ui-admin-1724038047-12] o.a.k.c.NetworkClient: [AdminClient clientId=kafka-ui-admin-1724038047-12] Connection to node 1 (localhost/127.0.0.1:9093) could not be established. Broker may not be available.
2024-08-19 11:27:27 2024-08-19 03:27:27,907 INFO [kafka-admin-client-thread | kafka-ui-admin-1724038047-12] o.a.k.c.NetworkClient: [AdminClient clientId=kafka-ui-admin-1724038047-12] Node 1 disconnected.

Additional context

No response

@Tiper-In-Github Tiper-In-Github added status/triage Issues pending maintainers triage type/bug Something isn't working labels Aug 19, 2024
Copy link

Hello there Tiper-In-Github! 👋

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

@NZenitram
Copy link

If you don't have metrics enabled this will fail every time.

@vishwasraj
Copy link

vishwasraj commented Sep 21, 2024

Try below config dockerfile

the config allows kafka-ui to access the kafka cluster within docker using this addr: kafka:9092 and you can access the kafka cluster outside of docker using localhost:9094

version: '3'

services:
  zookeeper:
    image: bitnami/zookeeper:latest
    ports:
      - "2181:2181"
    volumes:
      - "zookeeper_data:/bitnami"
    environment:
      - ALLOW_ANONYMOUS_LOGIN=yes

  kafka:
    image: bitnami/kafka:latest
    ports:
      - "9094:9094"
    volumes:
      - "kafka_data:/bitnami"
    environment:
      - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
      - KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,PLAINTEXT_HOST://:9094
      - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://:9092,PLAINTEXT_HOST://localhost:9094
      - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
    depends_on:
      - zookeeper

  kafka-ui:
    image: provectuslabs/kafka-ui:latest
    ports:
      - "8080:8080"
    environment:
      - KAFKA_CLUSTERS_0_NAME=Local
      - KAFKA_CLUSTERS_0_BOOTSTRAP_SERVERS=kafka:9092
      - KAFKA_CLUSTERS_0_ZOOKEEPER=zookeeper:2181
    depends_on:
      - kafka
      - zookeeper

volumes:
  zookeeper_data:
    driver: local
  kafka_data:
    driver: local

@Tiper-In-Github
Copy link
Author

Try below config dockerfile

the config allows kafka-ui to access the kafka cluster within docker using this addr: kafka:9092 and you can access the kafka cluster outside of docker using localhost:9094

version: '3'

services:
  zookeeper:
    image: bitnami/zookeeper:latest
    ports:
      - "2181:2181"
    volumes:
      - "zookeeper_data:/bitnami"
    environment:
      - ALLOW_ANONYMOUS_LOGIN=yes

  kafka:
    image: bitnami/kafka:latest
    ports:
      - "9094:9094"
    volumes:
      - "kafka_data:/bitnami"
    environment:
      - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
      - KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,PLAINTEXT_HOST://:9094
      - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://:9092,PLAINTEXT_HOST://localhost:9094
      - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
    depends_on:
      - zookeeper

  kafka-ui:
    image: provectuslabs/kafka-ui:latest
    ports:
      - "8080:8080"
    environment:
      - KAFKA_CLUSTERS_0_NAME=Local
      - KAFKA_CLUSTERS_0_BOOTSTRAP_SERVERS=kafka:9092
      - KAFKA_CLUSTERS_0_ZOOKEEPER=zookeeper:2181
    depends_on:
      - kafka
      - zookeeper

volumes:
  zookeeper_data:
    driver: local
  kafka_data:
    driver: local

Thank you for the docker-compose reference (your reply above seems to be written as dockerfile by mistake).But I'm sorry, we have changed to other solutions, so it's not convenient to test it for the time being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/triage Issues pending maintainers triage type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants