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

Parse error with fluentd-0.10.57 #3

Closed
dgeorgievski opened this issue Dec 16, 2014 · 2 comments
Closed

Parse error with fluentd-0.10.57 #3

dgeorgievski opened this issue Dec 16, 2014 · 2 comments

Comments

@dgeorgievski
Copy link

When starting td-agent with a map plugin configuration like this

type map map [["code." + tag, time, {"code" => record["code"].to_i}], ["time." + tag, time, {"time" => record["time"].to_i}]] multi true

the following error is thrown.

Starting td-agent: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.57/lib/fluent/config/basic_parser.rb:86:in `parse_error!': got incomplete JSON array configuration at td-agent.conf line 87,9 (Fluent::ConfigParseError)
86: multi true
87:

 ---------^
from /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.57/lib/fluent/config/literal_parser.rb:235:in `scan_json'
from /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.57/lib/fluent/config/literal_parser.rb:56:in `parse_literal'
from /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.57/lib/fluent/config/v1_parser.rb:120:in `parse_element'
from /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.57/lib/fluent/config/v1_parser.rb:91:in `parse_element'
from /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.57/lib/fluent/config/v1_parser.rb:40:in `parse!'
from /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.57/lib/fluent/config/v1_parser.rb:30:in `parse'
from /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.57/lib/fluent/config.rb:30:in `parse'
from /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.57/lib/fluent/supervisor.rb:385:in `apply_system_config'
from /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.57/lib/fluent/supervisor.rb:110:in `initialize'
from /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.57/lib/fluent/command/fluentd.rb:168:in `new'
from /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.57/lib/fluent/command/fluentd.rb:168:in `<top (required)>'
from /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.57/bin/fluentd:6:in `<top (required)>'
from /opt/td-agent/embedded/bin/fluentd:23:in `load'
from /opt/td-agent/embedded/bin/fluentd:23:in `<top (required)>'
from /usr/sbin/td-agent:7:in `load'
from /usr/sbin/td-agent:7:in `<main>'
                                                       [FAILED]

The error is present for the record setting as well. I am running td-agent on CentOS 6.5 x86_64.

My apologies for the formatting of the error messages. I didn't find anything in the markup help that would allow me to group the error output.

@piroor
Copy link
Contributor

piroor commented Jun 17, 2015

You can resolve the error by wrapping the configuration value with parenthesis like map ([["code." + tag, time, {"code" => record["code"].to_i}], ["time." + tag, time, {"time" => record["time"].to_i}]]). See also my pull request: #4

@cosmo0920
Copy link
Member

#4 is already merged, closing.

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

3 participants