GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Stop telling people Jetty ALPN has not been configured · Issue #3025 · grpc/grpc-java

Stop telling people Jetty ALPN has not been configured #3025

New issue
Copy link
New issue
Copy link
Closed
Closed
Stop telling people Jetty ALPN has not been configured#3025
Copy link
Assignees
ejona86
Labels
bugusability
Milestone
1.8

Description

@ejona86
ejona86
opened on May 19, 2017
Issue body actions

If both OpenSsl (tcnative) and Jetty ALPN are unavailable then we end up failing with "Jetty ALPN/NPN has not been properly configured". We should tell them to configure tcnative, and not encourage the use of Jetty ALPN.

Reacted by Les Vogel, MyktybekTashtemirovZensoft, Vitalii Fedorenko and Aneesh Chandra

Activity

  1. ejona86
    added
    bug
    on May 19, 2017
  2. ejona86
    added this to the Next milestone on May 19, 2017
  3. ejona86
    changed the title [-]Stop telling people to Jetty ALPN has not been configured[/-] [+]Stop telling people Jetty ALPN has not been configured[/+] on May 19, 2017
  4. conorgriffin commented on May 30, 2017

    @conorgriffin
    conorgriffin
    on May 30, 2017
    More actions

    I have configured tcnative (as far as I can tell) but I get this error.

    Exception in thread "main" java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured.
    	at io.grpc.netty.GrpcSslContexts.selectApplicationProtocolConfig(GrpcSslContexts.java:174)
    	at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:151)
    	at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:139)
    	at io.grpc.netty.GrpcSslContexts.forServer(GrpcSslContexts.java:130)
    

    If I set the log level to debug I actually get something more helpful which is the following message prior to the exception above:

    java.lang.UnsatisfiedLinkError: no provided in java.library.path
    	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) ~[na:1.8.0_121]
    	at java.lang.Runtime.loadLibrary0(Runtime.java:870) ~[na:1.8.0_121]
    	at java.lang.System.loadLibrary(System.java:1122) ~[na:1.8.0_121]
    	at org.apache.tomcat.jni.Library.<init>(Library.java:80) ~[tomcat-embed-core-8.5.6.jar:8.5.6]
    	at org.apache.tomcat.jni.Library.initialize(Library.java:180) ~[tomcat-embed-core-8.5.6.jar:8.5.6]
    	at io.netty.handler.ssl.OpenSsl.initializeTcNative(OpenSsl.java:417) ~[netty-handler-4.1.8.Final.jar:4.1.8.Final]
    	at io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:101) ~[netty-handler-4.1.8.Final.jar:4.1.8.Final]
    	at io.grpc.netty.GrpcSslContexts.defaultSslProvider(GrpcSslContexts.java:158) [grpc-netty-1.3.0.jar:1.3.0]
    	at io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:139) [grpc-netty-1.3.0.jar:1.3.0]
    	at io.grpc.netty.GrpcSslContexts.forServer(GrpcSslContexts.java:130) [grpc-netty-1.3.0.jar:1.3.0]
    

    However, this isn't much help in itself since from what I can tell tcnative should work since I have the dependency in my pom file as follows:

            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-tcnative-boringssl-static</artifactId>
                <version>1.1.33.Fork26</version>
            </dependency>
    
    

    Have I missed something or am I getting this in error. I feel that the UnsatisfiedLinkError should be a warning instead of a debug message at least.

  5. jorgheymans commented on Jun 6, 2017

    @jorgheymans
    jorgheymans
    on Jun 6, 2017
    Contributor
    More actions

    @conorgriffin are you running under tomcat ? netty/netty-tcnative#214

    Reacted by Conor Griffin
  6. conorgriffin commented on Jun 6, 2017

    @conorgriffin
    conorgriffin
    on Jun 6, 2017
    More actions

    yeah so that was the issue but was only able to see a message helping me to find the root cause by using debug logging, I'd have expected a warning at least. I am running spring boot so I had to switch to using jetty instead of the built-in tomcat

    Thanks for the tip on the other issue all the same

  7. ejona86 commented on Jun 7, 2017

    @ejona86
    ejona86
    on Jun 7, 2017
    MemberAuthor
    More actions

    @conorgriffin, grpc-java 1.4.0 release should fix the Tomcat incompatibility.

    Reacted by Conor Griffin and Lucien Chan
  8. conorgriffin commented on Jun 16, 2017

    @conorgriffin
    conorgriffin
    on Jun 16, 2017
    More actions

    when is the 1.4.0 release scheduled?

  9. carl-mastrangelo commented on Jun 16, 2017

    @carl-mastrangelo
    carl-mastrangelo
    on Jun 16, 2017
    Contributor
    More actions

    @conorgriffin It was released about a week ago: https://github.com/grpc/grpc-java/releases/tag/v1.4.0

  10. conorgriffin commented on Jun 16, 2017

    @conorgriffin
    conorgriffin
    on Jun 16, 2017
    More actions

    Ah! I had just checked the README on master which still says 1.3.0.

    Thanks

  11. wenbozhu
    added
    usability
    on Aug 3, 2017
  12. ejona86
    self-assigned this
    on Aug 18, 2017
  13. ejona86 commented on Aug 18, 2017

    @ejona86
    ejona86
    on Aug 18, 2017
    MemberAuthor
    More actions

    It looks like I'll naturally be fixing this as I add Conscrypt support in the Netty transport.

  14. saturnism commented on Oct 19, 2017

    @saturnism
    saturnism
    on Oct 19, 2017
    Contributor
    More actions

    Not sure when conscrypt will be in, but if it's going to take a while, it can be helpful to change the error message and refer the user to read https://github.com/grpc/grpc-java/blob/master/SECURITY.md :)

  15. saturnism commented on Oct 19, 2017

    @saturnism
    saturnism
    on Oct 19, 2017
    Contributor
    More actions

    also, suggest adding common troubleshooting techniques and resolutions, especially when trying to determining if it's a classpath conflict.

  16. lesv commented on Oct 20, 2017

    @lesv
    lesv
    on Oct 20, 2017
    More actions

    This happens a lot - we are getting this from various sources. It would be nice if the error was changed to both talk about alternative choices, it should also talk about using mvn dependency:tree and using <dependencyManagement> to fix the version of Netty being used.

    Also it would be nice if you could check that it's a dependency issue at runtime and differentiate between the possible causes and give a better error message.

    Reacted by Gray
  17. ejona86 commented on Nov 7, 2017

    @ejona86
    ejona86
    on Nov 7, 2017
    MemberAuthor
    More actions

    This was fixed by #3604

  18. ejona86
    closed this as completedon Nov 7, 2017
  19. ejona86
    modified the milestones: Next, 1.8 on Nov 7, 2017
  20. j256 commented on Jun 8, 2018

    @j256
    j256
    on Jun 8, 2018
    More actions

    For the record, ALPN errors can be generated because of mismatched 32 versus 64 bit, wrong JRE versions specified in build or test scripts, etc..

  21. j256 commented on Jul 16, 2018

    @j256
    j256
    on Jul 16, 2018
    More actions

    Also, older servers with glibc < version 2.7 will not work because of netty requirements. Yes, sigh, in 2018 my company has to support our code on these older servers.

  22. lock
    locked as resolved and limited conversation to collaborators on Oct 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @ejona86
    ejona86

Labels

bugusability

Type

No type

Projects

No projects

    Milestone

    • 1.8

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.