gpt4 book ai didi

使用 Google Cloud Pub/Sub 消息订阅者实现时无法创建 Spring-Boot bean

转载 作者:行者123 更新时间:2023-12-04 17:35:28 28 4
gpt4 key购买 nike

我正在尝试运行一个具有 Spring-Boot、Google Cloud Pub/Sub 和订阅者实现的项目,它给出了以下错误

    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name \u0027pubsubProducer\u0027 defined in URL [jar:file:PubsubProducer.class]: Initialization of bean failed; nested exception is java.lang.IllegalStateException: Could not find TLS ALPN provider; no working netty-tcnative, Conscrypt, or Jetty NPN/ALPN available
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:584)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1244)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1164)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593)
... 27 common frames omitted
Caused by: 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:436)
at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:509)
at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(InstantiatingGrpcChannelProvider.java:223)
at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createChannel(InstantiatingGrpcChannelProvider.java:169)
at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.getTransportChannel(InstantiatingGrpcChannelProvider.java:156)
at com.google.api.gax.rpc.ClientContext.create(ClientContext.java:157)
at com.google.cloud.pubsub.v1.stub.GrpcPublisherStub.create(GrpcPublisherStub.java:164)
at com.google.cloud.pubsub.v1.Publisher.\u003cinit\u003e(Publisher.java:152)
at com.google.cloud.pubsub.v1.Publisher.\u003cinit\u003e(Publisher.java:82)
at com.google.cloud.pubsub.v1.Publisher$Builder.build(Publisher.java:597)

我能够运行这个项目,但发生了一些变化,现在我无法在 Linux Fedora 30 机器上运行它,但在 Windows 上它运行良好,我已经查看了可能触发它的原因,但他们说我有不同版本的 grpc-nettygrpc-netty-shaded,但它们是相同的1.21.0

此外,我只使用 google-cloud-pubsub-client 并且无法控制其版本。我是否也需要在本地安装包?我在 RPM 中找到了一些用于 grpc 和 netty 的。

感谢任何帮助,如果您需要任何其他信息,请发表评论。

谢谢

最佳答案

由于没有人回答我的问题,我将其放置以备日后引用。

因为我在 Fedora 30 上,它缺少一个库 libxcrypt-compat,安装后,构建成功运行。

关于使用 Google Cloud Pub/Sub 消息订阅者实现时无法创建 Spring-Boot bean,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56809399/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com