Skip to content

block in sysread since ssl enabled #48

Open
@walkerlin0

Description

@walkerlin0

Logstash information:

  1. Logstash version (e.g. bin/logstash --version)
    Using bundled JDK: /home/linkaitao/download/logstash-8.1.3/jdk
    logstash 8.1.3

  2. Logstash installation source (e.g. built from source, with a package manager: DEB/RPM, expanded from tar or zip archive, docker)
    Download from https://github.com/elastic/logstash/archive/refs/tags/v8.1.3.tar.gz

  3. How is Logstash being run (e.g. as a service/service manager: systemd, upstart, etc. Via command line, docker/kubernetes)
    bin/logstash --path.settings config

  4. How was the Logstash Plugin installed
    Built in

JVM (e.g. java -version):

  1. JVM version (java -version)
    openjdk 11.0.11 2021-04-20
    OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
    OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

OS version (uname -a if on a Unix-like system):
Linux LAPTOP-T38O03V7 4.4.0-19041-Microsoft #1237-Microsoft Sat Sep 11 14:32:00 PST 2021 x86_64 x86_64 x86_64 GNU/Linux

openssl version
OpenSSL 1.1.1f 31 Mar 2020

Description of the problem including expected versus actual behavior:
Problem:
Using SSL to send messages but blocked in reading response and the whole pipeline is stopped.

Expect:
Send messages continuously, don't get stuck.

config at client side:

input {
  http {
     host => "0.0.0.0"
     port => 6002
  }
}

output {
  tcp {
    codec => "line"
    host => "10.75.6.33"
    port => 8888
    ssl_enable => "true"
    ssl_cacert => "config/cert/ca.pem"
    ssl_verify => true
    mode => "client"
    reconnect_interval => 1
  }
}

config at server side:

input {
  tcp {
    codec => "line"
    host => "0.0.0.0"
    port => 8888
    ssl_enable => true
    ssl_cert => "config/cert/server.crt"
    ssl_key => "config/cert/server.key"
    ssl_key_passphrase => "***"
    ssl_verify => false
    tcp_keep_alive => true
  }
}

output {
  stdout {
    codec => rubydebug {
      metadata => true
    }
  }
}

Steps to reproduce:
Setup logstash like above, and execute cmd "curl http://127.0.0.1:6002 -d 'testing msg'" at client side. First time after the cmd been executed the message will be printed on server side. But after that, server side won't print any more messages no matter how many times i execute the cmd at client side.
The below log showing while i press CTRL+C at client side.

Provide logs (if relevant):
[2022-05-17T16:35:24,731][WARN ][org.logstash.execution.ShutdownWatcherExt] {"inflight_count"=>0, "stalling_threads_info"=>{"other"=>[{"thread_id"=>30, "name"=>"[main]>worker0", "current_call"=>"[...]/vendor/bundle/jruby/2.5.0/gems/logstash-output-tcp-6.0.2/lib/logstash/outputs/tcp.rb:161:in `block in sysread'"}]}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions