Can't see data


Question 

I can connect and login to Lenses, but I cannot see any data.

Answer 

There are a few potential reasons why this happens.

Reason 1 

Lenses uses WebSocket connections to bring data into your browser. You might be running behind a proxy server, load balancer, ingress or another type of middleware.

Verification 

To be sure that a WebSocket error causes your issue while in the Explore Screen, open your Developer console ( Ctrl + Shift + F12 in Chrome). Then switch to the console tab and see if there are any errors reported mentioning WebSockets.

Make sure you check the documentation on proxies to set up for Lenses.

Reason 2 

There is data on the topic, Lenses displays the count, yet the topic data screen does not load. If I query the topic via SQL studio, I get the same behavior.

In this case, it can be that:

  • Kafka records are corrupted. On an AVRO topic, a rogue producer might have published a different format
  • Lenses topic settings do not match the payload data. Maybe a topic was incorrectly given AVRO format when it’s JSON or vice versa
  • If AVRO payload is involved, maybe Schema Registry is down or not accessible from the machine running Lenses

Verify 

If AVRO is involved, check Schema Registry status in Lenses dashboard screen.

Content of Lenses dashboard

To validate the other possible scenario, navigate to the SQL studio and run this query:

SET skip.bad.records=false
SELECT * FROM YOUR_TOPIC LIMIT 10

When Lenses cannot read the records these type of error will be presented:

Content of Lenses SQL studio with error message on corrupted records

By default skip.bad.records is set to true. This can be changed with a setting in Lenses config:

lenses.sql.settings.skip.bad.records=false
--
Last modified: January 22, 2024