Hi,
we’re currently running Nexus OSS v.3.70.1-02.
The ‘Statistics - recalculate vulnerabilities statistics’ automated task systematically returns the error below.
How can we fix that?
2024-08-07 13:56:50,518+0200 INFO [quartz-10-thread-15] *SYSTEM com.sonatype.nexus.vulnerability.internal.log.VulnerabilityStatisticsTask - Task information:
2024-08-07 13:56:50,518+0200 INFO [quartz-10-thread-15] *SYSTEM com.sonatype.nexus.vulnerability.internal.log.VulnerabilityStatisticsTask - ID: 263d80b6-062a-4bab-9347-c5d83a1c4d0f
2024-08-07 13:56:50,519+0200 INFO [quartz-10-thread-15] *SYSTEM com.sonatype.nexus.vulnerability.internal.log.VulnerabilityStatisticsTask - Type: repository.vulnerability.statistics
2024-08-07 13:56:50,519+0200 INFO [quartz-10-thread-15] *SYSTEM com.sonatype.nexus.vulnerability.internal.log.VulnerabilityStatisticsTask - Name: Statistics - recalculate vulnerabilities statistics
2024-08-07 13:56:50,524+0200 INFO [quartz-10-thread-15] *SYSTEM com.sonatype.nexus.vulnerability.internal.log.VulnerabilityStatisticsTask - Description: Statistics - recalculate vulnerabilities statistics
2024-08-07 13:56:50,633+0200 ERROR [quartz-10-thread-15] *SYSTEM com.sonatype.nexus.vulnerability.internal.log.VulnerabilityStatisticsTask - Failed to run task 'Statistics - recalculate vulnerabilities statistics'
java.lang.NullPointerException: null
at java.base/java.util.regex.Matcher.getTextLength(Matcher.java:1770)
at java.base/java.util.regex.Matcher.reset(Matcher.java:416)
at java.base/java.util.regex.Matcher.<init>(Matcher.java:253)
at java.base/java.util.regex.Pattern.matcher(Pattern.java:1134)
at com.sonatype.nexus.vulnerability.internal.log.RequestLogAggregator.extractDate(RequestLogAggregator.java:116)
at com.sonatype.nexus.vulnerability.internal.log.RequestLogAggregator.parseLogFiles(RequestLogAggregator.java:98)
at com.sonatype.nexus.vulnerability.internal.log.RequestLogAggregator.versionRequestCount(RequestLogAggregator.java:71)
at com.sonatype.nexus.vulnerability.internal.log.VulnerabilityRadarService.recalculateStatistics(VulnerabilityRadarService.java:68)
at com.sonatype.nexus.vulnerability.internal.log.VulnerabilityStatisticsTask.execute(VulnerabilityStatisticsTask.java:37)
at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:105)
at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:143)
at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:106)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.sonatype.nexus.quartz.internal.QuartzThreadPool.lambda$0(QuartzThreadPool.java:145)
at org.sonatype.nexus.thread.internal.MDCAwareRunnable.run(MDCAwareRunnable.java:40)
at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
2024-08-07 13:56:50,633+0200 INFO [quartz-10-thread-15] *SYSTEM com.sonatype.nexus.vulnerability.internal.log.VulnerabilityStatisticsTask - Task complete