fluent/fluentd · error · Fluent::ConfigError
worker id should be integer: #{worker_id_str}
Error message
worker id should be integer: #{worker_id_str} What it means
Error "worker id should be integer: #{worker_id_str}" thrown in fluent/fluentd.
Source
Thrown at lib/fluent/static_config_analysis.rb:114
].flatten
ret << Elem::Worker.new(ids, config, nodes)
end
ret
end
def parse_worker_id(conf)
worker_id_str = conf.arg
if worker_id_str.empty?
raise Fluent::ConfigError, 'Missing worker id on <worker> directive'
end
l, r =
begin
worker_id_str.split('-', 2).map { |v| Integer(v) }
rescue TypeError, ArgumentError
raise Fluent::ConfigError, "worker id should be integer: #{worker_id_str}"
end
if l < 0 || l >= @workers
raise Fluent::ConfigError, "worker id #{l} specified by <worker> directive is not allowed. Available worker id is between 0 and #{@workers-1}"
end
# e.g. specified one worker id like `<worker 0>`
if r.nil?
return [l]
end
if r < 0 || r >= @workers
raise Fluent::ConfigError, "worker id #{r} specified by <worker> directive is not allowed. Available worker id is between 0 and #{@workers-1}"
end
if l > r
raise Fluent::ConfigError, "greater first_worker_id<#{l}> than last_worker_id<#{r}> specified by <worker> directive is not allowed. Available multi worker assign syntax is <smaller_worker_id>-<greater_worker_id>"
endView on GitHub (pinned to dd45c6e18d)
When it happens
Trigger: Thrown at lib/fluent/static_config_analysis.rb:114 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of fluent/fluentd@dd45c6e18d (2026-08-21).
Data as JSON: /api/errors/0ce1b55e315638ea.
Report an issue: GitHub.