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

Indefinite errors occur if the AWS Logs/Flow Logs inputs are quickly started/stoped #89

Open
danotorrey opened this issue Oct 17, 2018 · 1 comment

Comments

@danotorrey
Copy link
Contributor

The AWS Logs/Flow Logs inputs do not properly handle rapid start/stop attempts. If the input is started, then stopped and started again (possibly with an accidental double-click), and instance of the AWS Kinesis worker will enter into a persistent error state and log the following message every few seconds forever. The only way to stop this currently is to completely restart the Graylog server.

This is not a common scenario (and I don't think this is a high-priority issue), but I wanted to capture it as an issue, so that perhaps it could be addressed some day.

java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@278fd2ee rejected from java.util.concurrent.ThreadPoolExecutor@23b05240[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2063) ~[?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830) ~[?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1379) ~[?:1.8.0_181]
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) ~[?:1.8.0_181]
at com.amazonaws.services.kinesis.leases.impl.LeaseRenewer.renewLeases(LeaseRenewer.java:105) ~[amazon-kinesis-client-1.9.0.jar:?]
at com.amazonaws.services.kinesis.leases.impl.LeaseCoordinator.runRenewer(LeaseCoordinator.java:258) ~[amazon-kinesis-client-1.9.0.jar:?]
at com.amazonaws.services.kinesis.leases.impl.LeaseCoordinator$RenewerRunnable.run(LeaseCoordinator.java:182) [amazon-kinesis-client-1.9.0.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_181]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_181]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]

@danotorrey
Copy link
Contributor Author

I talked to @bernd about this. This is a challenge to fix, because the Kinesis worker maintains it's own worker thread pool. Shutdown requires termination of those and release of other resources. We cannot simply terminate the parent worker.

Perhaps pausing the worker startup until previous instances have shut down is an option.

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

No branches or pull requests

1 participant