Getting Data In

Why does Splunk DB Connect cause duplicate events after a Splunk restart?

nibinabr
Communicator

I started noticing some duplicate events in my logs recently. As I was curious to know what was happening, I searched in the dbx logs to see if something went wrong around the time I could see the duplicates. I saw the message "WARN:Shutdown - Performing Java Bridge Server shutdown... " in the logs close to the time when the duplicates occurred and I guess this message was logged due to splunk restart.

After taking a closer look at the logs, my understanding is that whenever splunk is restarted, the last rising column value recorded before the Java Bridge Server shutdown is somehow lost, and when splunk is up and running again, it doesn't see the actual latest rising column value. Instead, it sees the value before that. Hence, if there are new events between the two rising column time period, they will get indexed again. The duplicates that I see in the logs supports this assumption.

Example is:

3/25/15 3:31:00.019 PM Applying latest tail.rising.column value=2015-03-25 15:27:49.0
3/25/15 3:29:00.019 PM Applying latest tail.rising.column value=2015-03-25 15:25:22.0

3/25/15 3:25:00.019 PM WARN:Shutdown - Performing Java Bridge Server shutdown...

3/25/15 3:24:00.018 PM Applying latest tail.rising.column value=2015-03-25 15:21:53.0
3/25/15 3:22:00.020 PM Applying latest tail.rising.column value=2015-03-25 15:19:55.0

In the above scenario, when splunk restarts, all the events with last_modified_time > 2015-03-25 15:19:55.0 will be indexed which causes duplicates if there are new events between 2015-03-25 15:21:53.0 and 2015-03-25 15:19:55.0.

Anyone came across such an issue ??

0 Karma
1 Solution

jcoates_splunk
Splunk Employee
Splunk Employee

Jbridge shutdown can be very slow on some systems, and since it's responsible for tracking the rising column, any sort of system kill that occurs will make a hash of things. DB Connect 2 has a better design for this scenario and might be a good choice for you.

View solution in original post

jcoates_splunk
Splunk Employee
Splunk Employee

Jbridge shutdown can be very slow on some systems, and since it's responsible for tracking the rising column, any sort of system kill that occurs will make a hash of things. DB Connect 2 has a better design for this scenario and might be a good choice for you.

nibinabr
Communicator

Thanks jcoates_splunk.

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...