일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- ELASTIC
- Java
- zip 파일 암호화
- license delete
- aggregation
- springboot
- zip 암호화
- 900gle
- flask
- 파이썬
- API
- Mac
- token filter test
- License
- licence delete curl
- aggs
- high level client
- analyzer test
- MySQL
- docker
- Kafka
- query
- Test
- 차트
- plugin
- Elasticsearch
- matplotlib
- Python
- sort
- TensorFlow
Archives
- Today
- Total
개발잡부
[kafka] docker dompose multi broker kafka 3.6 본문
반응형
이거 버려..
cd /Users/doo/docker/kafka
(base) ➜ kafka docker compose -f docker-compose.yml up -d --build
docker-compose exec kafka1 kafka-topics --create --topic 900gle --bootstrap-server kafka1:9092 --replication-factor 3 --partitions 2
Error response from daemon: Container 2c8318196be216b730907022eccaffc314fdd7e5d8e0286ea3f6b1d219acd5c0 is restarting, wait until the container is running
version: '3.6'
services:
zookeeper1:
container_name: zookeeper1
image: wurstmeister/zookeeper:3.4.6
volumes:
- "./zookeeper/data:/data"
- "./zookeeper/logs:/datalog"
ports:
- "12181:2181"
zookeeper2:
container_name: zookeeper2
image: wurstmeister/zookeeper:3.4.6
volumes:
- "./zookeeper/data:/data"
- "./zookeeper/logs:/datalog"
ports:
- "22181:2181"
zookeeper3:
container_name: zookeeper3
image: wurstmeister/zookeeper:3.4.6
volumes:
- "./zookeeper/data:/data"
- "./zookeeper/logs:/datalog"
ports:
- "32181:2181"
kafka1:
container_name: kafka1
image: wurstmeister/kafka:2.12-2.3.0
restart: on-failure
ports:
- "9095:9092"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper1:2181,zookeeper2:2181,zookeeper3:2181
JMX_PORT: 9093
KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=${EXPOSED_HOSTNAME} -Dcom.sun.management.jmxremote.rmi.port=9093
KAFKA_ADVERTISED_HOST_NAME: ${EXPOSED_HOSTNAME}1
KAFKA_ADVERTISED_PORT: 9092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://${EXPOSED_HOSTNAME}1:9095
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 2
depends_on:
- zookeeper1
- zookeeper2
- zookeeper3
kafka2:
container_name: kafka2
image: wurstmeister/kafka:2.12-2.3.0
restart: on-failure
ports:
- "9096:9092"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
KAFKA_BROKER_ID: 2
KAFKA_ZOOKEEPER_CONNECT: zookeeper1:2181,zookeeper2:2181,zookeeper3:2181
JMX_PORT: 9093
KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=${EXPOSED_HOSTNAME} -Dcom.sun.management.jmxremote.rmi.port=9093
KAFKA_ADVERTISED_HOST_NAME: ${EXPOSED_HOSTNAME}2
KAFKA_ADVERTISED_PORT: 9092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://${EXPOSED_HOSTNAME}2:9096
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 2
depends_on:
- zookeeper1
- zookeeper2
- zookeeper3
kafka3:
container_name: kafka3
image: wurstmeister/kafka:2.12-2.3.0
restart: on-failure
ports:
- "9097:9092"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
KAFKA_BROKER_ID: 3
KAFKA_ZOOKEEPER_CONNECT: zookeeper1:2181,zookeeper2:2181,zookeeper3:2181
JMX_PORT: 9093
KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=${EXPOSED_HOSTNAME} -Dcom.sun.management.jmxremote.rmi.port=9093
KAFKA_ADVERTISED_HOST_NAME: ${EXPOSED_HOSTNAME}3
KAFKA_ADVERTISED_PORT: 9092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://${EXPOSED_HOSTNAME}3:9097
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 2
depends_on:
- zookeeper1
- zookeeper2
- zookeeper3
kafka-manager:
container_name: kafka-manager
image: hlebalbau/kafka-manager:2.0.0.2
restart: on-failure
depends_on:
- kafka1
- kafka2
- kafka3
- zookeeper1
- zookeeper2
- zookeeper3
environment:
ZK_HOSTS: zookeeper1:2181
APPLICATION_SECRET: "random-secret"
KM_ARGS: -Djava.net.preferIPv4Stack=true
ports:
- "9000:9000"
반응형
'Kafka' 카테고리의 다른 글
[kafka] kafka-full (0) | 2022.08.27 |
---|---|
Error response from daemon: Container 2c8318196be216b730907022eccaffc314fdd7e5d8e0286ea3f6b1d219acd5c0 is restarting, wait until the container is running (0) | 2022.08.27 |
[kafka] docker dompose multi broker kafka (0) | 2022.08.26 |
[kafka] docker compose kafka (0) | 2022.05.08 |
[kafka] CMAK 3.0.0.5 설치 for Mac OS (0) | 2022.04.27 |
Comments