grpc / grpc-java

The Java gRPC implementation. HTTP/2 based RPC
https://grpc.io/docs/languages/java/
Apache License 2.0
11.47k stars 3.85k forks source link

Caused by: java.io.FileNotFoundException: META-INF/native/libio_grpc_netty_shaded_netty_tcnative.so #6624

Closed rahulvijay24feb closed 4 years ago

rahulvijay24feb commented 4 years ago

Facing below error using 1.21.0 versions of GRPC core, netty shaded. Any help is appreciated.

Error Stack:

Jan 20, 2020 6:38:34 PM io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts defaultSslProvider
INFO: Conscrypt not found (this may be normal)
Jan 20, 2020 6:38:34 PM io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts defaultSslProvider
INFO: Jetty ALPN unavailable (this may be normal)
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.shaded.io.grpc.netty.JettyTlsUtil.isJettyAlpnConfigured(JettyTlsUtil.java:64)
        at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.findJdkProvider(GrpcSslContexts.java:266)
        at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.defaultSslProvider(GrpcSslContexts.java:248)
        at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:171)
        at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.forClient(GrpcSslContexts.java:120)
        at io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder.buildTransportFactory(NettyChannelBuilder.java:402)
        at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:522)
        at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(InstantiatingGrpcChannelProvider.java:206)
        at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createChannel(InstantiatingGrpcChannelProvider.java:157)
        at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.getTransportChannel(InstantiatingGrpcChannelProvider.java:149)
        at com.google.api.gax.rpc.ClientContext.create(ClientContext.java:151)
        at com.google.cloud.dialogflow.v2.stub.GrpcSessionsStub.create(GrpcSessionsStub.java:75)
        at com.google.cloud.dialogflow.v2.stub.SessionsStubSettings.createStub(SessionsStubSettings.java:100)
        at com.google.cloud.dialogflow.v2.SessionsClient.<init>(SessionsClient.java:132)
        at com.google.cloud.dialogflow.v2.SessionsClient.create(SessionsClient.java:114)
        at com.vzw.detectIntentClient.DialogFlowClient.query(DialogFlowClient.java:50)
        at com.vzw.detectIntentClient.DetectIntentClientApplication.main(DetectIntentClientApplication.java:14)

Exception in thread "main" java.lang.IllegalStateException: Could not find TLS ALPN provider; no working netty-tcnative, Conscrypt, or Jetty NPN/ALPN available
        at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.defaultSslProvider(GrpcSslContexts.java:258)
        at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:171)
        at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.forClient(GrpcSslContexts.java:120)
        at io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder.buildTransportFactory(NettyChannelBuilder.java:402)
        at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:522)
        at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(InstantiatingGrpcChannelProvider.java:206)
        at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createChannel(InstantiatingGrpcChannelProvider.java:157)
        at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.getTransportChannel(InstantiatingGrpcChannelProvider.java:149)
        at com.google.api.gax.rpc.ClientContext.create(ClientContext.java:151)
        at com.google.cloud.dialogflow.v2.stub.GrpcSessionsStub.create(GrpcSessionsStub.java:75)
        at com.google.cloud.dialogflow.v2.stub.SessionsStubSettings.createStub(SessionsStubSettings.java:100)
        at com.google.cloud.dialogflow.v2.SessionsClient.<init>(SessionsClient.java:132)
        at com.google.cloud.dialogflow.v2.SessionsClient.create(SessionsClient.java:114)
        at com.vzw.detectIntentClient.DialogFlowClient.query(DialogFlowClient.java:50)
        at com.vzw.detectIntentClient.DetectIntentClientApplication.main(DetectIntentClientApplication.java:14)
rahulvijay24feb commented 4 years ago

Java Version: java version "1.8.0_181" Java(TM) SE Runtime Environment (build 1.8.0_181-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

Operating system : SunOS

Dependency tree of my application : [INFO] com.vzw:detectIntentClient:jar:0.0.1-SNAPSHOT [INFO] +- org.springframework.boot:spring-boot-starter:jar:2.1.8.RELEASE:compile [INFO] | +- org.springframework.boot:spring-boot:jar:2.1.8.RELEASE:compile [INFO] | | - org.springframework:spring-context:jar:5.1.9.RELEASE:compile [INFO] | | +- org.springframework:spring-aop:jar:5.1.9.RELEASE:compile [INFO] | | +- org.springframework:spring-beans:jar:5.1.9.RELEASE:compile [INFO] | | - org.springframework:spring-expression:jar:5.1.9.RELEASE:compile [INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.1.8.RELEASE:compile [INFO] | +- org.springframework.boot:spring-boot-starter-logging:jar:2.1.8.RELEASE:compile [INFO] | | +- ch.qos.logback:logback-classic:jar:1.2.3:compile [INFO] | | | - ch.qos.logback:logback-core:jar:1.2.3:compile [INFO] | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.11.2:compile [INFO] | | | - org.apache.logging.log4j:log4j-api:jar:2.11.2:compile [INFO] | | - org.slf4j:jul-to-slf4j:jar:1.7.28:compile [INFO] | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile [INFO] | +- org.springframework:spring-core:jar:5.1.9.RELEASE:compile [INFO] | | - org.springframework:spring-jcl:jar:5.1.9.RELEASE:compile [INFO] | - org.yaml:snakeyaml:jar:1.23:runtime [INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.1.8.RELEASE:test [INFO] | +- org.springframework.boot:spring-boot-test:jar:2.1.8.RELEASE:test [INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.1.8.RELEASE:test [INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test [INFO] | | +- net.minidev:json-smart:jar:2.3:test [INFO] | | | - net.minidev:accessors-smart:jar:1.2:test [INFO] | | | - org.ow2.asm:asm:jar:5.0.4:test [INFO] | | - org.slf4j:slf4j-api:jar:1.7.28:compile [INFO] | +- junit:junit:jar:4.12:test [INFO] | +- org.assertj:assertj-core:jar:3.11.1:test [INFO] | +- org.mockito:mockito-core:jar:2.23.4:test [INFO] | | +- net.bytebuddy:byte-buddy:jar:1.9.16:test [INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.9.16:test [INFO] | | - org.objenesis:objenesis:jar:2.6:test [INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:test [INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:test [INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test [INFO] | | - com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test [INFO] | +- org.springframework:spring-test:jar:5.1.9.RELEASE:test [INFO] | - org.xmlunit:xmlunit-core:jar:2.6.3:test [INFO] +- com.google.cloud:google-cloud-dialogflow:jar:0.55.0-alpha:compile [INFO] | +- com.google.cloud:google-cloud-core:jar:1.37.0:compile [INFO] | | +- joda-time:joda-time:jar:2.10.3:compile [INFO] | | +- com.google.http-client:google-http-client:jar:1.23.0:compile [INFO] | | | - org.apache.httpcomponents:httpclient:jar:4.5.9:compile [INFO] | | | +- org.apache.httpcomponents:httpcore:jar:4.4.12:compile [INFO] | | | - commons-codec:commons-codec:jar:1.11:compile [INFO] | | +- com.google.code.findbugs:jsr305:jar:3.0.2:compile [INFO] | | +- com.google.api:api-common:jar:1.6.0:compile [INFO] | | +- com.google.api:gax:jar:1.29.0:compile [INFO] | | | +- org.threeten:threetenbp:jar:1.3.3:compile [INFO] | | | - com.google.auth:google-auth-library-oauth2-http:jar:0.9.1:compile [INFO] | | | - com.google.http-client:google-http-client-jackson2:jar:1.19.0:compile [INFO] | | | - com.fasterxml.jackson.core:jackson-core:jar:2.9.9:compile [INFO] | | +- com.google.protobuf:protobuf-java-util:jar:3.6.0:compile [INFO] | | - com.google.api.grpc:proto-google-iam-v1:jar:0.12.0:compile [INFO] | +- com.google.cloud:google-cloud-core-grpc:jar:1.37.0:compile [INFO] | | - com.google.api:gax-grpc:jar:1.29.0:compile [INFO] | +- com.google.api.grpc:proto-google-cloud-dialogflow-v2beta1:jar:0.20.0:compile [INFO] | - com.google.api.grpc:proto-google-cloud-dialogflow-v2:jar:0.20.0:compile [INFO] +- io.grpc:grpc-context:jar:1.21.0:compile [INFO] +- io.grpc:grpc-netty-shaded:jar:1.21.0:compile [INFO] +- io.grpc:grpc-core:jar:1.21.0:compile [INFO] | +- io.opencensus:opencensus-api:jar:0.21.0:compile [INFO] | +- io.grpc:grpc-api:jar:1.21.0:compile (version selected from constraint [1.21.0,1.21.0]) [INFO] | | +- com.google.errorprone:error_prone_annotations:jar:2.3.2:compile [INFO] | | - org.codehaus.mojo:animal-sniffer-annotations:jar:1.17:compile [INFO] | +- com.google.code.gson:gson:jar:2.8.5:compile [INFO] | +- com.google.android:annotations:jar:4.1.1.4:compile [INFO] | - io.opencensus:opencensus-contrib-grpc-metrics:jar:0.21.0:compile [INFO] +- io.grpc:grpc-auth:jar:1.21.0:compile [INFO] | - com.google.auth:google-auth-library-credentials:jar:0.13.0:compile [INFO] +- io.grpc:grpc-stub:jar:1.21.0:compile [INFO] +- io.netty:netty-tcnative-boringssl-static:jar:2.0.25.Final:runtime [INFO] - io.grpc:grpc-protobuf:jar:1.21.0:compile [INFO] +- com.google.protobuf:protobuf-java:jar:3.7.1:compile [INFO] +- com.google.guava:guava:jar:26.0-android:compile [INFO] | +- org.checkerframework:checker-compat-qual:jar:2.5.2:compile [INFO] | - com.google.j2objc:j2objc-annotations:jar:1.1:compile [INFO] +- com.google.api.grpc:proto-google-common-protos:jar:1.12.0:compile [INFO] - io.grpc:grpc-protobuf-lite:jar:1.21.0:compile

ejona86 commented 4 years ago

It seems you didn't include the full error about tcnative.

creamsoup commented 4 years ago

closing due to inactivity, feel free to reopen when you have more details (error message/log).