Uploaded image for project: 'OpenShift Logging'
  1. OpenShift Logging
  2. LOG-3244

undefined local variable or method `context' for RemoteSyslogSender::SslContext:Module on fluentd:1.14.6

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • Logging 5.5.4, Logging 5.6.0
    • Log Collection
    • False
    • Hide

      None

      Show
      None
    • False
    • NEW
    • VERIFIED
    • Log Collection - Sprint 227, Log Collection - Sprint 228

      Description of problem:

      Forward logs to rsyslog server using SSL failed when use syslog_hostname_verify=false

      Collector pods popup message below:
      undefined local variable or method `context' for RemoteSyslogSender::SslContext:Module

      Version-Release number of selected component (if applicable):

      fluentd:1.14.6

      How reproducible:

      always

      Steps to Reproduce:
      1. deploy rsyslog server
      git clone https://gitlab.cee.redhat.com/aosqe/aosqe-tools.git 
      cd aosqe-tools/logging/log_template/rsyslogserver/gtls
      sh 01_create-pki-cluster-client.sh
      sh 02_create-rsyslogserver.sh    

      2. deploy ClusterLogForwarder
      sh 03_deploy-syslog-clf-hostname_verify_false.sh  
       
      3. deploy clusterlogging
      oc create -f aosqe-tools/logging/log_template/clusterlogging/fluentd_only.yaml

      4)check the collector pods logs
                                        

      Actual results:

      Defaulted container "collector" out of: collector, logfilesmetricexporter
      POD_IPS: 10.128.2.58, PROM_BIND_IP: 0.0.0.0
      Setting each total_size_limit for 2 buffers to 9622544486 bytes
      Setting queued_chunks_limit_size for each buffer to 1147
      Setting chunk_limit_size for each buffer to 8388608
      /var/lib/fluentd/pos/journal_pos.json exists, checking if yajl parser able to parse this json file without any error.
      ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) [x86_64-linux]
      RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=0.900000 (default value: 2.000000)
      checking if /var/lib/fluentd/pos/journal_pos.json a valid json by calling yajl parser
      2022-11-02 06:26:50 +0000 [warn]: '@' is the system reserved prefix. It works in the nested configuration for now but it will be rejected: @timestamp
      2022-11-02 06:26:50 +0000 [warn]: '@' is the system reserved prefix. It works in the nested configuration for now but it will be rejected: @timestamp
      /usr/local/share/gems/gems/fluent-plugin-elasticsearch-5.2.2/lib/fluent/plugin/elasticsearch_compat.rb:8: warning: already initialized constant TRANSPORT_CLASS
      /usr/local/share/gems/gems/fluent-plugin-elasticsearch-5.2.2/lib/fluent/plugin/elasticsearch_compat.rb:3: warning: previous definition of TRANSPORT_CLASS was here
      /usr/local/share/gems/gems/fluent-plugin-elasticsearch-5.2.2/lib/fluent/plugin/elasticsearch_compat.rb:25: warning: already initialized constant SELECTOR_CLASS
      /usr/local/share/gems/gems/fluent-plugin-elasticsearch-5.2.2/lib/fluent/plugin/elasticsearch_compat.rb:20: warning: previous definition of SELECTOR_CLASS was here
      2022-11-02 06:26:52 +0000 [warn]: For security reason, setting private_key_passphrase is recommended when cert_path is specified
      2022-11-02 06:26:55 +0000 [warn]: [to_rsyslog] failed to flush the buffer. retry_times=0 next_retry_time=2022-11-02 06:26:57 +0000 chunk="5ec76bfe6f4abb007baf064940d38ec5" error_class=NameError error="undefined local variable or method `context' for RemoteSyslogSender::SslContext:Module\nDid you mean?  const_get"
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/remote_syslog_sender-1.2.1/lib/remote_syslog_sender/ssl_context.rb:64:in `build'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/remote_syslog_sender-1.2.1/lib/remote_syslog_sender/tcp_sender.rb:70:in `block in connect'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/remote_syslog_sender-1.2.1/lib/remote_syslog_sender/tcp_sender.rb:55:in `synchronize'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/remote_syslog_sender-1.2.1/lib/remote_syslog_sender/tcp_sender.rb:55:in `connect'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/remote_syslog_sender-1.2.1/lib/remote_syslog_sender/tcp_sender.rb:41:in `initialize'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/fluent-plugin-remote_syslog-1.0.0/lib/fluent/plugin/out_remote_syslog.rb:205:in `new'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/fluent-plugin-remote_syslog-1.0.0/lib/fluent/plugin/out_remote_syslog.rb:205:in `create_sender'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/fluent-plugin-remote_syslog-1.0.0/lib/fluent/plugin/out_remote_syslog.rb:100:in `write'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/fluentd-1.14.6/lib/fluent/plugin/output.rb:1179:in `try_flush'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/fluentd-1.14.6/lib/fluent/plugin/output.rb:1500:in `flush_thread_run'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/fluentd-1.14.6/lib/fluent/plugin/output.rb:499:in `block (2 levels) in start'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/fluentd-1.14.6/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
      2022-11-02 06:26:55 +0000 [warn]: [to_rsyslog] failed to flush the buffer. retry_times=0 next_retry_time=2022-11-02 06:26:57 +0000 chunk="5ec76bfa968c4099d6fbe02ae841b24c" error_class=NameError error="undefined local variable or method `context' for RemoteSyslogSender::SslContext:Module\nDid you mean?  const_get"
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/remote_syslog_sender-1.2.1/lib/remote_syslog_sender/ssl_context.rb:64:in `build'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/remote_syslog_sender-1.2.1/lib/remote_syslog_sender/tcp_sender.rb:70:in `block in connect'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/remote_syslog_sender-1.2.1/lib/remote_syslog_sender/tcp_sender.rb:55:in `synchronize'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/remote_syslog_sender-1.2.1/lib/remote_syslog_sender/tcp_sender.rb:55:in `connect'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/remote_syslog_sender-1.2.1/lib/remote_syslog_sender/tcp_sender.rb:41:in `initialize'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/fluent-plugin-remote_syslog-1.0.0/lib/fluent/plugin/out_remote_syslog.rb:205:in `new'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/fluent-plugin-remote_syslog-1.0.0/lib/fluent/plugin/out_remote_syslog.rb:205:in `create_sender'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/fluent-plugin-remote_syslog-1.0.0/lib/fluent/plugin/out_remote_syslog.rb:100:in `write'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/fluentd-1.14.6/lib/fluent/plugin/output.rb:1179:in `try_flush'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/fluentd-1.14.6/lib/fluent/plugin/output.rb:1500:in `flush_thread_run'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/fluentd-1.14.6/lib/fluent/plugin/output.rb:499:in `block (2 levels) in start'
        2022-11-02 06:26:55 +0000 [warn]: /usr/local/share/gems/gems/fluentd-1.14.6/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
      2022-11-02 06:26:59 +0000 [warn]: [to_rsyslog] failed to flush the buffer. retry_times=1 next_retry_time=2022-11-02 06:27:02 +0000 chunk="5ec76bfa968c4099d6fbe02ae841b24c" error_class=NameError error="undefined local variable or method `context' for RemoteSyslogSender::SslContext:Module\nDid you mean?  const_get"
        2022-11-02 06:26:59 +0000 [warn]: suppressed same stacktrace
      2022-11-02 06:26:59 +0000 [warn]: [to_rsyslog] failed to flush the buffer. retry_times=1 next_retry_time=2022-11-02 06:27:02 +0000 chunk="5ec76bfe6f4abb007baf064940d38ec5" error_class=NameError error="undefined local variable or method `context' for RemoteSyslogSender::SslContext:Module\nDid you mean?  const_get"
        2022-11-02 06:26:59 +0000 [warn]: suppressed same stacktrace
      2022-11-02 06:27:04 +0000 [warn]: [to_rsyslog] failed to flush the buffer. retry_times=2 next_retry_time=2022-11-02 06:27:08 +0000 chunk="5ec76bfa968c4099d6fbe02ae841b24c" error_class=NameError error="undefined local variable or method `context' for RemoteSyslogSender::SslContext:Module\nDid you mean?  const_get"
        2022-11-02 06:27:04 +0000 [warn]: suppressed same stacktrace
      2022-11-02 06:27:04 +0000 [warn]: [to_rsyslog] failed to flush the buffer. retry_times=2 next_retry_time=2022-11-02 06:27:09 +0000 chunk="5ec76bfe6f4abb007baf064940d38ec5" error_class=NameError error="undefined local variable or method `context' for RemoteSyslogSender::SslContext:Module\nDid you mean?  const_get"
        2022-11-02 06:27:04 +0000 [warn]: suppressed same stacktrace

      Expected results:

      Additional info:

              vimalkum@redhat.com Vimal Kumar
              rhn-support-anli Anping Li
              Anping Li Anping Li
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: