-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
KAFKA-13337: fix of possible java.nio.file.AccessDeniedException during Con… #11371
Conversation
@heritamas pls change the title MINOR part to be KAFKA-13337 Hey @kkonstantine , could you take a look, pls? |
…ng Connect plugin directory scan org.apache.kafka.connect.runtime.isolation.PluginUtils.pluginUrls scans a path and collects plugin candidates from there. However, if a directory is not readable, it fails with AccessDeniedException instead of skipping it. This commit fixes this minor problem with the change of plugin path filter used during scanning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Ran the failed tests locally and it seems like they're flaky (ran successfully locally). @kkonstantine would you please review this too?
Thanks for the PR! I played a bit locally and while Connect logs a
KAFKA-13337 mentions |
@mimaison , correct, connect could work, but the plugins are not loaded. My connect stopped because an extension was supposed to be loaded and a |
Sorry I'm still not quite sure I fully understand the issue you're describing. As far as I can tell, with this PR, we don't get a message anymore. I think this could make debugger harder. When there's an unreadable folder in my |
IMHO we could enhance the code to log those which are not eligible for the conditions (readable, directory or jar, whatever) if that helps. |
@akatona84 Sorry this PR felt through the cracks. If I remember correctly, last time I was looking at it I had trouble replicating the issue. Can you provide steps to reproduce? |
@mimaison , np, thx for following up :) steps to fail:
It proves that connect won't load any plugin not just skipping the non-readable one. (And the server dies because of the missing config provider.) I hope it helps. |
Since #13733 is the continuation of this task, I'll close this one. |
…nect plugin directory scan
org.apache.kafka.connect.runtime.isolation.PluginUtils.pluginUrls scans a path and collects plugin candidates from there. However, if a directory is not readable, it fails with AccessDeniedException instead of skipping it. This commit fixes this minor problem with the change of plugin path filter used during scanning.
I've also added a unit test for proof.
Committer Checklist (excluded from commit message)