question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect FileQueue deserializeEvent exception handling

See original GitHub issue

Kairos: 1.2.1 Cassandra: latest, from docker Config: default + FileQueueProcessor

KairosDB can not read queue data from the disk after restart. And it lasts “forever”.

06-13|12:48:41.307 [main] INFO [Main.java:405] - ------------------------------------------ 06-13|12:48:41.307 [main] INFO [Main.java:406] - KairosDB service started 06-13|12:48:41.307 [main] INFO [Main.java:407] - ------------------------------------------ 06-13|12:49:31.700 [QueueProcessor-0] ERROR [QueueProcessor.java:192] - DeliveryThread Exception java.lang.IllegalStateException: java.io.EOFException at com.google.common.io.ByteStreams$ByteArrayDataInputStream.readUTF(ByteStreams.java:383) at org.kairosdb.core.queue.DataPointEventSerializer.deserializeEvent(DataPointEventSerializer.java:65) at org.kairosdb.core.queue.FileQueueProcessor.get(FileQueueProcessor.java:192) at org.kairosdb.core.queue.QueueProcessor$DeliveryThread.run(QueueProcessor.java:173) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.EOFException: null at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340) at java.io.DataInputStream.readUTF(DataInputStream.java:589) at java.io.DataInputStream.readUTF(DataInputStream.java:564) at com.google.common.io.ByteStreams$ByteArrayDataInputStream.readUTF(ByteStreams.java:381) ... 6 common frames omitted

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
brianhkscommented, Dec 7, 2019

Error handling was added in 1.3.0 to deal with this. Yes the work around is viable. The file backed queue gets bad data in it.

0reactions
brianhkscommented, Jul 27, 2021

Probably the only way is to use a hex editor to edit the dat files. You would have to look at the format as it is written by bigqueue and then figure out what to change.

Read more comments on GitHub >

github_iconTop Results From Across the Web

7 Common Mistakes You Should Avoid When Handling Java ...
Here are a few things you should avoid when handling exceptions in your application. New call-to-action. Mistake 1: Specify a java.lang.
Read more >
Python: Queue.Empty Exception Handling - Stack Overflow
One argument is that Method 1 is wrong because the queue being empty is not an error, and therefore should not be handled...
Read more >
Forced Exception-Handling - ACM Queue
Let's take a problem on a single system and distribute it. Someday I would like to see a paper that tells us if...
Read more >
What exception to use for incorrect file format? — oracle-tech
I parse a file and find out that it contains unsupported elemnet.
Read more >
Exception handling best practices call for secure code design
How software failures -- or exceptions -- are handled is a good indicator of ... an exception in programming as "an unplanned event...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found