Вызовы API Springboot Dialogflow V2 завершаются с ошибкой java.lang.ClassNotFoundException: org / eclipse / jetty / alpn / ALPN - PullRequest
0 голосов
/ 22 марта 2019

Я интегрировал Dialogflow V2 API (DetectIntend) с Springboot, и он отлично работает на моей локальной машине.Но вызовы API терпят неудачу после развертывания того же самого в GCP.Проведя некоторые исследования, я добавил следующие зависимости, которые тоже не помогли.Здесь прошли указания https://github.com/grpc/grpc-java/blob/master/SECURITY.md, но не решили проблему.

<dependency>
        <groupId>io.grpc</groupId>
        <artifactId>grpc-netty-shaded</artifactId>
        <version>1.18.0</version>
    </dependency>
    <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-handler</artifactId>
        <version>4.1.32.Final</version>
    </dependency>
    <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-tcnative-boringssl-static</artifactId>
        <version>2.0.20.Final</version>
    </dependency>

Пожалуйста, смотрите следующее исключение стека.

 2019-03-22 14:03:34.756  INFO [conversationservice,ecfde081e153174a22ba98fbf11a4c99,22ba98fbf11a4c99,true] 1 --- [nio-9414-exec-1] i.g.n.s.io.grpc.netty.GrpcSslContexts
      : netty-tcnative unavailable (this may be normal)

    java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty_tcnative_linux_x86_64, netty_tcnative_linux_x86_64_fedora, netty_tcnative_x86_64, netty_tcnative]
            at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:104) ~[grpc-netty-shaded-1.18.0.jar!/:1.18.0]
            at io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:526) ~[grpc-netty-shaded-1.18.0.jar!/:1.18.0]
            at io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:93) ~[grpc-netty-shaded-1.18.0.jar!/:1.18.0]
            at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.defaultSslProvider(GrpcSslContexts.java:244) [grpc-netty-shaded-1.18.0.jar!/:1.18.0]
            at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:171) [grpc-netty-shaded-1.18.0.jar!/:1.18.0]
            at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.forClient(GrpcSslContexts.java:120) [grpc-netty-shaded-1.18.0.jar!/:1.18.0]
            at io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder.buildTransportFactory(NettyChannelBuilder.java:385) [grpc-netty-shaded-1.18.0.jar!/:1.18.0]
            at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:435) [grpc-core-1.18.0.jar!/:1.18.0]
            at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(InstantiatingGrpcChannelProvider.java:223) [gax-grpc-1.42.0.jar!/:1.42.0]
            at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createChannel(InstantiatingGrpcChannelProvider.java:164) [gax-grpc-1.42.0.jar!/:1.42.0]
            at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.getTransportChannel(InstantiatingGrpcChannelProvider.java:156) [gax-grpc-1.42.0.jar!/:1.42.0]
            at com.google.api.gax.rpc.ClientContext.create(ClientContext.java:157) [gax-1.42.0.jar!/:1.42.0]  ..........          at java.lang.Thread.run(Thread.java:748) [na:1.8.0_191]
            Suppressed: java.lang.UnsatisfiedLinkError: /tmp/libio_grpc_netty_shaded_netty_tcnative_linux_x86_649219715802563293305.so: Error loading shared library libcrypt.so.1: No such file or directory (needed by /tmp/libio_grpc_netty_shaded_netty_tcnative_linux_x86_649219715802563293305.so)
                    at java.lang.ClassLoader$NativeLibrary.load(Native Method) ~[na:1.8.0_191]
                    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) ~[na:1.8.0_191]
                    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) ~[na:1.8.0_191]
                    at java.lang.Runtime.load0(Runtime.java:809) ~[na:1.8.0_191]
                    at java.lang.System.load(System.java:1086) ~[na:1.8.0_191]
                    at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:36) ~[grpc-netty-shaded-1.18.0.jar!/:1.18.0]
                    at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:316) ~[grpc-netty-shaded-1.18.0.jar!/:1.18.0]
                    at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:215) ~[grpc-netty-shaded-1.18.0.jar!/:1.18.0]
                    at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:96) ~[grpc-netty-shaded-1.18.0.jar!/:1.18.0]
                    ... 84 common frames omitted
                    Suppressed: java.lang.UnsatisfiedLinkError: /tmp/libio_grpc_netty_shaded_netty_tcnative_linux_x86_649219715802563293305.so: Error loading shared library libcrypt.so.1: No such file or directory (needed by /tmp/libio_grpc_netty_shaded_netty_tcnative_linux_x86_649219715802563293305.so)
                            at java.lang.ClassLoader$NativeLibrary.load(Native Method)
                            at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
                            at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
                            at java.lang.Runtime.load0(Runtime.java:809)
                            at java.lang.System.load(System.java:1086)
                            at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:36)    
    2019-03-22 14:03:34.758  INFO [conversationservice,ecfde081e153174a22ba98fbf11a4c99,22ba98fbf11a4c99,true] 1 --- [nio-9414-exec-1] i.g.n.s.io.grpc.netty.GrpcSslContexts
      : Conscrypt not found (this may be normal)
    2019-03-22 14:03:34.759  INFO [conversationservice,ecfde081e153174a22ba98fbf11a4c99,22ba98fbf11a4c99,true] 1 --- [nio-9414-exec-1] i.g.n.s.io.grpc.netty.GrpcSslContexts
      : Jetty ALPN unavailable (this may be normal)

    java.lang.ClassNotFoundException: org/eclipse/jetty/alpn/ALPN

Пожалуйста, помогите мне решить эту проблему

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...