Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Socket not connected - getpeername(2) in syslog TLS connection #3635

Closed
michaelfortin opened this issue Feb 15, 2022 · 1 comment
Closed

Comments

@michaelfortin
Copy link

Describe the bug

I have the same error as this issue: #1658 and this issue: #2332.
Fluentd has apparently a problem getting the peer address while being forwarded syslog using TLS connection. The error continuously loop and no syslog are received. I made sure the package cool.io is up to date as it is recommended in the other issue. We are running Fluentd on Kubernetes. Restarting the pod seems to fix the problem temporarily.

To Reproduce

Forward syslog to Fluentd using TLS connection

Expected behavior

I would expect the error to not loop continuously and fix itself since restarting the pod seems to work.

Your Environment

- Fluentd version: 1.12.4
- open.io version: 1.7.1
- docker image: fluent/fluentd:v1.14-1

Your Configuration

<source>
  @type syslog
  port 514
  bind 0.0.0.0
  <transport tls>
    ca_path /certificates/ca-cert.pem
    cert_path /certificates/server-cert.pem
    private_key_path /certificates/server-key.pem
  </transport>
  <parse>
    message_format auto
    with_priority true
    parser_type string
  </parse>
  frame_type traditional
  source_hostname_key hostname
  source_address_key address
  severity_key severity
  priority_key priority
  facility_key facility
  tag syslog
</source>

Your Error Log

#<Thread:0x00007fee19b77208@event_loop /usr/lib/ruby/gems/2.7.0/gems/fluentd-1.12.4/lib/fluent/plugin_helper/thread.rb:70 run> terminated with exception (report_on_exception is true):
/usr/lib/ruby/2.7.0/openssl/ssl.rb:239:in `peeraddr': Socket not connected - getpeername(2) (Errno::ENOTCONN)
from /usr/lib/ruby/2.7.0/openssl/ssl.rb:239:in `peeraddr'
from /usr/lib/ruby/gems/2.7.0/gems/fluentd-1.12.4/lib/fluent/plugin_helper/server.rb:713:in `rescue in try_tls_accept'
from /usr/lib/ruby/gems/2.7.0/gems/fluentd-1.12.4/lib/fluent/plugin_helper/server.rb:696:in `try_tls_accept'
from /usr/lib/ruby/gems/2.7.0/gems/fluentd-1.12.4/lib/fluent/plugin_helper/server.rb:730:in `on_readable'
from /usr/lib/ruby/gems/2.7.0/gems/cool.io-1.7.1/lib/cool.io/io.rb:186:in `on_readable'
from /usr/lib/ruby/gems/2.7.0/gems/cool.io-1.7.1/lib/cool.io/loop.rb:88:in `run_once'
from /usr/lib/ruby/gems/2.7.0/gems/cool.io-1.7.1/lib/cool.io/loop.rb:88:in `run'
from /usr/lib/ruby/gems/2.7.0/gems/fluentd-1.12.4/lib/fluent/plugin_helper/event_loop.rb:93:in `block in start'
from /usr/lib/ruby/gems/2.7.0/gems/fluentd-1.12.4/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
2021-07-21 19:12:20 +0000 [warn]: #0 thread exited by unexpected error plugin=Fluent::Plugin::SyslogInput title=:event_loop error_class=Errno::ENOTCONN error="Socket not connected - getpeername(2)"
/usr/lib/ruby/gems/2.7.0/gems/fluentd-1.12.4/lib/fluent/plugin_helper/server.rb:697:in `accept_nonblock': Connection reset by peer - SSL_accept (Errno::ECONNRESET)
from /usr/lib/ruby/gems/2.7.0/gems/fluentd-1.12.4/lib/fluent/plugin_helper/server.rb:697:in `try_tls_accept'
from /usr/lib/ruby/gems/2.7.0/gems/fluentd-1.12.4/lib/fluent/plugin_helper/server.rb:730:in `on_readable'
from /usr/lib/ruby/gems/2.7.0/gems/cool.io-1.7.1/lib/cool.io/io.rb:186:in `on_readable'
from /usr/lib/ruby/gems/2.7.0/gems/cool.io-1.7.1/lib/cool.io/loop.rb:88:in `run_once'
from /usr/lib/ruby/gems/2.7.0/gems/cool.io-1.7.1/lib/cool.io/loop.rb:88:in `run'
from /usr/lib/ruby/gems/2.7.0/gems/fluentd-1.12.4/lib/fluent/plugin_helper/event_loop.rb:93:in `block in start'
from /usr/lib/ruby/gems/2.7.0/gems/fluentd-1.12.4/lib/fluent/plugin_helper/thread.rb:78:i

Additional context

No response

@ashie
Copy link
Member

ashie commented Feb 24, 2022

It's already fixed in #3483, please use v1.14.0 or later.

@ashie ashie closed this as completed Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants