KB Article #182461
Missing data in Analytica due to corrupted event.log with {} entries
Problem
Due to the fact that in the event.log there were some empty entries like "{}", monitoring tab of APIM and Analytics were not showing data anymore.
A Corrupted event.log for this scenario looks like this:
<<
{"type":"header", "logCreationTime":"2023-01-27 20:00:25.453", "hostname":"192-168-0-106.rdsnet.ro", "domainId":"34f50ea5-cb3f-4d0d-af05-951fc7beb666", "groupId":"group-2", "groupName":"QuickStart Group", "serviceId":"instance-1", "serviceName":"QuickStart Server", "version":"v7.7.0-Internal"}
{} {"type":"system", "time":1674842425451, "diskUsed":44, "instCpu":2, "sysCpu":4, "instMem":1659952, "sysMem":8254660, "sysMemTotal":9219076}
{} {"type":"transaction", "time":1674842463586, "path":"/healthcheck", "protocol":"http", "protocolSrc":"8080", "duration":2, "status":"success", "serviceContexts":[], "customMsgAtts":{}, "correlationId":"5f11d463092b7ebca32f28ee", "legs":[{"uri":"/healthcheck", "status":200, "statustext":"OK", "method":"GET", "vhost":null, "wafStatus":0, "bytesSent":236, "bytesReceived":89, "remoteName":"127.0.0.1", "remoteAddr":"127.0.0.1", "localAddr":"127.0.0.1", "remotePort":"46242", "localPort":"8080", "sslsubject":null, "leg":0, "timestamp":1674842463583, "duration":0, "serviceName":null, "subject":null, "operation":null, "type":"http", "finalStatus":"Pass"}]}
>>
In the ANM logs, due to the fact that the logs couldn't be processed by the ANM, there was this error:
<<
ERROR 19/Dec/2022:20:15:05.452 [16d4:000000000000000000000000] Failed to log events to database:
java.lang.NullPointerException
at com.vordel.metrics.eventlog.reader.EventLogParser.next(EventLogParser.java:44)
at com.vordel.metrics.eventlog.reader.EventLogProcessor.process(EventLogProcessor.java:63)
at com.vordel.metrics.eventlog.reader.EventLogProcessor.process(EventLogProcessor.java:43)
at com.vordel.metrics.generator.MetricsEventLogRetriever$EventLogRetrieverAction.run(MetricsEventLogRetriever.java:165)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
>>
Resolution
One possible cause for this error is Dynatrace.
Confirm if Dynatrace is the cause for this error. Try to disable Dynatrace, empty the current event.log file, restart the instance. Check again if when any transaction is done, the "{}" are not written anymore to the event.log.
Solution might be (done by Dynatrace team)
- try first to deactivate one java option("Trace context enrichment for logs " was set at tenant level )
- or try to update Dynatrace version