Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Jetty ALPN/NPN failure #327

Closed
dsyer opened this issue Jan 23, 2018 · 6 comments
Closed

Jetty ALPN/NPN failure #327

dsyer opened this issue Jan 23, 2018 · 6 comments

Comments

@dsyer
Copy link
Contributor

dsyer commented Jan 23, 2018

I can't build from master (even before 4c02b13) because of a failure in the Pub/Sub Module

Caused by: java.lang.ClassNotFoundException: org/eclipse/jetty/alpn/ALPN
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at io.grpc.netty.JettyTlsUtil.isJettyAlpnConfigured(JettyTlsUtil.java:34)
	at io.grpc.netty.GrpcSslContexts.selectApplicationProtocolConfig(GrpcSslContexts.java:153)
@joaoandremartins
Copy link
Contributor

I'm not being able to reproduce this.
Does it fail when you're doing mvn clean install from the project root?
Or when you're building an app that uses our modules?

@dsyer
Copy link
Contributor Author

dsyer commented Jan 23, 2018

Just building from root. Maybe a platform thing? Did you try with Linux.

@joaoandremartins
Copy link
Contributor

I'm using Linux too. I even tried deleting my .m2 folder, but still got the same result.
Travis is passing, I'm wondering if this is anything with your local setup?

@dsyer
Copy link
Contributor Author

dsyer commented Jan 24, 2018

This issue suggests a classpath problem: googleapis/google-cloud-java#2740, but it looks fine to me (the versions are a supported combination of the projects listed). I suspect you have something in your environment that makes it work. E.g. look at this line in GrpcSslContexts

  private static SslProvider defaultSslProvider() {
    return OpenSsl.isAvailable() ? SslProvider.OPENSSL : SslProvider.JDK;
  }

So if you have OpenSSL available in some way that I don't, then the code path is different. Also I see this in test logs:

09:17:37.158 [main] DEBUG io.netty.handler.ssl.OpenSsl - netty-tcnative not in the classpath; OpenSslEngine will be unavailable.

@dsyer
Copy link
Contributor Author

dsyer commented Jan 24, 2018

It was a bad jar file. I cleared the local cache and that fixed it, I think.

@dsyer dsyer closed this as completed Jan 24, 2018
@renannprado
Copy link

renannprado commented Jul 30, 2018

I got the same error while running inside of alpine so had to:

1 - include below two libraries
2 - I had to install the lib6-compat in alpine

compile group: 'io.netty', name: 'netty-tcnative-boringssl-static', version: '2.0.8.Final'
compile 'org.conscrypt:conscrypt-openjdk-uber:1.1.4'
RUN apk add --no-cache libc6-compat

also use this as a reference of which libraries to use:
https://github.com/grpc/grpc-java/blob/master/SECURITY.md#netty

idea from here:
docker-library/logstash#76 (comment)

elefeint pushed a commit that referenced this issue May 28, 2021
* Use date in dependencies cache and refresh daily

* fail if cache already warm
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants