Logstash pipeline fails to start when log sending app is online

Hello everyone.
Recently I've stuck upon following issue - logstash cant start pipeline with following error

Summary

[ERROR][logstash.javapipeline ][strat] Pipeline aborted due to error {:pipeline_id=>"strat", :exception=>#<NoMethodError: undefined method forServer' for Java::OrgLogstashNetty::SslContextBuilder:Class>, :backtrace=>["org/jruby/RubyBasicObject.java:1709:in method_missing'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-tcp-6.0.3-java/lib/logstash/inputs/tcp/compat_ssl_options.rb:110:in toSslContext'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-tcp-6.0.3-java/lib/logstash/inputs/tcp.rb:358:in get_ssl_context'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-input-tcp-6.0.3-java/lib/logstash/inputs/tcp.rb:141:in register'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:200:in block in register_plugins'", "org/jruby/RubyArray.java:1814:in each'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:199:in register_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:310:in start_inputs'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:270:in start_workers'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:154:in run'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:109:in block in start'"], "pipeline.sources"=>["/usr/share/logstash/pipeline/strat.conf"], :thread=>"#<Thread:0x5efab361 run>"}

if the app that sends logs is trying to reconnect to the logstash. As soon as I shutdown the app logstash starts this pipeline perfectly and even correctly takes logs from app after startup. Also if the pipeline ssl_enable is set to false this issue doesnt appear.
I'm using logstash:7.6.1 official image.
Here is pipeline config

Summary
input {
  tcp {
    port => "5000"
    type => syslog
    codec => json_lines
    ssl_enable => true
    ssl_cert => "/usr/share/logstash/logstash-forwarder.crt"
    ssl_key => "/usr/share/logstash/logstash-forwarder.key"
    ssl_verify => false
  }
}

ENV vars available to logstash are

Summary
environment:
      - XPACK_MONITORING_ENABLED=false
      - "LS_JAVA_OPTS=-Xms4096m -Xmx4096m"
      - PIPELINE_WORKERS=2
      - PIPELINE_BATCH_SIZE=150
      - QUEUE_TYPE=persisted
      - QUEUE_PAGE_CAPACITY=250mb
      - QUEUE_MAX_BYTES=10gb

The app that sends logs is using logback tcp socket appender.
Any ideas how to fix this? Many thanks in advance!

upd
After further testing it looks like the app doesnt influence the pipeline. I suppose it was just a coincidence. Sometimes pipeline starts, sometimes not. The error itself didnt change.

Looks like updating logstash version to 6.8.0 helped.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.