All Apps and Add-ons

DB Connect MySQL can't parse timestamp

rapmancz
Explorer

Hello,

I am using DB connect 3.1.1 to get data from MySQL. I have 15 working inputs with rising id column and timestamp (DATETIME) to index data. Server and table structure is same for all inputs.
But for 4 next inputs, I get this message in db_connect_server.log :

2018-01-23 00:39:47.459 +0100  [QuartzScheduler_Worker-28] ERROR org.easybatch.core.job.BatchJob - Unable to open record reader
java.time.format.DateTimeParseException: Text '2017-12-04 10:58:57.0' could not be parsed, unparsed text found at index 19
    at java.time.format.DateTimeFormatter.parseResolved0(Unknown Source)
    at java.time.format.DateTimeFormatter.parse(Unknown Source)
    at com.splunk.dbx.server.dbinput.recordreader.columnprocessor.RowWithTimeProcessor.extractTimestampFromString(RowWithTimeProcessor.java:88)
    at com.splunk.dbx.server.dbinput.recordreader.columnprocessor.RowWithTimeProcessor.apply(RowWithTimeProcessor.java:70)
    at com.splunk.dbx.server.dbinput.recordreader.columnprocessor.RowWithTimeProcessor.apply(RowWithTimeProcessor.java:28)
    at com.google.common.collect.Iterators$7.transform(Iterators.java:750)
    at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:47)
    at com.google.common.collect.Iterators$6.computeNext(Iterators.java:616)
    at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)
    at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)
    at com.splunk.dbx.server.dbinput.recordreader.iterator.EventPayloadRecordIterator.hasNext(EventPayloadRecordIterator.java:76)
    at com.splunk.dbx.server.dbinput.recordreader.DbInputRecordReader.open(DbInputRecordReader.java:92)
    at org.easybatch.core.job.BatchJob.openReader(BatchJob.java:117)
    at org.easybatch.core.job.BatchJob.call(BatchJob.java:74)
    at org.easybatch.extensions.quartz.Job.execute(Job.java:59)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
2018-01-23 00:39:47.459 +0100  [QuartzScheduler_Worker-28] INFO  org.easybatch.core.job.BatchJob - Job 'psa-wfk-lc_04307600_xx' finished with status: FAILED

The timestamp column is also DATETIME and everything is fine in GUI wizard to select column for timestamp. Please do you have any idea what can be wrong?

0 Karma

EmEdwards
Path Finder

Did you resolve this ? I have the exact same problem at the moment. My same query worked in version 2.4 we upgraded to 3.1.1 and now same query same data input doesn't work due to time format with the same error you had.

0 Karma

Richfez
SplunkTrust
SplunkTrust

"Index 19" is, if I count correctly, the "." separating seconds from the "0" for tenths of a second. That brings up a couple of possibilities. First, double check against a known-good one (one that works) exactly what type of data the data and time is coming from. Then check exactly what the query is you are running. I'll bet either the column types are different, or there's a cast/convert (or whatever MySQL uses for that) in the ones that work. For that matter, what's the timestamp time specifier you put into the GUI? (Do you still have to do that?)

0 Karma

p_gurav
Champion

Could you try converting timestamp field in sql query?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Quantify Your Splunk Investment Impact: Introducing Savings Metrics to Value Insights

Building on the foundation established in our initial Value Insights releases, we are introducing the Savings ...

Event Series: Telemetry Pipeline Management

Balancing Scale and Spend: Gaining Control Over High-Volume Metrics in Splunk Observability Cloud As ...

Kick the Tires Before You Commit: A Hands-On Tour of the Splunk Observability Cloud ...

Evaluating an enterprise observability platform usually goes like this: fill out a form, get a free trial with ...