-
Notifications
You must be signed in to change notification settings - Fork 225
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
java.nio.channels.CancelledKeyException #3866
Comments
This is additional information to help troubleshoot the problem.
|
Thanks @jjarokergc, we are going to start looking into this issue. Another user in the community Slack reported hitting this issue with Puppetboard as well. I have not had the chance to spin up Puppetboard yet, but the user in Slack reported that setting |
Previously, any query a client issued after the first on a given connection might provoke a CancelledKeyException when it tried to register the query/socket/channel with the monitor because the selection key for a given channel for a given selector is unique, and a cancelled key is only cleaned up during the next call to select for the relevant selector. Any attempt to register a channel with a selector between the cancellation of the previous key for that channel and the clean up in the next select will provoke the CancelledKeyException. To address the issue, adjust the registration code to retry whenever it encounters that exception, until it succeeds. While it's retrying, the monitor select loop, which will have been woken up by the previous query's forget, will issue a new select call, removing the canceled key. Fixes: puppetlabs#3866
Previously, any query a client issued after the first on a given connection might provoke a CancelledKeyException when it tried to register the query/socket/channel with the monitor because the selection key for a given channel for a given selector is unique, and a cancelled key is only cleaned up during the next call to select for the relevant selector. Any attempt to register a channel with a selector between the cancellation of the previous key for that channel and the clean up in the next select will provoke the CancelledKeyException. To address the issue, adjust the registration code to retry whenever it encounters that exception, until it succeeds. While it's retrying, the monitor select loop, which will have been woken up by the previous query's forget, will issue a new select call, removing the canceled key. Fixes: puppetlabs#3866
Previously, any query a client issued after the first on a given connection might provoke a CancelledKeyException when it tried to register the query/socket/channel with the monitor because the selection key for a given channel for a given selector is unique, and a cancelled key is only cleaned up during the next call to select for the relevant selector. Any attempt to register a channel with a selector between the cancellation of the previous key for that channel and the clean up in the next select will provoke the CancelledKeyException. To address the issue, adjust the registration code to retry whenever it encounters that exception, until it succeeds. While it's retrying, the monitor select loop, which will have been woken up by the previous query's forget, will issue a new select call, removing the canceled key. Fixes: puppetlabs#3866
Previously, any query a client issued after the first on a given connection might provoke a CancelledKeyException when it tried to register the query/socket/channel with the monitor because the selection key for a given channel for a given selector is unique, and a cancelled key is only cleaned up during the next call to select for the relevant selector. Any attempt to register a channel with a selector between the cancellation of the previous key for that channel and the clean up in the next select will provoke the CancelledKeyException. To address the issue, adjust the registration code to retry whenever it encounters that exception, until it succeeds. While it's retrying, the monitor select loop, which will have been woken up by the previous query's forget, will issue a new select call, removing the canceled key. Fixes: puppetlabs#3866
Previously, any query a client issued after the first on a given connection might provoke a CancelledKeyException when it tried to register the query/socket/channel with the monitor because the selection key for a given channel for a given selector is unique, and a cancelled key is only cleaned up during the next call to select for the relevant selector. Any attempt to register a channel with a selector between the cancellation of the previous key for that channel and the clean up in the next select will provoke the CancelledKeyException. To address the issue, adjust the registration code to retry whenever it encounters that exception until it succeeds. While it's retrying, the monitor select loop, which will have been woken up by the previous query's forget, will issue a new select call, removing the canceled key. Fixes: puppetlabs#3866
The fix for this bug has been released in PuppetDB 8.1.1 |
Hello @austb, Thank you. I just installed version 8.1.1 and Puppet board works without error messages in the logs. Jon |
I am attempting to troubleshoot the following problem and was hoping someone could point me in the right direction. Is this a problem in puppet dashboard or puppetdb?
Describe the Bug
Puppetdb is failing with the error below in a fresh installation of a 3-node setup of puppet master, db and db01 in a staging environment:
The same configuration is operating normally in my production environment:
This sometimes appears on puppet dashboard the following error. Other times, the 3 nodes are shown in "unreported" state (see below).
Puppet server appears to work properly with no errors, so I am not sure if this defect is in puppet dashboard or puppetdb.
Steps to Reproduce
Additional Context
Unreported states
Stack Trace
The text was updated successfully, but these errors were encountered: