uber / uReplicator

Improvement of Apache Kafka Mirrormaker
Apache License 2.0
917 stars 199 forks source link

ERROR Error registering metrics! (com.uber.stream.kafka.mirrormaker.controller.validation.ValidationManager:266) java.lang.NullPointerException #196

Closed rantav closed 5 years ago

rantav commented 5 years ago

When running the controller, after a few minute I see this:

ERROR Error registering metrics! (com.uber.stream.kafka.mirrormaker.controller.validation.ValidationManager:266)
java.lang.NullPointerException
    at com.uber.stream.kafka.mirrormaker.controller.validation.ValidationManager.updatePerWorkerISMetrics(ValidationManager.java:263)
    at com.uber.stream.kafka.mirrormaker.controller.validation.ValidationManager.validateExternalView(ValidationManager.java:205)
    at com.uber.stream.kafka.mirrormaker.controller.validation.ValidationManager$1.run(ValidationManager.java:82)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

Configuration is as follows:

[2019-01-06 10:13:29,732] INFO Trying to init ControllerStarter with config:
{
    kafka.source.clusters :
    kafka.destination.clusters :
    federated.enabled : false
    federated.deployment.name :
    controller.helix.cluster.name : ureplicator
    controller.zk.str : zookeeper.ureplicator.svc.cluster.local:2181
    controller.port : 9000
    controller.mode : auto
    controller.instance.id : ureplicator-controller-6977f88fb8-95jhl
    controller.environment : dev
    controller.graphite.host : prometheus-graphite-exporter.monitoring.svc.cluster.local
    controller.graphite.port : 9109
    controller.metrics.prefix : kafka-mirror-maker-controller
    controller.c3.host : localhost
    controller.c3.port : 0
    controller.enable.auto.whitelist : true
    controller.enable.auto.topic.expansion : true
    controller.pattern.exclude.topics : __consumer_offsets
    controller.srckafka.zkStr : 18.209.172.99:2181
    controller.destkafka.zkStr : zookeeper.kafka-destination.svc.cluster.local:2181
    controller.max.working.instances : 0
    controller.auto.rebalance.delay.in.seconds : 120
    controller.refresh.time.in.seconds : 20
    controller.init.wait.time.in.seconds : 10
    controller.auto.rebalance.period.in.seconds : 0
    controller.auto.rebalance.min.interval.in.seconds : 600
    controller.auto.rebalance.min.lag.in.seconds : 900
    controller.auto.rebalance.min.lag.offset : 100000
    controller.auto.rebalance.max.offset.valid.in.seconds : 1800
    controller.workload.refresh.period.in.seconds : 600
    controller.auto.rebalance.workload.ratio.threshold : 1.2
    controller.auto.rebalance.max.dedicated.ratio : 0.5
    controller.auto.rebalance.max.stuck.partition.movements : 3
    controller.auto.rebalance.move.stuck.partition.after.minutes : 20
    controller.num.offset.thread : 10
    controller.blocking.queue.size : 30000
    controller.offset.refresh.interval.in.sec : 300
    controller.backup.to.git : false
    controller.local.backup.file.path : /tmp/uReplicator-controller
    config.file :
}
 (com.uber.stream.kafka.mirrormaker.controller.ControllerStarter:63)

I hope this information is enough.

The version is built form master, using my own built docker image rantav/ureplicator:4790496

rantav commented 5 years ago

I can't get the controller to send metrics, I assume it's related to this error.

xhl1988 commented 5 years ago

@rantav Please try -controller.environment with the format of <dc>.<deployment>, e.g. dc1.dev.

rantav commented 5 years ago

It worked! But, still a bug worth fixing, right?

On Jan 6, 2019, at 8:03 PM, Hongliang Xu notifications@github.com wrote:

@rantav Please try -controller.environment with the format of ., e.g. dc1.dev.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

xhl1988 commented 5 years ago

It's not a bug but we required that information/format as the prefix of the metrics. We will make it not a hard requirement or make it more clear.

rantav commented 5 years ago

alright thanks, so I'll keep the issue open to serve as reminder, feel free to close it if you prefer.

yangy0000 commented 5 years ago

Fixed #200