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

Cannot start td-agent when using grok plugin in config #1827

Closed
jamesalford opened this Issue Jan 24, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@jamesalford
Copy link

jamesalford commented Jan 24, 2018

  • fluentd or td-agent version.
# dpkg -l |grep td-agent
ii  td-agent       3.1.1-0       amd64        Treasure Agent: A data collector for Treasure Data
# td-agent-gem list|grep fluentd
fluentd (1.0.2, 0.14.0)
# td-agent-gem list|grep fluent-plugin-grok
fluent-plugin-grok-parser (2.1.2)
  • Environment information, e.g. OS.
# cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"
  • Your configuration
<source>
  @type tail
  path /var/log/syslog
  pos_file /var/log/td-agent/syslog.pos
  path_key tailed_path
  rotate_wait 15
  tag system.syslog
  <parse>
    @type grok
    grok_pattern %{SYSLOGLINE}
  </parse>
</source>
  • Your problem explanation. If you have an error logs, write it together.
    Cannot start the service td-agent using "service td-agent start" command. Log below:
2018-01-24T11:10:16.758377+00:00 hostname systemd[1]: td-agent.service: Control process exited, code=exited status=1
2018-01-24T11:10:16.758481+00:00 hostname systemd[1]: Failed to start td-agent: Fluentd based data collector for Treasure Data.
2018-01-24T11:10:16.758548+00:00 hostname systemd[1]: td-agent.service: Unit entered failed state.
2018-01-24T11:10:16.758607+00:00 hostname systemd[1]: td-agent.service: Failed with result 'exit-code'.
2018-01-24T11:10:16.874872+00:00 hostname systemd[1]: td-agent.service: Service hold-off time over, scheduling restart.
2018-01-24T11:10:16.875053+00:00 hostname systemd[1]: Stopped td-agent: Fluentd based data collector for Treasure Data.
2018-01-24T11:10:16.875135+00:00 hostname systemd[1]: Starting td-agent: Fluentd based data collector for Treasure Data...
2018-01-24T11:10:17.264307+00:00 hostname fluentd[17578]: /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/config/types.rb:67:in `force_encoding': can't modify frozen String (RuntimeError)
2018-01-24T11:10:17.264557+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/config/types.rb:67:in `block in <module:Config>'
2018-01-24T11:10:17.264676+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/config/section.rb:145:in `instance_exec'
2018-01-24T11:10:17.264782+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/config/section.rb:145:in `block in generate'
2018-01-24T11:10:17.264889+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/config/section.rb:136:in `each_pair'
2018-01-24T11:10:17.264989+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/config/section.rb:136:in `generate'
2018-01-24T11:10:17.265089+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/configurable.rb:94:in `configure'
2018-01-24T11:10:17.265186+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/plugin/base.rb:57:in `configure'
2018-01-24T11:10:17.265283+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/time.rb:148:in `configure'
2018-01-24T11:10:17.265380+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/plugin/parser.rb:62:in `configure'
2018-01-24T11:10:17.265478+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluent-plugin-grok-parser-2.1.2/lib/fluent/plugin/parser_grok.rb:24:in `configure'
2018-01-24T11:10:17.265574+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/plugin.rb:164:in `configure'
2018-01-24T11:10:17.265671+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/plugin_helper/parser.rb:52:in `parser_create'
2018-01-24T11:10:17.265768+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/plugin/in_tail.rb:151:in `configure'
2018-01-24T11:10:17.265864+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/plugin.rb:164:in `configure'
2018-01-24T11:10:17.265962+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/root_agent.rb:282:in `add_source'
2018-01-24T11:10:17.266060+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/root_agent.rb:122:in `block in configure'
2018-01-24T11:10:17.266158+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/root_agent.rb:118:in `each'
2018-01-24T11:10:17.266255+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/root_agent.rb:118:in `configure'
2018-01-24T11:10:17.266350+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/engine.rb:131:in `configure'
2018-01-24T11:10:17.266447+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/engine.rb:96:in `run_configure'
2018-01-24T11:10:17.266554+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/supervisor.rb:770:in `run_configure'
2018-01-24T11:10:17.266652+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/supervisor.rb:553:in `dry_run'
2018-01-24T11:10:17.266751+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/supervisor.rb:571:in `supervise'
2018-01-24T11:10:17.266848+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/supervisor.rb:476:in `run_supervisor'
2018-01-24T11:10:17.266946+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/command/fluentd.rb:310:in `<top (required)>'
2018-01-24T11:10:17.267045+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
2018-01-24T11:10:17.267142+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
2018-01-24T11:10:17.267238+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/bin/fluentd:8:in `<top (required)>'
2018-01-24T11:10:17.269549+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/bin/fluentd:22:in `load'
2018-01-24T11:10:17.269756+00:00 hostname fluentd[17578]: #011from /opt/td-agent/embedded/bin/fluentd:22:in `<main>'
@jamesalford

This comment has been minimized.

Copy link

jamesalford commented Jan 24, 2018

If i remove some code from types.rb i can get it to start.
/opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.0.2/lib/fluent/config/types.rb

changed:
STRING_TYPE = Proc.new { |val, opts| val.to_s.force_encoding(Encoding::UTF_8) }

to:
STRING_TYPE = Proc.new { |val, opts| val.to_s }

@repeatedly

This comment has been minimized.

Copy link
Member

repeatedly commented Jan 25, 2018

Thanks. Will check soon.

@repeatedly repeatedly self-assigned this Jan 25, 2018

@repeatedly repeatedly added bug v1 labels Jan 25, 2018

repeatedly added a commit that referenced this issue Jan 31, 2018

Merge pull request #1838 from fluent/fix-fronze-string-with-config_param
Fix config_param for string type with frozen string. fix #1827
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment