Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-25293

Logsearch: logfeeder throws NPE when updating checkpoint

    XMLWordPrintableJSON

Details

    Description

      Every time when logfeeder sends a log entry to solr it updates the corresponding checkpoint file. After a log file rolled over every subsequent checkpoint file update fails with NPE

      2019-06-04 00:00:13,611 [OutputSolr,audit_logs,worker=0] ERROR org.apache.ambari.logfeeder.util.LogFeederUtil (LogFeederUtil.java:134) - Caught exception checkIn. , input=input:source=file, path=/var/log/hadoop/hdfs/hdfs-audit.log
      java.lang.NullPointerException
              at org.apache.ambari.logfeeder.input.file.FileCheckInHelper.checkIn(FileCheckInHelper.java:45)
              at org.apache.ambari.logfeeder.input.InputFile.checkIn(InputFile.java:147)
              at org.apache.ambari.logfeeder.input.InputFile.checkIn(InputFile.java:49)
              at org.apache.ambari.logfeeder.output.OutputSolr$SolrWorkerThread.addToSolr(OutputSolr.java:472)
              at org.apache.ambari.logfeeder.output.OutputSolr$SolrWorkerThread.sendToSolr(OutputSolr.java:380)
              at org.apache.ambari.logfeeder.output.OutputSolr$SolrWorkerThread.run(OutputSolr.java:340)
      

      There is no entry in the map returned by inputFile.getCheckPointFiles() with the new file key
      https://github.com/apache/ambari/blob/fd3024cc2d7e8493446ccf42e81ed52497379cce/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/input/file/FileCheckInHelper.java#L43

      Attachments

        Issue Links

          Activity

            People

              kkasa Krisztian Kasa
              kkasa Krisztian Kasa
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h