我正在使用docker swarm来设置kafka-queue容器
由于某种原因,自3天前以来,kafka-queue无法启动此错误
dub template "/etc/confluent/docker/${COMPONENT}.properties.template" "/etc/${COMPONENT}/${COMPONENT}.properties"
swarm_stack_kafka-queue.1.xbe7lg7ecc62@xdrdev4 | + dub template /etc/confluent/docker/kafka.properties.template /etc/kafka/kafka.properties
swarm_stack_kafka-queue.1.xbe7lg7ecc62@xdrdev4 | 'ascii' codec can't decode byte 0xe2 in position 8: ordinal not in range(128)
swarm_stack_kafka-queue.1.xbe7lg7ecc62@xdrdev4 | Command [/usr/local/bin/dub template /etc/confluent/docker/kafka.properties.template /etc/kafka/kafka.properties] FAILED !
我用这个组合
运行swarmzookeeper:
container_name: zookeeper
image: confluentinc/cp-zookeeper:4.0.0
volumes:
- "/data/xdr/zookeeper:/var/zookeeper"
ports:
- "2181:2181"
environment:
ZOOKEEPER_SERVER_ID: 2
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ZOOKEEPER_INIT_LIMIT: 5
ZOOKEEPER_SYNC_LIMIT: 2
ZOOKEEPER_SERVERS: "zookeeper:2222:3333"
networks:
- integ_net2
deploy:
mode: replicated
replicas: 1
kafka-queue:
container_name: kafka-queue
image: confluentinc/cp-kafka:latest
ports:
- "9092:9092"
volumes:
- "/data/xdr/kafka/data:/var/lib/kafka/data"
depends_on:
- zookeeper
environment:
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_HEAP_OPTS: "-Xmx13G –Xms13G"
KAFKA_BROKER_ID: 3
KAFKA_NUM_PARTITIONS: 20
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-queue:9092
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
ZOOKEEPER_CHROOT: /broker
networks:
- integ_net2
deploy:
mode: replicated
replicas: 1
关于它的奇怪之处就是一周前做的同样的作品,我几天前所做的只是移除群并再次设置它...... 我最初使用的是docker图片:confluentinc / cp-kafka:4.0.0
但即使将其移至最新仍然会出现同样的问题......
图像来自融合本身,我认为没有理由为什么它会失败或让我改变任何东西。
任何人都有这个问题吗?
答案 0 :(得分:1)
你在破折号中发生了一些奇怪的事情" -Xmx13G -Xms13G"
看起来像复制/粘贴Unicode的东西。我建议完全删除堆设置,因为Kafka代理的13G不太可能是必要的(你可能宁愿在页面缓存中有这个内存)。如果您发现有必要,请尝试修改破折号作为标准' - '破折号。