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

Error: 'uninitialized constant Fluent::Compat::HandleTagAndTimeMixin' #1156

Closed
macdjord opened this issue Aug 10, 2016 · 6 comments · Fixed by #1168
Closed

Error: 'uninitialized constant Fluent::Compat::HandleTagAndTimeMixin' #1156

macdjord opened this issue Aug 10, 2016 · 6 comments · Fixed by #1168
Labels
bug Something isn't working v0.14

Comments

@macdjord
Copy link

On starting td-agent, I get the following error:

2016-08-10 17:31:20 -0400 [error]: unexpected error error_class=NameError error="uninitialized constant Fluent::Compat::HandleTagAndTimeMixin"
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/compat/output.rb:655:in `start'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/compat/call_super_mixin.rb:42:in `start'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/root_agent.rb:138:in `block in start'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/root_agent.rb:127:in `block (2 levels) in lifecycle'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/root_agent.rb:126:in `each'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/root_agent.rb:126:in `block in lifecycle'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/root_agent.rb:113:in `each'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/root_agent.rb:113:in `lifecycle'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/root_agent.rb:137:in `start'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/engine.rb:211:in `start'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/engine.rb:175:in `run'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/supervisor.rb:624:in `run_engine'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/supervisor.rb:409:in `block in run_worker'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/supervisor.rb:553:in `call'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/supervisor.rb:553:in `main_process'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/supervisor.rb:404:in `run_worker'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/command/fluentd.rb:271:in `<top (required)>'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/bin/fluentd:5:in `<top (required)>'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/bin/fluentd:23:in `load'
  2016-08-10 17:31:20 -0400 [error]: /opt/td-agent/embedded/bin/fluentd:23:in `<top (required)>'
  2016-08-10 17:31:20 -0400 [error]: /usr/sbin/td-agent:7:in `load'
  2016-08-10 17:31:20 -0400 [error]: /usr/sbin/td-agent:7:in `<main>'
2016-08-10 17:31:20 -0400 [error]: unexpected error error="uninitialized constant Fluent::Compat::HandleTagAndTimeMixin"
  2016-08-10 17:31:20 -0400 [error]: suppressed same stacktrace
2016-08-10 17:31:20 -0400 [info]: Worker 0 finished unexpectedly with status 1

Please advise.

@repeatedly
Copy link
Member

What the plugin do you use?

@macdjord
Copy link
Author

2016-08-10 17:50:17 -0400 [info]: gem 'fluent-mixin-config-placeholders' version '0.4.0'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-mixin-plaintextformatter' version '0.2.6'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-concat' version '0.5.0'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-mongo' version '0.7.13'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-multi-format-parser' version '0.0.2'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-rewrite-tag-filter' version '1.5.5'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-s3' version '0.6.8'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-sar' version '0.0.4'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-scribe' version '0.10.14'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-secure-forward' version '0.4.3'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-systemd' version '0.0.3'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-tail-multiline' version '0.1.5'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-td' version '0.10.28'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-td-monitoring' version '0.2.2'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-webhdfs' version '0.4.2'
2016-08-10 17:50:17 -0400 [info]: gem 'fluentd' version '0.14.2'
2016-08-10 17:50:17 -0400 [info]: gem 'fluentd' version '0.12.26'
2016-08-10 17:50:17 -0400 [info]: gem 'fluentd' version '0.10.61'

@repeatedly
Copy link
Member

Please paste entire logs.

@macdjord
Copy link
Author

2016-08-10 17:50:16 -0400 [info]: Worker 0 finished unexpectedly with status 1
2016-08-10 17:50:17 -0400 [info]: Received graceful stop
2016-08-10 17:50:17 -0400 [info]: reading config file path="/etc/td-agent/td-agent.conf"
2016-08-10 17:50:17 -0400 [info]: starting fluentd-0.14.2 without supervision
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-mixin-config-placeholders' version '0.4.0'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-mixin-plaintextformatter' version '0.2.6'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-concat' version '0.5.0'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-mongo' version '0.7.13'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-multi-format-parser' version '0.0.2'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-rewrite-tag-filter' version '1.5.5'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-s3' version '0.6.8'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-sar' version '0.0.4'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-scribe' version '0.10.14'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-secure-forward' version '0.4.3'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-systemd' version '0.0.3'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-tail-multiline' version '0.1.5'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-td' version '0.10.28'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-td-monitoring' version '0.2.2'
2016-08-10 17:50:17 -0400 [info]: gem 'fluent-plugin-webhdfs' version '0.4.2'
2016-08-10 17:50:17 -0400 [info]: gem 'fluentd' version '0.14.2'
2016-08-10 17:50:17 -0400 [info]: gem 'fluentd' version '0.12.26'
2016-08-10 17:50:17 -0400 [info]: gem 'fluentd' version '0.10.61'
2016-08-10 17:50:17 -0400 [info]: adding filter pattern="**" type="record_transformer"
2016-08-10 17:50:17 -0400 [info]: adding match pattern="docker-container.**" type="copy"
2016-08-10 17:50:17 -0400 [info]: adding match pattern="**" type="secure_forward"
2016-08-10 17:50:17 -0400 [info]: adding source type="dummy"
2016-08-10 17:50:17 -0400 [warn]: [Fluent::Plugin::DummyInput] both of Plugin @id and path for <storage> are not specified. Using on-memory store.
2016-08-10 17:50:17 -0400 [info]: using configuration file: <ROOT>
  <source>
    @type dummy
    tag "heartbeat.buffered"
    @log_level "debug"
    rate 1
    dummy {"message":"heartbeat"}
  </source>
  <filter **>
    @type record_transformer
    <record>
      hostname ${hostname}
    </record>
  </filter>
  <match docker-container.**>
    @type copy
    <store>
      @type "secure_forward"
      buffer_type "file"
      buffer_path /var/spool/td-agent/buf/docker-container.*.buffer
      secure true
      shared_key xxxxxx
      self_hostname "REDACTED"
      ca_cert_path "/etc/td-agent/ssl/certs/ca_cert.pem"
      <server>
        host "REDACTED"
        port 24284
      </server>
      <buffer tag>
        flush_mode interval
        retry_type exponential_backoff
        @type file
        path /var/spool/td-agent/buf/docker-container.*.buffer
      </buffer>
    </store>
    <store>
      @type "file"
      path "/var/log/td-agent/docker-containers"
      time_slice_format "%Y%m%d"
      time_slice_wait 10m
      time_format "%Y%m%d@%H%M%S%z"
      utc
      compress gzip
      buffer_path /var/log/td-agent/docker-containers.*
      localtime false
      <buffer time>
        flush_mode lazy
        retry_type exponential_backoff
        path /var/log/td-agent/docker-containers.*
        timekey_wait 10m
        timekey 86400
      </buffer>
      <parse>
        time_format %Y%m%d@%H%M%S%z
      </parse>
      <inject>
        time_format %Y%m%d@%H%M%S%z
        localtime false
      </inject>
    </store>
  </match>
  <match **>
    @type secure_forward
    buffer_type "file"
    buffer_path /var/spool/td-agent/buf/fek.*.buffer
    secure true
    shared_key xxxxxx
    self_hostname "REDACTED"
    ca_cert_path "/etc/td-agent/ssl/certs/ca_cert.pem"
    <server>
      host "REDACTED"
      port 24284
    </server>
    <buffer tag>
      flush_mode interval
      retry_type exponential_backoff
      @type file
      path /var/spool/td-agent/buf/fek.*.buffer
    </buffer>
  </match>
</ROOT>
2016-08-10 17:50:17 -0400 [warn]: section <parse> is not used in <store> of out_file plugin
2016-08-10 17:50:17 -0400 [error]: unexpected error error_class=NameError error="uninitialized constant Fluent::Compat::HandleTagAndTimeMixin"
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/compat/output.rb:655:in `start'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/compat/call_super_mixin.rb:42:in `start'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/root_agent.rb:138:in `block in start'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/root_agent.rb:127:in `block (2 levels) in lifecycle'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/root_agent.rb:126:in `each'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/root_agent.rb:126:in `block in lifecycle'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/root_agent.rb:113:in `each'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/root_agent.rb:113:in `lifecycle'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/root_agent.rb:137:in `start'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/engine.rb:211:in `start'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/engine.rb:175:in `run'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/supervisor.rb:624:in `run_engine'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/supervisor.rb:409:in `block in run_worker'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/supervisor.rb:553:in `call'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/supervisor.rb:553:in `main_process'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/supervisor.rb:404:in `run_worker'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/lib/fluent/command/fluentd.rb:271:in `<top (required)>'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.2/bin/fluentd:5:in `<top (required)>'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/bin/fluentd:23:in `load'
  2016-08-10 17:50:17 -0400 [error]: /opt/td-agent/embedded/bin/fluentd:23:in `<top (required)>'
  2016-08-10 17:50:17 -0400 [error]: /usr/sbin/td-agent:7:in `load'
  2016-08-10 17:50:17 -0400 [error]: /usr/sbin/td-agent:7:in `<main>'
2016-08-10 17:50:17 -0400 [error]: unexpected error error="uninitialized constant Fluent::Compat::HandleTagAndTimeMixin"
  2016-08-10 17:50:17 -0400 [error]: suppressed same stacktrace
2016-08-10 17:50:17 -0400 [info]: Worker 0 finished with status 1

@macdjord
Copy link
Author

Update: Reinstalled td-agent from scratch, making sure to completely blow away the installed gems folder. Installed gems section of the log now looks like this:

2016-08-11 15:25:17 -0400 [info]: starting fluentd-0.12.26
2016-08-11 15:25:17 -0400 [info]: gem 'fluent-mixin-config-placeholders' version '0.4.0'
2016-08-11 15:25:17 -0400 [info]: gem 'fluent-mixin-plaintextformatter' version '0.2.6'
2016-08-11 15:25:17 -0400 [info]: gem 'fluent-plugin-concat' version '0.5.0'
2016-08-11 15:25:17 -0400 [info]: gem 'fluent-plugin-mongo' version '0.7.13'
2016-08-11 15:25:17 -0400 [info]: gem 'fluent-plugin-multi-format-parser' version '0.0.2'
2016-08-11 15:25:17 -0400 [info]: gem 'fluent-plugin-rewrite-tag-filter' version '1.5.5'
2016-08-11 15:25:17 -0400 [info]: gem 'fluent-plugin-s3' version '0.6.8'
2016-08-11 15:25:17 -0400 [info]: gem 'fluent-plugin-sar' version '0.0.4'
2016-08-11 15:25:17 -0400 [info]: gem 'fluent-plugin-scribe' version '0.10.14'
2016-08-11 15:25:17 -0400 [info]: gem 'fluent-plugin-secure-forward' version '0.4.3'
2016-08-11 15:25:17 -0400 [info]: gem 'fluent-plugin-systemd' version '0.0.3'
2016-08-11 15:25:17 -0400 [info]: gem 'fluent-plugin-tail-multiline' version '0.1.5'
2016-08-11 15:25:17 -0400 [info]: gem 'fluent-plugin-td' version '0.10.28'
2016-08-11 15:25:17 -0400 [info]: gem 'fluent-plugin-td-monitoring' version '0.2.2'
2016-08-11 15:25:17 -0400 [info]: gem 'fluent-plugin-webhdfs' version '0.4.2'
2016-08-11 15:25:17 -0400 [info]: gem 'fluentd' version '0.12.26'
2016-08-11 15:25:17 -0400 [info]: gem 'fluentd' version '0.10.61'

And the error is gone. So apparently gem 'fluentd' version '0.14.2' got installed somehow at some point, and the error is somewhere in there.

@tagomoris tagomoris added bug Something isn't working v0.14 labels Aug 15, 2016
@tagomoris
Copy link
Member

tagomoris commented Aug 15, 2016

It's a bug of v0.14, require 'fluent/compat/handle_tag_and_time_mixin' is missing in output.rb.
This bug affects v0.12 API plugins which have @formatter instance variable and features compatible with inject_* methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v0.14
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants