-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Possibly misleading error "ALPN is not configured properly" when Java security manager is enabled #4163
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
Comments
Can you describe how it was silently being blocked? Was there an exception that got swallowed somewhere? |
I couldn't find an exception being thrown, presumably there was one, somewhere. There is no mention of security manager in the stacktrace:
|
We should add this to the troubleshooting section. |
This is a code problem. We don't expose the tcnative error naturally (although a user could find it if they wanted). I try to address this at https://github.com/grpc/grpc-java/pull/3401/files#diff-5f981c27dfe25e42ae666269a48b0488R229 . |
Fixed by #3401 |
I just spent a day on a wild goose chase trying to figure out what was causing this error:
ALPN is not configured properly. See https://github.com/grpc/grpc-java/blob/master/SECURITY.md#troubleshooting for more information.
Reading that page, and looking at my Maven dependency tree, I thought I had some kind of version conflict. I spent a day uselessly swapping out different library versions to try and fix this. In frustration I created a completely new project, with the same dependencies, and it worked. I turns out my app is using the Java Security Manager, and it was silently blocking tcnative from being loaded by netty-tcnative-boringssl-static.
Adding these three permissions fixed it:
I couldn't figure out how to whitelist only the tcnative library, as the Netty Native Library Loader appends a random number to the library name every time (ironically, probably for security reasons).
The text was updated successfully, but these errors were encountered: