Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to delete stream target! Target already closed during scheduled analytic execution #4619

Open
at055612 opened this issue Nov 22, 2024 · 1 comment
Labels
Milestone

Comments

@at055612
Copy link
Member

The owner of the analytic only had perms on the analytic and no perms on the error/dest feeds.

ERROR 2024-11-22T14:00:29.633Z Stroom P2 #18 s.d.store.impl.fs.FsStore      Unable to delete stream target! Target already closed 
stroom.data.store.api.DataException: Target already closed
	at stroom.data.store.impl.fs.FsTarget.delete(FsTarget.java:241)
	at stroom.data.store.impl.fs.FsStore.deleteTarget(FsStore.java:122)
	at stroom.pipeline.writer.StreamAppender.close(StreamAppender.java:216)
	at stroom.pipeline.writer.StreamAppender$1.close(StreamAppender.java:170)
	at stroom.pipeline.writer.StreamOutput.close(StreamOutput.java:73)
	at stroom.pipeline.writer.AbstractAppender.closeCurrentOutputStream(AbstractAppender.java:196)
	at stroom.pipeline.writer.AbstractAppender.writeFooter(AbstractAppender.java:181)
	at stroom.pipeline.writer.AbstractAppender.endProcessing(AbstractAppender.java:53)
	at stroom.pipeline.writer.AbstractWriter.endProcessing(AbstractWriter.java:201)
	at stroom.analytics.impl.DetectionWriter.end(DetectionWriter.java:97)
	at stroom.analytics.impl.DetectionsWriter.end(DetectionsWriter.java:40)
	at stroom.analytics.impl.DetectionConsumerFactory$2.end(DetectionConsumerFactory.java:118)
	at stroom.analytics.impl.DetectionConsumerProxy.end(DetectionConsumerProxy.java:87)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.process(ScheduledQueryAnalyticExecutor.java:515)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.lambda$execute$16(ScheduledQueryAnalyticExecutor.java:321)
	at stroom.analytics.impl.AnalyticErrorWriter.exec(AnalyticErrorWriter.java:72)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.execute(ScheduledQueryAnalyticExecutor.java:317)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.lambda$executeIfScheduled$14(ScheduledQueryAnalyticExecutor.java:276)
	at stroom.task.impl.TaskContextFactoryImpl.lambda$wrap$2(TaskContextFactoryImpl.java:253)
	at stroom.util.logging.LocationAwareLambdaLogger.logDurationIfDebugEnabled(LocationAwareLambdaLogger.java:307)
	at stroom.task.impl.TaskContextFactoryImpl.lambda$wrap$4(TaskContextFactoryImpl.java:253)
	at stroom.util.pipeline.scope.PipelineScopeRunnable.scopeResult(PipelineScopeRunnable.java:36)
	at stroom.task.impl.TaskContextFactoryImpl.lambda$wrap$5(TaskContextFactoryImpl.java:250)
	at stroom.task.impl.TaskContextFactoryImpl.lambda$wrap$6(TaskContextFactoryImpl.java:262)
	at stroom.security.impl.SecurityContextImpl.useAsReadResult(SecurityContextImpl.java:405)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:50)
	at jdk.proxy2/jdk.proxy2.$Proxy122.useAsReadResult(Unknown Source)
	at stroom.task.impl.TaskContextFactoryImpl.lambda$wrap$7(TaskContextFactoryImpl.java:262)
	at stroom.security.impl.SecurityContextImpl.asUserResult(SecurityContextImpl.java:337)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:50)
	at jdk.proxy2/jdk.proxy2.$Proxy122.asUserResult(Unknown Source)
	at stroom.task.impl.TaskContextFactoryImpl.lambda$wrap$11(TaskContextFactoryImpl.java:260)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.executeIfScheduled(ScheduledQueryAnalyticExecutor.java:279)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.lambda$execAnalyticAsUser$10(ScheduledQueryAnalyticExecutor.java:241)
	at stroom.security.impl.SecurityContextImpl.useAsRead(SecurityContextImpl.java:423)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.lambda$execAnalyticAsUser$11(ScheduledQueryAnalyticExecutor.java:234)
	at stroom.security.impl.SecurityContextImpl.asUser(SecurityContextImpl.java:355)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.lambda$execAnalyticAsUser$13(ScheduledQueryAnalyticExecutor.java:234)
	at stroom.util.concurrent.WorkQueue.lambda$new$0(WorkQueue.java:26)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run$$$capture(CompletableFuture.java:1804)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
ERROR 2024-11-22T14:00:29.633Z Stroom P2 #18 s.d.store.impl.fs.FsStore      Unable to delete stream target! Target already closed 
stroom.data.store.api.DataException: Target already closed
	at stroom.data.store.impl.fs.FsTarget.delete(FsTarget.java:241)
	at stroom.data.store.impl.fs.FsStore.deleteTarget(FsStore.java:122)
	at stroom.pipeline.writer.StreamAppender.close(StreamAppender.java:223)
	at stroom.pipeline.writer.StreamAppender$1.close(StreamAppender.java:170)
	at stroom.pipeline.writer.StreamOutput.close(StreamOutput.java:73)
	at stroom.pipeline.writer.AbstractAppender.closeCurrentOutputStream(AbstractAppender.java:196)
	at stroom.pipeline.writer.AbstractAppender.writeFooter(AbstractAppender.java:181)
	at stroom.pipeline.writer.AbstractAppender.endProcessing(AbstractAppender.java:53)
	at stroom.pipeline.writer.AbstractWriter.endProcessing(AbstractWriter.java:201)
	at stroom.analytics.impl.DetectionWriter.end(DetectionWriter.java:97)
	at stroom.analytics.impl.DetectionsWriter.end(DetectionsWriter.java:40)
	at stroom.analytics.impl.DetectionConsumerFactory$2.end(DetectionConsumerFactory.java:118)
	at stroom.analytics.impl.DetectionConsumerProxy.end(DetectionConsumerProxy.java:87)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.process(ScheduledQueryAnalyticExecutor.java:515)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.lambda$execute$16(ScheduledQueryAnalyticExecutor.java:321)
	at stroom.analytics.impl.AnalyticErrorWriter.exec(AnalyticErrorWriter.java:72)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.execute(ScheduledQueryAnalyticExecutor.java:317)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.lambda$executeIfScheduled$14(ScheduledQueryAnalyticExecutor.java:276)
	at stroom.task.impl.TaskContextFactoryImpl.lambda$wrap$2(TaskContextFactoryImpl.java:253)
	at stroom.util.logging.LocationAwareLambdaLogger.logDurationIfDebugEnabled(LocationAwareLambdaLogger.java:307)
	at stroom.task.impl.TaskContextFactoryImpl.lambda$wrap$4(TaskContextFactoryImpl.java:253)
	at stroom.util.pipeline.scope.PipelineScopeRunnable.scopeResult(PipelineScopeRunnable.java:36)
	at stroom.task.impl.TaskContextFactoryImpl.lambda$wrap$5(TaskContextFactoryImpl.java:250)
	at stroom.task.impl.TaskContextFactoryImpl.lambda$wrap$6(TaskContextFactoryImpl.java:262)
	at stroom.security.impl.SecurityContextImpl.useAsReadResult(SecurityContextImpl.java:405)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:50)
	at jdk.proxy2/jdk.proxy2.$Proxy122.useAsReadResult(Unknown Source)
	at stroom.task.impl.TaskContextFactoryImpl.lambda$wrap$7(TaskContextFactoryImpl.java:262)
	at stroom.security.impl.SecurityContextImpl.asUserResult(SecurityContextImpl.java:337)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:50)
	at jdk.proxy2/jdk.proxy2.$Proxy122.asUserResult(Unknown Source)
	at stroom.task.impl.TaskContextFactoryImpl.lambda$wrap$11(TaskContextFactoryImpl.java:260)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.executeIfScheduled(ScheduledQueryAnalyticExecutor.java:279)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.lambda$execAnalyticAsUser$10(ScheduledQueryAnalyticExecutor.java:241)
	at stroom.security.impl.SecurityContextImpl.useAsRead(SecurityContextImpl.java:423)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.lambda$execAnalyticAsUser$11(ScheduledQueryAnalyticExecutor.java:234)
	at stroom.security.impl.SecurityContextImpl.asUser(SecurityContextImpl.java:355)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.lambda$execAnalyticAsUser$13(ScheduledQueryAnalyticExecutor.java:234)
	at stroom.util.concurrent.WorkQueue.lambda$new$0(WorkQueue.java:26)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run$$$capture(CompletableFuture.java:1804)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
ERROR 2024-11-22T14:00:29.694Z Stroom P2 #18 s.a.i.AnalyticRuleProcessInfoOutputStreamProvider Meta with id=1893 does not exist 
java.lang.RuntimeException: Meta with id=1893 does not exist
	at stroom.meta.impl.MetaServiceImpl.updateStatus(MetaServiceImpl.java:181)
	at stroom.data.store.impl.fs.FsTarget.unlock(FsTarget.java:233)
	at stroom.data.store.impl.fs.FsTarget.close(FsTarget.java:207)
	at stroom.analytics.impl.AnalyticRuleProcessInfoOutputStreamProvider$1.close(AnalyticRuleProcessInfoOutputStreamProvider.java:105)
	at stroom.analytics.impl.AnalyticRuleProcessInfoOutputStreamProvider.close(AnalyticRuleProcessInfoOutputStreamProvider.java:120)
	at stroom.analytics.impl.AnalyticErrorWriter.exec(AnalyticErrorWriter.java:82)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.execute(ScheduledQueryAnalyticExecutor.java:317)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.lambda$executeIfScheduled$14(ScheduledQueryAnalyticExecutor.java:276)
	at stroom.task.impl.TaskContextFactoryImpl.lambda$wrap$2(TaskContextFactoryImpl.java:253)
	at stroom.util.logging.LocationAwareLambdaLogger.logDurationIfDebugEnabled(LocationAwareLambdaLogger.java:307)
	at stroom.task.impl.TaskContextFactoryImpl.lambda$wrap$4(TaskContextFactoryImpl.java:253)
	at stroom.util.pipeline.scope.PipelineScopeRunnable.scopeResult(PipelineScopeRunnable.java:36)
	at stroom.task.impl.TaskContextFactoryImpl.lambda$wrap$5(TaskContextFactoryImpl.java:250)
	at stroom.task.impl.TaskContextFactoryImpl.lambda$wrap$6(TaskContextFactoryImpl.java:262)
	at stroom.security.impl.SecurityContextImpl.useAsReadResult(SecurityContextImpl.java:405)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:50)
	at jdk.proxy2/jdk.proxy2.$Proxy122.useAsReadResult(Unknown Source)
	at stroom.task.impl.TaskContextFactoryImpl.lambda$wrap$7(TaskContextFactoryImpl.java:262)
	at stroom.security.impl.SecurityContextImpl.asUserResult(SecurityContextImpl.java:337)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:50)
	at jdk.proxy2/jdk.proxy2.$Proxy122.asUserResult(Unknown Source)
	at stroom.task.impl.TaskContextFactoryImpl.lambda$wrap$11(TaskContextFactoryImpl.java:260)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.executeIfScheduled(ScheduledQueryAnalyticExecutor.java:279)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.lambda$execAnalyticAsUser$10(ScheduledQueryAnalyticExecutor.java:241)
	at stroom.security.impl.SecurityContextImpl.useAsRead(SecurityContextImpl.java:423)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.lambda$execAnalyticAsUser$11(ScheduledQueryAnalyticExecutor.java:234)
	at stroom.security.impl.SecurityContextImpl.asUser(SecurityContextImpl.java:355)
	at stroom.analytics.impl.ScheduledQueryAnalyticExecutor.lambda$execAnalyticAsUser$13(ScheduledQueryAnalyticExecutor.java:234)
	at stroom.util.concurrent.WorkQueue.lambda$new$0(WorkQueue.java:26)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run$$$capture(CompletableFuture.java:1804)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
@at055612 at055612 added the bug label Nov 22, 2024
@at055612 at055612 added this to the v7.5 milestone Nov 22, 2024
@at055612
Copy link
Member Author

at055612 commented Nov 22, 2024

Error seems to have gone away after I granted READ on the error/dest feed to the user, however no stream is written despite the DetectionsWriter accepting a detection. It seems to silently fail. Changing the owner of the rule to admin allowed the detections to be written to the stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant