Reputation: 11
Currently following the https://github.com/openzipkin/zipkin quickstart for the docker startup of zipkin and kafka. I set up a docker-compose that starts several services: kafka, zookeeper, neo4j and zipkin. I gave zipkin through the "KAFKA.BOOTSTRAP.SERVERS: broker:19092" the same address as the functioning neo4j.
zipkin:
image: ghcr.io/openzipkin/zipkin:${TAG:-latest}
container_name: zipkin
depends_on:
- broker
environment:
KAFKA.BOOTSTRAP.SERVERS: broker:19092
ports:
# Port used for the Zipkin UI and HTTP Api
- 9411:9411
my Kafka docker-compose part looks like this:
broker:
image: confluentinc/cp-kafka:latest
hostname: broker
container_name: broker
ports:
- "9092:9092"
- "9101:9101"
depends_on:
- zookeeper
environment:
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LISTENER_DOCKER_INTERNAL:PLAINTEXT,LISTENER_DOCKER_EXTERNAL:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: LISTENER_DOCKER_INTERNAL://broker:19092,LISTENER_DOCKER_EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9092
KAFKA_INTER_BROKER_LISTENER_NAME: LISTENER_DOCKER_INTERNAL
KAFKA_BROKER_ID: 1
KAFKA_LOG4J_LOGGERS: "kafka.controller=INFO,kafka.producer.async.DefaultEventHandler=INFO,state.change.logger=INFO"
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_CONFLUENT_LICENSE_TOPIC_REPLICATION_FACTOR: 1
KAFKA_CONFLUENT_BALANCER_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
The topic "zipkin" gets pushed to kafka, since I can consume it with my spring application.
The zipkin settings in my application.properties of the Spring implementation looks like this.
spring.zipkin.baseUrl= localhost:9411
spring.zipkin.sender.type= kafka
I couldn't find anything about how I can actually debug zipkin itself. It starts up without errors in my docker-compose.
Upvotes: 0
Views: 336
Reputation: 11
I actually found it myself. In case anyone encounters this too.
KAFKA.BOOTSTRAP.SERVERS: broker:19092
is not a valid environment variable. it needs to be in the style of this:
KAFKA_BOOTSTRAP_SERVERS: broker:19092
Upvotes: 1