dushixiang / kafka-map

A beautiful, concise and powerful kafka web management tool. 一个美观简洁且强大的kafka web管理工具。
Apache License 2.0
713 stars 131 forks source link

添加集群超时 #32

Closed yuanjinzhong closed 2 years ago

yuanjinzhong commented 2 years ago

docker 安装

image image

dushixiang commented 2 years ago

docker 安装

image image

Mac 版 docker 默认无法访问外部网络,详情见 docker 官方文档 https://docs.docker.com/desktop/mac/networking/

yuanjinzhong commented 2 years ago

Mac 版 docker 默认无法访问外部网络

但是我那三个kfaka地址是可以访问的

dushixiang commented 2 years ago

Mac 版 docker 默认无法访问外部网络

但是我那三个kfaka地址是可以访问的

你在容器里面就访问不到了

yuanjinzhong commented 2 years ago

Mac 版 docker 默认无法访问外部网络

但是我那三个kfaka地址是可以访问的

你在容器里面就访问不到了

需要我咋设置呢?docker 这块不是很熟悉

dushixiang commented 2 years ago

Mac 版 docker 默认无法访问外部网络

但是我那三个kfaka地址是可以访问的

你在容器里面就访问不到了

需要我咋设置呢?docker 这块不是很熟悉

换台 Linux 机器安装吧

yuanjinzhong commented 2 years ago

可以把kafak-map 和kafka集群 以及zookeeper 写在同一个docker-compose里面吗?这样是不是可以解决网络问题

dushixiang commented 2 years ago

可以把kafak-map 和kafka集群 以及zookeeper 写在同一个docker-compose里面吗?这样是不是可以解决网络问题

我觉得应该没有人会把 Mac 当作服务器来使用,因此我只提供了一个简单的安装方式。

yuanjinzhong commented 2 years ago

version: '2.1'

services: zoo1: image: zookeeper:3.4.9 hostname: zoo1 restart: always container_name: zoo1 ports:

帮我瞧瞧这个docker-compose 写的有没有问题,是不是缺少什么网络配置。我这样docker-compose.yml up 起来之后,还是没法添加集群。kafka-map的控制台可以访问

shuifa commented 2 years ago

我在m1的mac启动这个docker容器。kafka的控制台都无法打开。。

shuifa commented 2 years ago
version: "3.9"
services:
  zookeeper:
    image: zookeeper
    container_name: zookeeper
    volumes:
      - zookeeper:/data
    ports:
      - "2181:2181"
    environment:
      ZOOKEEPER_CLIENT_PORT: 2181
      ZOOKEEPER_TICK_TIME: 2000
  kafka:
    image: bitnami/kafka
    container_name: kafka
    depends_on:
      - zookeeper
    links:
      - zookeeper
    volumes:
      - kafka:/kafka
    ports:
      - "9092:9092"
    environment:
      ALLOW_PLAINTEXT_LISTENER: "yes"
      KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181/kafka"
      KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://kafka:9092"
      KAFKA_BROKER_ID: 1
      KAFKA_LISTENERS: "PLAINTEXT://0.0.0.0:9092"
  kafka-map:
    image: dushixiang/kafka-map:latest
    container_name: kafka-map
    ports:
      - "8080:8080"
    environment:
      DEFAULT_USERNAME: admin
      DEFAULT_PASSWORD: admin
volumes:
  zookeeper:
  kafka:

我这样能用了。。

dushixiang commented 2 years ago
version: "3.9"
services:
  zookeeper:
    image: zookeeper
    container_name: zookeeper
    volumes:
      - zookeeper:/data
    ports:
      - "2181:2181"
    environment:
      ZOOKEEPER_CLIENT_PORT: 2181
      ZOOKEEPER_TICK_TIME: 2000
  kafka:
    image: bitnami/kafka
    container_name: kafka
    depends_on:
      - zookeeper
    links:
      - zookeeper
    volumes:
      - kafka:/kafka
    ports:
      - "9092:9092"
    environment:
      ALLOW_PLAINTEXT_LISTENER: "yes"
      KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181/kafka"
      KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://kafka:9092"
      KAFKA_BROKER_ID: 1
      KAFKA_LISTENERS: "PLAINTEXT://0.0.0.0:9092"
  kafka-map:
    image: dushixiang/kafka-map:latest
    container_name: kafka-map
    ports:
      - "8080:8080"
    environment:
      DEFAULT_USERNAME: admin
      DEFAULT_PASSWORD: admin
volumes:
  zookeeper:
  kafka:

我这样能用了。。

你需要保证的是网络畅通,这点没办法帮助你的。