Я пытался запустить Кафку с docker. Я могу запустить зоокейпер, брокер и кафку подключиться.
введите описание изображения здесь
, но когда я попытался запустить ksqldb-сервер, kafka connect остановился.
введите описание изображения здесь
здесь мой docker -компонентный файл:
version: '3.8'
services:
zookeeper:
image: confluentinc/cp-zookeeper:5.5.0
hostname: zookeeper
container_name: zookeeper
ports:
- 2181:2181
environment:
- ZOOKEEPER_CLIENT_PORT=2181
- ZOOKEEPER_TICK_TIME=2000
broker:
image: confluentinc/cp-kafka:5.5.0
hostname: broker
container_name: broker
ports:
- 29092:29092
- 9092:9092
environment:
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
- KAFKA_INTER_BROKER_LISTENER_NAME=PLAINTEXT
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
depends_on:
- zookeeper
schema-registry:
image: confluentinc/cp-schema-registry:5.5.0
hostname: schema-registry
container_name: schema-registry
ports:
- 8081:8081
environment:
- SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL=zookeeper:2181
- SCHEMA_REGISTRY_HOST_NAME=schema-registry
- SCHEMA_REGISTRY_LISTENERS=http://schema-registry:8081
depends_on:
- zookeeper
- broker
connect:
image: confluentinc/cp-kafka-connect:5.5.0
hostname: connect
container_name: connect
ports:
- 8083:8083
volumes:
- mi4:/tmp/
# - $PWD/tmp:/tmp/
environment:
- CONNECT_BOOTSTRAP_SERVERS=broker:29092
- CONNECT_REST_ADVERTISED_HOST_NAME=localhost
- CONNECT_REST_PORT=8083
- CONNECT_GROUP_ID=compose-connect-group
- CONNECT_CONFIG_STORAGE_TOPIC=connect-configs
- CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR=1
- CONNECT_OFFSET_STORAGE_TOPIC=connect-offsets
- CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR=1
- CONNECT_STATUS_STORAGE_TOPIC=connect-statuses
- CONNECT_STATUS_STORAGE_REPLICATION_FACTOR=1
- CONNECT_KEY_CONVERTER= io.confluent.connect.avro.AvroConverter
- CONNECT_VALUE_CONVERTER= io.confluent.connect.avro.AvroConverter
- CONNECT_KEY_CONVERTER_SCHEMA_REGISTRY_URL=http://schema-registry:8081
- CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL=http://schema-registry:8081
- CONNECT_INTERNAL_KEY_CONVERTER= org.apache.kafka.connect.json.JsonConverter
- CONNECT_INTERNAL_VALUE_CONVERTER= org.apache.kafka.connect.json.JsonConverter
- CONNECT_LOG4J_ROOT_LOGLEVEL=INFO
- CONNECT_LOG4J_LOGGERS= org.apache.zookeeper=ERROR,org.I0Itec.zkclient=ERROR,org.reflections=ERROR
- CONNECT_PLUGIN_PATH=/usr/share/java/
depends_on:
- zookeeper
- broker
- schema-registry
ksqldb-server:
image: confluentinc/cp-ksqldb-server:5.5.0
hostname: ksqldb-server
container_name: ksqldb-server
depends_on:
- broker
- connect
ports:
- 8088:8088
environment:
- KSQL_BOOTSTRAP_SERVERS=broker:29092
- KSQL_CONFIG_DIR=/etc/ksql
- KSQL_HOST_NAME=ksqldb-server
- KSQL_LISTENERS=http://0.0.0.0:8088
- KSQL_AUTO_OFFSET_RESET=earliest
- KSQL_CACHE_MAX_BYTES_BUFFERING=0
- KSQL_KSQL_SCHEMA_REGISTRY_URL=http://schema-registry:8081
- KSQL_PRODUCER_INTERCEPTOR_CLASSES= io.confluent.monitoring.clients.interceptor.MonitoringProducerInterceptor
- KSQL_CONSUMER_INTERCEPTOR_CLASSES= io.confluent.monitoring.clients.interceptor.MonitoringConsumerInterceptor
- KSQL_KSQL_CONNECT_URL=http://connect:8083
volumes:
mi4:
Есть идея !!
Я проверил журналы своего контейнера, но там не было добавленной информации для ошибка.