Closed pranav-patil closed 6 years ago
are you intentionally using an old kafka setup? did you try https://github.com/openzipkin/docker-zipkin/blob/master/docker-compose-kafka.yml
please use https://gitter.im/openzipkin/zipkin for troubleshooting, but before please look at this first: https://cwiki.apache.org/confluence/display/ZIPKIN/Kafka
PS I just clarified the README to not suggest kafka 0.8. It simplifies the instructions and redundantly mentions most demo apps will be running alongside the docker container (not inside it), so should use bootstrap servers localhost:19092 (Ex spring.kafka.bootstrap-servers=localhost:19092
in sleuth)
Thank you @adriancole for your quick response and updating the documentation. I am still facing issues as unable to see any traces in zipkin-ui and getting KeeperException in kafka-zookeeper logs. Below is my application.yml configuration for test application. As you recommended I tried changing the spring.kafka.bootstrap-servers
property to remote-docker-machine-ip-address:19092
(localhost will not work for me as my docker machine with kafka is remote machine), but then I get 'Connection to node -1 could not be established. Broker may not be available' error in application log. Only below remote-docker-machine-ip-address with port 9092 seems to work with no connection errors.
spring:
application:
name: testzipkin
zipkin:
baseUrl: http://remote-docker-machine-ip-address:9411/
sender:
type: kafka
sleuth:
sampler:
probability: 1.0
kafka:
bootstrap-servers: remote-docker-machine-ip-address:9092
Below is my docker-compose-kafka.yml configuration. As mentioned in the docker-compose-kafka.yml file comments starting with If using docker machine, I have uncommented the environment variable KAFKA_ADVERTISED_HOST_NAME and tried specifying it as 127.0.0.1
, also tried kafka-zookeeper
and at last IP address of the remote docker machine. I also tried commenting KAFKA_ADVERTISED_HOST_NAME still no traces are processed/consumed by kafka.
services:
kafka-zookeeper:
image: openzipkin/zipkin-kafka
container_name: kafka-zookeeper
# If using docker machine, uncomment the below and set your bootstrap
# server list to 192.168.99.100:19092
environment:
- KAFKA_ADVERTISED_HOST_NAME=127.0.0.1
ports:
- 2181:2181
- 9092:9092
- 19092:19092
zipkin:
environment:
- KAFKA_BOOTSTRAP_SERVERS=kafka-zookeeper:9092
depends_on:
- kafka-zookeeper
I am starting the zookeeper-kafka instance using below docker-compose command:
docker-compose -f docker-compose.yml -f docker-compose-kafka.yml up
Below are the log errors in kafka-zookeeper:
2018-10-29T17:20:12.295398318Z 2018-10-29 17:20:12,294 [myid:] - INFO [SyncThread:0:FileTxnLog@213] - Creating new log file: log.1
2018-10-29T17:20:12.378076047Z 2018-10-29 17:20:12,377 [myid:] - INFO [SyncThread:0:ZooKeeperServer@694] - Established session 0x100c6b35df90000 with negotiated timeout 6000 for client /127.0.0.1:35246
2018-10-29T17:20:12.781955229Z 2018-10-29 17:20:12,781 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@653] - Got user-level KeeperException when processing sessionid:0x100c6b35df90000 type:create cxid:0x2 zxid:0x3 txntype:-1 reqpath:n/a Error Path:/brokers Error:KeeperErrorCode = NoNode for /brokers
2018-10-29T17:20:12.855424594Z 2018-10-29 17:20:12,854 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@653] - Got user-level KeeperException when processing sessionid:0x100c6b35df90000 type:create cxid:0x6 zxid:0x7 txntype:-1 reqpath:n/a Error Path:/config Error:KeeperErrorCode = NoNode for /config
2018-10-29T17:20:12.890483253Z 2018-10-29 17:20:12,889 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@653] - Got user-level KeeperException when processing sessionid:0x100c6b35df90000 type:create cxid:0x9 zxid:0xa txntype:-1 reqpath:n/a Error Path:/admin Error:KeeperErrorCode = NoNode for /admin
2018-10-29T17:20:13.887117516Z 2018-10-29 17:20:13,886 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@653] - Got user-level KeeperException when processing sessionid:0x100c6b35df90000 type:create cxid:0x15 zxid:0x15 txntype:-1 reqpath:n/a Error Path:/cluster Error:KeeperErrorCode = NoNode for /cluster
2018-10-29T17:20:13.994780464Z [2018-10-29 17:20:13,992] WARN No meta.properties file under dir /kafka/logs/meta.properties (kafka.server.BrokerMetadataCheckpoint)
2018-10-29T17:20:17.717775563Z [2018-10-29 17:20:17,717] WARN No meta.properties file under dir /kafka/logs/meta.properties (kafka.server.BrokerMetadataCheckpoint)
2018-10-29T17:20:18.315922649Z 2018-10-29 17:20:18,315 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@653] - Got user-level KeeperException when processing sessionid:0x100c6b35df90000 type:setData cxid:0x21 zxid:0x1a txntype:-1 reqpath:n/a Error Path:/controller_epoch Error:KeeperErrorCode = NoNode for /controller_epoch
2018-10-29T17:20:19.819232539Z 2018-10-29 17:20:19,818 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@653] - Got user-level KeeperException when processing sessionid:0x100c6b35df90000 type:delete cxid:0x34 zxid:0x1d txntype:-1 reqpath:n/a Error Path:/admin/reassign_partitions Error:KeeperErrorCode = NoNode for /admin/reassign_partitions
2018-10-29T17:20:19.886488141Z 2018-10-29 17:20:19,885 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@653] - Got user-level KeeperException when processing sessionid:0x100c6b35df90000 type:delete cxid:0x39 zxid:0x1e txntype:-1 reqpath:n/a Error Path:/admin/preferred_replica_election Error:KeeperErrorCode = NoNode for /admin/preferred_replica_election
2018-10-29T17:20:33.391205454Z 2018-10-29 17:20:33,389 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@653] - Got user-level KeeperException when processing sessionid:0x100c6b35df90000 type:setData cxid:0x41 zxid:0x1f txntype:-1 reqpath:n/a Error Path:/config/topics/zipkin Error:KeeperErrorCode = NoNode for /config/topics/zipkin
2018-10-29T17:20:33.550588839Z 2018-10-29 17:20:33,550 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@653] - Got user-level KeeperException when processing sessionid:0x100c6b35df90000 type:setData cxid:0x4a zxid:0x22 txntype:-1 reqpath:n/a Error Path:/config/topics/__consumer_offsets Error:KeeperErrorCode = NoNode for /config/topics/__consumer_offsets
Please let me know if there are any corrections with my above configuration.
you might have missed the request to use gitter for troubleshooting. we dont use issues for this purpose. please join and we can try to help there
On Tue, 30 Oct 2018, 03:19 Pranav Patil, notifications@github.com wrote:
Thank you @adriancole https://github.com/adriancole for your quick response and updating the documentation. I am still facing issues as unable to see any traces in zipkin-ui and getting KeeperException in kafka-zookeeper logs. Below is my application.yml configuration for test application. As you recommended I tried changing the spring.kafka.bootstrap-servers property to remote-docker-machine-ip-address:19092 (localhost will not work for me as my docker machine with kafka is remote machine), but then I get 'Connection to node -1 could not be established. Broker may not be available' error in application log. Only below remote-docker-machine-ip-address with port 9092 seems to work with no connection errors.
spring: application: name: testzipkin zipkin: baseUrl: http://remote-docker-machine-ip-address:9411/ sender: type: kafka sleuth: sampler: probability: 1.0 kafka: bootstrap-servers: remote-docker-machine-ip-address:9092
Below is my docker-compose-kafka.yml configuration. As mentioned in the docker-compose-kafka.yml https://github.com/openzipkin/docker-zipkin/blob/master/docker-compose-kafka.yml file comments starting with If using docker machine, I have uncommented the environment variable KAFKA_ADVERTISED_HOST_NAME and tried specifying it as 127.0.0.1, also tried kafka-zookeeper and at last IP address of the remote docker machine. I also tried commenting KAFKA_ADVERTISED_HOST_NAME still no traces are processed/consumed by kafka.
services: kafka-zookeeper: image: openzipkin/zipkin-kafka container_name: kafka-zookeeper
If using docker machine, uncomment the below and set your bootstrap
# server list to 192.168.99.100:19092 environment: - KAFKA_ADVERTISED_HOST_NAME=127.0.0.1 ports: - 2181:2181 - 9092:9092 - 19092:19092
zipkin: environment:
- KAFKA_BOOTSTRAP_SERVERS=kafka-zookeeper:9092 depends_on:
- kafka-zookeeper
I am starting the zookeeper-kafka instance using below docker-compose command: docker-compose -f docker-compose.yml -f docker-compose-kafka.yml up
Below are the log errors in kafka-zookeeper:
2018-10-29T17:20:12.295398318Z 2018-10-29 17:20:12,294 [myid:] - INFO [SyncThread:0:FileTxnLog@213] - Creating new log file: log.1 2018-10-29T17:20:12.378076047Z 2018-10-29 17:20:12,377 [myid:] - INFO [SyncThread:0:ZooKeeperServer@694] - Established session 0x100c6b35df90000 with negotiated timeout 6000 for client /127.0.0.1:35246 2018-10-29T17:20:12.781955229Z 2018-10-29 17:20:12,781 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@653] - Got user-level KeeperException when processing sessionid:0x100c6b35df90000 type:create cxid:0x2 zxid:0x3 txntype:-1 reqpath:n/a Error Path:/brokers Error:KeeperErrorCode = NoNode for /brokers 2018-10-29T17:20:12.855424594Z 2018-10-29 17:20:12,854 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@653] - Got user-level KeeperException when processing sessionid:0x100c6b35df90000 type:create cxid:0x6 zxid:0x7 txntype:-1 reqpath:n/a Error Path:/config Error:KeeperErrorCode = NoNode for /config 2018-10-29T17:20:12.890483253Z 2018-10-29 17:20:12,889 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@653] - Got user-level KeeperException when processing sessionid:0x100c6b35df90000 type:create cxid:0x9 zxid:0xa txntype:-1 reqpath:n/a Error Path:/admin Error:KeeperErrorCode = NoNode for /admin 2018-10-29T17:20:13.887117516Z 2018-10-29 17:20:13,886 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@653] - Got user-level KeeperException when processing sessionid:0x100c6b35df90000 type:create cxid:0x15 zxid:0x15 txntype:-1 reqpath:n/a Error Path:/cluster Error:KeeperErrorCode = NoNode for /cluster 2018-10-29T17:20:13.994780464Z [2018-10-29 17:20:13,992] WARN No meta.properties file under dir /kafka/logs/meta.properties (kafka.server.BrokerMetadataCheckpoint) 2018-10-29T17:20:17.717775563Z [2018-10-29 17:20:17,717] WARN No meta.properties file under dir /kafka/logs/meta.properties (kafka.server.BrokerMetadataCheckpoint) 2018-10-29T17:20:18.315922649Z 2018-10-29 17:20:18,315 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@653] - Got user-level KeeperException when processing sessionid:0x100c6b35df90000 type:setData cxid:0x21 zxid:0x1a txntype:-1 reqpath:n/a Error Path:/controller_epoch Error:KeeperErrorCode = NoNode for /controller_epoch 2018-10-29T17:20:19.819232539Z 2018-10-29 17:20:19,818 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@653] - Got user-level KeeperException when processing sessionid:0x100c6b35df90000 type:delete cxid:0x34 zxid:0x1d txntype:-1 reqpath:n/a Error Path:/admin/reassign_partitions Error:KeeperErrorCode = NoNode for /admin/reassign_partitions 2018-10-29T17:20:19.886488141Z 2018-10-29 17:20:19,885 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@653] - Got user-level KeeperException when processing sessionid:0x100c6b35df90000 type:delete cxid:0x39 zxid:0x1e txntype:-1 reqpath:n/a Error Path:/admin/preferred_replica_election Error:KeeperErrorCode = NoNode for /admin/preferred_replica_election 2018-10-29T17:20:33.391205454Z 2018-10-29 17:20:33,389 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@653] - Got user-level KeeperException when processing sessionid:0x100c6b35df90000 type:setData cxid:0x41 zxid:0x1f txntype:-1 reqpath:n/a Error Path:/config/topics/zipkin Error:KeeperErrorCode = NoNode for /config/topics/zipkin 2018-10-29T17:20:33.550588839Z 2018-10-29 17:20:33,550 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@653] - Got user-level KeeperException when processing sessionid:0x100c6b35df90000 type:setData cxid:0x4a zxid:0x22 txntype:-1 reqpath:n/a Error Path:/config/topics/__consumer_offsets Error:KeeperErrorCode = NoNode for /config/topics/__consumer_offsets
Please let me know if there are any corrections with my above configuration.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openzipkin/docker-zipkin/issues/190#issuecomment-434020981, or mute the thread https://github.com/notifications/unsubscribe-auth/AAD619CGFfzgSKQCm37gQC8i1ghOOxepks5up0aVgaJpZM4X-Hag .
I am trying to configure Zipkin with Kafka and activate the Kafka 0.8 collector. I modified the
KAFKA_ADVERTISED_HOST_NAME
property in docker-compose-kafka08.yml to firstkafka-zookeeper
, then127.0.0.1
and at last tried IP address of remote docker machine. I also updated the /etc/hosts file with127.0.0.1 localhost kafka-zookeeper
. But everytime I send Zipkin traces to Spring cloud application, I am getting below error KeeperExceptions from kafka-zookeeper. The spring cloud application which uses spring-cloud-starter-zipkin and spring-kafka to send trace messages resides on my local machine while zipkin instance is on remote machine. I use the below command from documentation to setup zipkin docker instances.docker-compose -f docker-compose.yml -f docker-compose-kafka08.yml up