-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Could not find TLS ALPN provider; no working netty-tcnative, Conscrypt, or Jetty NPN/ALPN available #5369
Comments
You need to have an (exact) version match for the netty and tcnative versions to work together. grpc-version: 1.13.1 Off-Topic: Could we add a headline/link anchor there so that the table is easier to link? |
@ST-DDT I tried to use grpc 1.18.0 which matches tcnative-version 2.0.20.Final. But it is giving the same error. My guess is that since I have built it on an ubuntu machine using openjdk, it is creating problem for IBM JRE. By the way, is there any option other than netty-tcnative that can be used in my use case? Are you aware of some? I would appreciate any help. |
Usually I just use grpc-netty with netty-tcnative-boringssl-static no need for an extra netty-tcnative. As an alternative have you tried using grpc-netty-shaded? AFAICT this has the necessary/compatibile grpc/netty/tcnative libraries included. |
@ST-DDT Changed the dependency in the build.gradle to following:
It is still not working. I think openjdk is not build aix native libraries (as seen in the log). |
I've been trying to solve the same issue for two weeks, I've tried this also, it happens during configure stackdriver logging configuration in a cluster |
Can you paste the logs if you just use the dependencies as described in the readme (+plus the non-grpc/non-netty/non-tcnative libs)? compile 'io.grpc:grpc-netty-shaded:1.18.0'
compile 'io.grpc:grpc-protobuf:1.18.0'
compile 'io.grpc:grpc-stub:1.18.0' |
this is the error log when spring boot app wants to start :
this is the dependencies tree:
|
@khodayar Are you trying to run this on AIX too? |
@ankitshubham97 |
@khodayar What is the underlying OS? |
I'm using docker for windows but Linux containers |
Is that the complete stacktrace? |
Here is the complete stacktrace:
My dependency in the build.gradle is like this now:
|
It is not able to find some native methods("could not load a native library" error in the above log), maybe we have to compile them, but I am not sure how to do that. |
I used the same versions (1.18.0) for all grpc dependencies , didn't help |
One quick thing: you probably don't want netty tcnative static. Most people should not use that. The regular, dynamic version should be correct. |
I added that based on : https://github.com/grpc/grpc-java/blob/master/SECURITY.md#netty |
@ankitshubham97 /@khodayar |
@rahulKQL we couldn't find a solution. |
I had the same problem and I was using a Docker image with a kernel that was incompatible with the netty native libraries needed by my app. I changed the image in my Dockerfile(in my case from "FROM openjdk:8-jre-alpine" to "FROM openjdk:8") and the issue was fixed. |
Hey Guys, Tying to identifying this issues from last 4 days but found the perfect solution that is just checked when Experiment 1. :- Java 8 32bit with eclipse 32 bit :---- Failed to load any of the given libraries: [netty_tcnative_windows_x86_32, netty_tcnative_x86_32, netty_tcnative] Thanks |
@Ravipatel401 Do you know why it failed to load? It may be something as simple as the filename of the dll was wrong. |
I don't know if this is related, but I noticed that the .so files provided by
The version of libpthread.so.0 that ships with this version of alpine does not provide these symbols (I haven't investigated where sys_syglist, or the __* functions come from). Is it possible this is the cause of the "could not load native" errors? If so, is it possible for grpc-java to use some other pure-Java TLS provider instead? |
@carl-mastrangelo Issue is general while you Run program you need to JAVA 64bit (jvm,jre,jdk all should be 64bit ) otherwise it won't run. Make sure you using 64bit OS on 64bit JAVA. and don't try to change and preloaded libraries it's will create more problems. |
How to make it work in a 32-bit machine then? Can anyone help with that? @ravipatel410 |
Thanks, It's working for me. |
I still faced the issue while using openjdk:8 and managed to fix it by upgrading to openjdk:11 😊 |
It must be 64 bit
…On Wed, Jul 31, 2019, 2:20 PM Marek Meyer ***@***.***> wrote:
I still faced the issue while using openjdk:8 and managed to fix it by
upgrading to openjdk:11 😊
Java 11 has ALPN available by default.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5369?email_source=notifications&email_token=AA2RM3I2PS5XT6TSC7X2Q3LQCFG5ZA5CNFSM4GX6BP3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3GR2LI#issuecomment-516758829>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA2RM3KZDF2LCOD6JUVNDILQCFG5ZANCNFSM4GX6BP3A>
.
|
I had the same issue and I resolved changing the java version to 64 bit! |
Yes, this worked for me too.. Worked like magic!!!! Thanks for sharing :) |
Welcome but ensure for future if you are anyof use netty libraries always
makeup with 64bit jdk jre and all with java above 8 version...
…On Tue, 14 Jan 2020 at 12:30 AM, damioti ***@***.***> wrote:
I had the same problem and I was using a Docker image with a kernel that
was incompatible with the netty native libraries needed by my app. I
changed the image in my Dockerfile(in my case from "FROM
openjdk:8-jre-alpine" to "FROM openjdk:8") and the issue was fixed.
Thanks, It's working for me.
Yes, this worked for me too.. Worked like magic!!!! Thanks for sharing :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5369?email_source=notifications&email_token=AA2RM3LKLYYYBVZJGIYJLHDQ5S26VA5CNFSM4GX6BP3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIZ4I3Y#issuecomment-573817967>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2RM3IRJKVH7SP4EFL5SDLQ5S26VANCNFSM4GX6BP3A>
.
|
As @Ravipatel401 already said netty does not run on 32bit. |
Gracias !! Fue mi solucion luego de no poder dormir por ese problema |
Upgrading to Java 11 was a long-standing workaround for this problem. But since Java 8u252 (April 2020) Java 8 has native support for ALPN, so netty_tcnative isn't required (although still recommended when available) even on Java 8. |
Please answer these questions before submitting your issue.
What version of gRPC are you using?
1.13.1
What did you expect to see?
The jar should be running fine.
I am using java 8 to build an executable jar. Below is the java version:
I am using gradle 3.4.1 to generate the jar as follows:
/opt/gradle-3.4.1/bin/gradle jar -Dorg.gradle.java.home=/usr/lib/jvm/java-1.8.0-openjdk-amd64/
Below are the dependencies defined in the module-level build.gradle file:
After building, I am running the jar on an AIX7.2 machine as follows:
/usr/java8_64/jre/bin/java -jar agent-1.0.jar
The java version on the AIX machine is as follows:
But I am getting the following error while running:
However, it is running fine on an Ubuntu machine. I am running the jar as follows:
/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/bin/java -jar agent-1.0.jar
The java version here is:
What is the problem here and how to solve this?
The text was updated successfully, but these errors were encountered: