I saw the 2.17.1 had some fixes for security analytics and updated, but it is still the same issue in that release as well.
Here’s the output of both my OpenSearch and OpenSearch Dashboards containers:
opensearch-1 | [2024-10-07T14:40:36,318][ERROR][o.o.s.t.TransportIndexDetectorAction] [opensearch] PERF_DEBUG_SAP: Fetching alias path pairs to construct rule_field_names
dashboards-1 | Security Analytics - DetectorsService - createDetector: StatusCodeError: [security_analytics_exception] null cannot be cast to non-null type kotlin.collections.MutableMap<kotlin.String, kotlin.Any>
dashboards-1 | at respond (/usr/share/opensearch-dashboards/node_modules/elasticsearch/src/lib/transport.js:349:15)
dashboards-1 | at checkRespForFailure (/usr/share/opensearch-dashboards/node_modules/elasticsearch/src/lib/transport.js:306:7)
dashboards-1 | at HttpConnector.<anonymous> (/usr/share/opensearch-dashboards/node_modules/elasticsearch/src/lib/connectors/http.js:173:7)
dashboards-1 | at IncomingMessage.wrapper (/usr/share/opensearch-dashboards/node_modules/lodash/lodash.js:4991:19)
dashboards-1 | at IncomingMessage.emit (node:events:529:35)
dashboards-1 | at IncomingMessage.emit (node:domain:489:12)
dashboards-1 | at endReadableNT (node:internal/streams/readable:1400:12)
dashboards-1 | at processTicksAndRejections (node:internal/process/task_queues:82:21) {
dashboards-1 | status: 500,
dashboards-1 | displayName: 'InternalServerError',
dashboards-1 | path: '/_plugins/_security_analytics/detectors',
dashboards-1 | query: {},
dashboards-1 | body: {
dashboards-1 | error: {
dashboards-1 | root_cause: [Array],
dashboards-1 | type: 'security_analytics_exception',
dashboards-1 | reason: 'null cannot be cast to non-null type kotlin.collections.MutableMap<kotlin.String, kotlin.Any>',
dashboards-1 | caused_by: [Object]
dashboards-1 | },
dashboards-1 | status: 500
dashboards-1 | },
dashboards-1 | statusCode: 500,
dashboards-1 | response: '{"error":{"root_cause":[{"type":"security_analytics_exception","reason":"null cannot be cast to non-null type kotlin.collections.MutableMap<kotlin.String, kotlin.Any>"}],"type":"security_analytics_exception","reason":"null cannot be cast to non-null type kotlin.collections.MutableMap<kotlin.String, kotlin.Any>","caused_by":{"type":"exception","reason":"org.opensearch.commons.alerting.util.AlertingException: null cannot be cast to non-null type kotlin.collections.MutableMap<kotlin.String, kotlin.Any>"}},"status":500}',
dashboards-1 | toString: [Function (anonymous)],
dashboards-1 | toJSON: [Function (anonymous)]
dashboards-1 | }
opensearch-1 | [2024-10-07T14:40:38,125][ERROR][o.o.a.t.TransportIndexMonitorAction] [opensearch] failed to index doc level queries monitor zi9sZ5IBFQb7rt9T0kWQ. deleting monitor
opensearch-1 | java.lang.NullPointerException: null cannot be cast to non-null type kotlin.collections.MutableMap<kotlin.String, kotlin.Any>
opensearch-1 | at org.opensearch.alerting.util.DocLevelMonitorQueries.traverseMappingsAndUpdate(DocLevelMonitorQueries.kt:228) ~[opensearch-alerting-2.17.1.0.jar:2.17.1.0]
opensearch-1 | at org.opensearch.alerting.util.DocLevelMonitorQueries.traverseMappingsAndUpdate(DocLevelMonitorQueries.kt:228) ~[opensearch-alerting-2.17.1.0.jar:2.17.1.0]
opensearch-1 | at org.opensearch.alerting.util.DocLevelMonitorQueries.traverseMappingsAndUpdate(DocLevelMonitorQueries.kt:228) ~[opensearch-alerting-2.17.1.0.jar:2.17.1.0]
opensearch-1 | at org.opensearch.alerting.util.DocLevelMonitorQueries.getAllConflictingFields(DocLevelMonitorQueries.kt:603) ~[opensearch-alerting-2.17.1.0.jar:2.17.1.0]
opensearch-1 | at org.opensearch.alerting.util.DocLevelMonitorQueries.indexDocLevelQueries(DocLevelMonitorQueries.kt:280) ~[opensearch-alerting-2.17.1.0.jar:2.17.1.0]
opensearch-1 | at org.opensearch.alerting.transport.TransportIndexMonitorAction$IndexMonitorHandler.indexDocLevelMonitorQueries(TransportIndexMonitorAction.kt:605) ~[opensearch-alerting-2.17.1.0.jar:2.17.1.0]
opensearch-1 | at org.opensearch.alerting.transport.TransportIndexMonitorAction$IndexMonitorHandler.access$indexDocLevelMonitorQueries(TransportIndexMonitorAction.kt:268) ~[opensearch-alerting-2.17.1.0.jar:2.17.1.0]
opensearch-1 | at org.opensearch.alerting.transport.TransportIndexMonitorAction$IndexMonitorHandler$indexDocLevelMonitorQueries$1.invokeSuspend(TransportIndexMonitorAction.kt) ~[opensearch-alerting-2.17.1.0.jar:2.17.1.0]
opensearch-1 | at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) [kotlin-stdlib-1.8.21.jar:1.8.21-release-380(1.8.21)]
opensearch-1 | at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233) [kotlinx-coroutines-core-1.1.1.jar:?]
opensearch-1 | at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594) [kotlinx-coroutines-core-1.1.1.jar:?]
opensearch-1 | at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60) [kotlinx-coroutines-core-1.1.1.jar:?]
opensearch-1 | at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742) [kotlinx-coroutines-core-1.1.1.jar:?]
opensearch-1 | [2024-10-07T14:40:38,155][ERROR][o.o.c.a.u.AlertingException] [opensearch] Alerting error: java.lang.NullPointerException: null cannot be cast to non-null type kotlin.collections.MutableMap<kotlin.String, kotlin.Any>
opensearch-1 | [2024-10-07T14:40:38,156][ERROR][o.o.s.t.TransportIndexDetectorAction] [opensearch] exception:
opensearch-1 | org.opensearch.commons.alerting.util.AlertingException: null cannot be cast to non-null type kotlin.collections.MutableMap<kotlin.String, kotlin.Any>
opensearch-1 | at org.opensearch.commons.alerting.util.AlertingException$Companion.wrap(AlertingException.kt:70) ~[?:?]
opensearch-1 | at org.opensearch.alerting.transport.TransportIndexMonitorAction$IndexMonitorHandler.indexMonitor(TransportIndexMonitorAction.kt:573) ~[?:?]
opensearch-1 | at org.opensearch.alerting.transport.TransportIndexMonitorAction$IndexMonitorHandler.access$indexMonitor(TransportIndexMonitorAction.kt:268) ~[?:?]
opensearch-1 | at org.opensearch.alerting.transport.TransportIndexMonitorAction$IndexMonitorHandler$indexMonitor$1.invokeSuspend(TransportIndexMonitorAction.kt) ~[?:?]
opensearch-1 | at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) ~[?:?]
opensearch-1 | at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233) ~[?:?]
opensearch-1 | at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594) ~[?:?]
opensearch-1 | at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60) ~[?:?]
opensearch-1 | at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742) ~[?:?]
opensearch-1 | Caused by: java.lang.Exception: java.lang.NullPointerException: null cannot be cast to non-null type kotlin.collections.MutableMap<kotlin.String, kotlin.Any>
opensearch-1 | ... 9 more
opensearch-1 | [2024-10-07T14:40:38,157][ERROR][o.o.s.u.SecurityAnalyticsException] [opensearch] Security Analytics error:
opensearch-1 | org.opensearch.commons.alerting.util.AlertingException: null cannot be cast to non-null type kotlin.collections.MutableMap<kotlin.String, kotlin.Any>
opensearch-1 | at org.opensearch.commons.alerting.util.AlertingException$Companion.wrap(AlertingException.kt:70) ~[?:?]
opensearch-1 | at org.opensearch.alerting.transport.TransportIndexMonitorAction$IndexMonitorHandler.indexMonitor(TransportIndexMonitorAction.kt:573) ~[?:?]
opensearch-1 | at org.opensearch.alerting.transport.TransportIndexMonitorAction$IndexMonitorHandler.access$indexMonitor(TransportIndexMonitorAction.kt:268) ~[?:?]
opensearch-1 | at org.opensearch.alerting.transport.TransportIndexMonitorAction$IndexMonitorHandler$indexMonitor$1.invokeSuspend(TransportIndexMonitorAction.kt) ~[?:?]
opensearch-1 | at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) ~[?:?]
opensearch-1 | at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233) ~[?:?]
opensearch-1 | at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594) ~[?:?]
opensearch-1 | at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60) ~[?:?]
opensearch-1 | at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742) ~[?:?]
opensearch-1 | Caused by: java.lang.Exception: java.lang.NullPointerException: null cannot be cast to non-null type kotlin.collections.MutableMap<kotlin.String, kotlin.Any>
opensearch-1 | ... 9 more
opensearch-1 | [2024-10-07T14:40:38,159][WARN ][r.suppressed ] [opensearch] path: /_plugins/_security_analytics/detectors, params: {}
opensearch-1 | org.opensearch.securityanalytics.util.SecurityAnalyticsException: null cannot be cast to non-null type kotlin.collections.MutableMap<kotlin.String, kotlin.Any>
opensearch-1 | at org.opensearch.securityanalytics.util.SecurityAnalyticsException.wrap(SecurityAnalyticsException.java:68) ~[?:?]
opensearch-1 | at org.opensearch.securityanalytics.util.SecurityAnalyticsException.wrap(SecurityAnalyticsException.java:43) ~[?:?]
opensearch-1 | at org.opensearch.securityanalytics.transport.TransportIndexDetectorAction$AsyncIndexDetectorsAction.lambda$finishHim$0(TransportIndexDetectorAction.java:1757) ~[?:?]
opensearch-1 | at org.opensearch.action.ActionRunnable.lambda$supply$0(ActionRunnable.java:74) [opensearch-2.17.1.jar:2.17.1]
opensearch-1 | at org.opensearch.action.ActionRunnable$2.doRun(ActionRunnable.java:89) ~[opensearch-2.17.1.jar:2.17.1]
opensearch-1 | at org.opensearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:1005) [opensearch-2.17.1.jar:2.17.1]
opensearch-1 | at org.opensearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:52) [opensearch-2.17.1.jar:2.17.1]
opensearch-1 | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) [?:?]
opensearch-1 | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) [?:?]
opensearch-1 | at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
opensearch-1 | Caused by: java.lang.Exception: org.opensearch.commons.alerting.util.AlertingException: null cannot be cast to non-null type kotlin.collections.MutableMap<kotlin.String, kotlin.Any>