-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured. when trying to use PubSub #2398
Comments
Hi @sceee, can you please post your dependency tree output? (run |
Hi @vam-google , the one's with the
Do you need the complete dependency tree, too? Please let me know if you need something else and thanks in advance! |
What system are you using? I had similar problem but because of alpine linux |
@Mistic92 this happened on my development machine which is Windows 10 x64, latest update. |
I just get similar error with Spring Boot 2.0.0.M4. On 1.5.6.RELEASE its ok
|
@meltsufin Any suggestions? |
I am having the exact same issue (OSX 10.12.6) I assume this is because the Subscriber gets messages pushed and needs a webserver for this. Would netty-tcnative-boringssl-static still be needed if it were to poll? The builder has a package protected method to enable or disable streaming (https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Subscriber.java#L607) but we cannot use it because it is not public. |
@Mistic92 I believe the issue occurs in spring-boot 2.0.0.M4 because it brings in io.netty:*:4.1.15. Final, google libs seem to bring 4.1.14.Final If you use |
Google libs bring in: netty-tcnative-boringssl-static 1.1.33.Fork26 which is incompatible with the 2.x.x of netty-tcnative I'll ask the client library team if they can shade or upgrade this stuff. |
Thank you @lesv |
@lesv is there a workaround for this problem I could use while waiting for the client library team to fix this? |
@sceee There is probably some shading you could to to work around this. What @vam-google was trying to get in your dependency tree was to figure out which library was causing the problem and to recommend a solution. If you give us the full tree, we might be able to help. If it has things you don't want the public to see, just remove those lines. |
@lesv @vam-google oh sorry, I did misinterpret it. I thought you already figured out the problem and the solution will be to update netty internally in the PubSub lib. So here's my full tree for the gradle configuration runtime. If this configuration is not enough, please let me know. I wanted to avoid having it too much. The application itself:
My own library used by the application - that lib is containing the PubSub lib:
|
Wow! You've got three versions of Netty between Flink & Flakka & Zookeeper. We aren't the oldest version. The maven |
grpc/grpc-java#3025 is the canonical issue for this. |
@lesv thanks very much for your help. I will try to solve it by locking to a specific version. I will let you know if it worked or not. |
@lesv unfortunately I could not solve it. I tried locking to netty-all 4.1.14.Final by including So I can't lock to a 4.x version of netty but also not to a 3.x version of netty-all since . Do you have any more hint for me how to get this solved? |
We are having a conversation about Shading today. You are probably at the wrong place to be doing this, but if that inspires you... (ideally you would get Flink and Flakka to do it in places. |
rather than locking in all of the netty versions, which would be hard to do, try excluding them from all the dependencies that has it w/ the exclusion blocks, and then add an netty dependency explicitly. See a working draft of gRPC troubleshooting here: https://github.com/saturnism/grpc-java/blob/04d3218f4443662e49a46fbd95d4918e20e4835e/SECURITY.md#troubleshooting |
Thank you very much for your help @lesv and @saturnism . Unfortunately I was not able to sort it out until now but I filed an issue at flink's bugtracker to upgrade/unify the netty stuff in their part. |
This issue is related to Java and gRPC in general, not just pubsub. @lesv and @saturnism would you mind if I reassign this to you? |
This issue may get fixed by #2555 |
This is the #1 reason large apps can't use this library -- it's a big deal and needs to get fixed. |
I'll reassign this to @garrettjonesgoogle since he's assigned to #2555 |
As of the latest release, we've begun shading netty. As I understand this, this should now be solved. I'll close this but please reopen if issue persists. |
Hi,
I am trying to use the google cloud libraries to connect to PubSub but I am getting the following exception when trying to execute the following code:
The last line in my code (
subscriber.startAsync().awaitRunning();
) is the position where the upper exception origines from.Am I using something wrong or is this a bug?
I am using
compile group: 'com.google.cloud', name: 'google-cloud-pubsub', version:'0.22.0-beta'
as gradle dependency.The text was updated successfully, but these errors were encountered: