简体   繁体   English

logstash gcp pubsub 输入插件:“NoSuchMethodError: 'void com.google.common.util.concurrent.Futures.addCallback”

[英]logstash gcp pubsub input plugin: "NoSuchMethodError: 'void com.google.common.util.concurrent.Futures.addCallback"

I'm trying to run this plugin with the most basic settings:我正在尝试使用最基本的设置运行这个插件:

input {
    google_pubsub {
        # Your GCP project id (name)
        project_id => "cosmic-keep-148903"

        # The topic name below is currently hard-coded in the plugin. You
        # must first create this topic by hand and ensure you are exporting
        # logging to this pubsub topic.
        topic => "slm"

        # The subscription name is customizeable. The plugin will attempt to
        # create the subscription (but use the hard-coded topic name above).
        subscription => "slm-sub"

        # If you are running logstash within GCE, it will use
        # Application Default Credentials and use GCE's metadata
        # service to fetch tokens.  However, if you are running logstash
        # outside of GCE, you will need to specify the service account's
        # JSON key file below.
        json_key_file => "/path/to/pkey.json"

        # Should the plugin attempt to create the subscription on startup?
        # This is not recommended for security reasons but may be useful in
        # some cases.
        #create_subscription => false
    }
}
output { stdout { codec => rubydebug } }

and seeing this error:并看到此错误:

RUBY.inputworker(/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:410)
RUBY.start_input(/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:401)
org.jruby.RubyProc.call(org/jruby/RubyProc.java:318)
java.lang.Thread.run(java/lang/Thread.java:829)
[ERROR] 2022-08-18 02:38:46.111 [Thread-105] googlepubsub - Expected the service InnerService [FAILED] to be RUNNING, but the service has FAILED
Aug 18, 2022 2:38:46 AM com.google.common.util.concurrent.ListenerCallQueue$PerListenerQueue run
SEVERE: Exception while executing callback: com.google.api.core.AbstractApiService$1@f048817 failed({from = STARTING, cause = java.lang.IllegalStateException: Expected the service InnerService [FAILED] to be RUNNING, but the service has FAILED})
java.lang.IllegalStateException: Expected the service InnerService [FAILED] to be RUNNING, but the service has FAILED
    at com.google.common.util.concurrent.AbstractService.checkCurrentState(AbstractService.java:381)
    at com.google.common.util.concurrent.AbstractService.awaitRunning(AbstractService.java:305)
    at com.google.api.core.AbstractApiService.awaitRunning(AbstractApiService.java:96)
    at com.google.cloud.pubsub.v1.Subscriber.startConnections(Subscriber.java:390)
    at com.google.cloud.pubsub.v1.Subscriber.startStreamingConnections(Subscriber.java:355)
    at com.google.cloud.pubsub.v1.Subscriber.access$200(Subscriber.java:93)
    at com.google.cloud.pubsub.v1.Subscriber$3.run(Subscriber.java:299)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.NoSuchMethodError: 'void com.google.common.util.concurrent.Futures.addCallback(com.google.common.util.concurrent.ListenableFuture, com.google.common.util.concurrent.FutureCallback)'
    at com.google.cloud.pubsub.v1.StreamingSubscriberConnection.initialize(StreamingSubscriberConnection.java:218)
    at com.google.cloud.pubsub.v1.StreamingSubscriberConnection.doStart(StreamingSubscriberConnection.java:110)
    at com.google.api.core.AbstractApiService$InnerService.doStart(AbstractApiService.java:148)
    at com.google.common.util.concurrent.AbstractService.startAsync(AbstractService.java:251)
    at com.google.api.core.AbstractApiService.startAsync(AbstractApiService.java:120)
    at com.google.cloud.pubsub.v1.Subscriber.startConnections(Subscriber.java:387)
    ... 4 more

Any guidance is appreciated.任何指导表示赞赏。

You probably encountered a bug in GCP Pub/Sub plugin for Logstash: https://github.com/logstash-plugins/logstash-input-google_pubsub/issues/57您可能在 Logstash 的 GCP Pub/Sub 插件中遇到了一个错误: https://github.com/logstash-plugins/logstash-input-google_pubsub/issues/57

Latest working version of Logstash for this plugin (v1.2.1) is 8.1.3此插件 (v1.2.1) 的最新工作版本 Logstash 是 8.1.3

You can also try Filebeat, it worked for my case with GCP Pub/Sub and it's much easier on resources.您也可以尝试 Filebeat,它适用于我使用 GCP Pub/Sub 的情况,并且在资源上更容易。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 NoClassDefFoundError:com/google/common/util/concurrent/internal/InternalFutureFailureAccess - NoClassDefFoundError: com/google/common/util/concurrent/internal/InternalFutureFailureAccess :java.lang.NoSuchMethodError:com.amazonaws.services.s3.transfer.TransferManager。<init> (S3;Ljava/util/concurrent/ThreadPoolExecutor;)V</init> - : java.lang.NoSuchMethodError: com.amazonaws.services.s3.transfer.TransferManager.<init>(S3;Ljava/util/concurrent/ThreadPoolExecutor;)V Gcloud PubSub Java 实现 - java.util.concurrent.RejectedExecutionException - Gcloud PubSub Java implementation - java.util.concurrent.RejectedExecutionException java.lang.NoSuchMethodError: 'com.google.api.gax.rpc.StubSettings$Builder com.google.cloud.pubsub.v1.stub.SubscriberStubSettings$Builder.setBackground - java.lang.NoSuchMethodError: 'com.google.api.gax.rpc.StubSettings$Builder com.google.cloud.pubsub.v1.stub.SubscriberStubSettings$Builder.setBackground 运行时异常 java.lang.NoSuchMethodError:com.google.common.base.Optional.toJavaUtil()L 与 Spark-BigQuery 连接器 - Runtime Exception java.lang.NoSuchMethodError: com.google.common.base.Optional.toJavaUtil()L with Spark-BigQuery connector GCP PubSub 理解过滤器 - GCP PubSub understanding filters com.google.cloud.pubsub.spi.v1.Publisher.publish 未向 PubSub 发送数据 - com.google.cloud.pubsub.spi.v1.Publisher.publish is not sending data to PubSub gcp pubsub 到 bigquery 订阅 - gcp pubsub to bigquery subscription Flutter 和 google_sign_in 插件:PlatformException(sign_in_failed,com.google.android.gms.common.api.ApiException:10:,空) - Flutter and google_sign_in plugin: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null) 使用 google pubsub 模拟器和 Spring function.adapter.gcp.GcfJarLauncher 时出错 - Error when use google pubsub emulator and Spring function.adapter.gcp.GcfJarLauncher
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM