linkedin / cruise-control-ui

Cruise Control Frontend (CCFE): Single Page Web Application to Manage Large Scale of Kafka Clusters
BSD 2-Clause "Simplified" License
342 stars 60 forks source link

Error 500 in CC UI resource distribution if 0 valid windows #59

Closed jrevillard closed 3 years ago

jrevillard commented 3 years ago

It displays error 500 instead of an appropriate message. Server logs:

cruise-control_1        | Caused by: com.linkedin.cruisecontrol.exception.NotEnoughValidWindowsException: There are only 0 valid windows when aggregating in range [-1, 1610215532372] for aggregation options (minValidEntityRatio=0.95, minValidEntityGroupRatio=0.00, minValidWindows=1, numEntitiesToInclude=104, granularity=ENTITY)
cruise-control_1        |   at com.linkedin.cruisecontrol.monitor.sampling.aggregator.MetricSampleAggregator.validateCompleteness(MetricSampleAggregator.java:541)
cruise-control_1        |   at com.linkedin.cruisecontrol.monitor.sampling.aggregator.MetricSampleAggregator.aggregate(MetricSampleAggregator.java:213)
cruise-control_1        |   at com.linkedin.kafka.cruisecontrol.monitor.sampling.aggregator.KafkaPartitionMetricSampleAggregator.aggregate(KafkaPartitionMetricSampleAggregator.java:151)
cruise-control_1        |   at com.linkedin.kafka.cruisecontrol.monitor.LoadMonitor.clusterModel(LoadMonitor.java:544)
cruise-control_1        |   at com.linkedin.kafka.cruisecontrol.KafkaCruiseControl.clusterModel(KafkaCruiseControl.java:350)
cruise-control_1        |   at com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.LoadRunnable.clusterModel(LoadRunnable.java:111)
cruise-control_1        |   ... 10 more

Best Jerome

jrevillard commented 3 years ago

Just for information, if another topic is created and if it does not have enough data, nothing is shown for the others too (same, error 500)

nareshv commented 3 years ago

A (anonymized) screenshot would be helpful in this case. UI is supposed to show this error message inline. which end point is throwing this 5xx error ?

jrevillard commented 3 years ago

image

nareshv commented 3 years ago

@optplx can you help with this ?

optplx commented 3 years ago

Hello @nareshv @jrevillard , https://github.com/linkedin/cruise-control-ui/pull/62 fixes this to display the full error message as bellow. Would that be ok for you?

For your second point @jrevillard , since the whole page relies on a single API call it is not in the scope to ignore the error and loop over the rest of the topics. This could probably be implemented using the topic parameter to chose which topics to display (see https://github.com/linkedin/cruise-control/wiki/REST-APIs#query-partition-resource-utilization)

image

jrevillard commented 3 years ago

Thanks @optplx, yes perfect.

nareshv commented 3 years ago

Thanks @optplx and @jrevillard . Closing this ticket as PR is merged.