{"record":{"id":"0ce1b55e315638ea","repo":"fluent/fluentd","slug":"worker-id-should-be-integer-worker-id-str","errorCode":null,"errorMessage":"worker id should be integer: #{worker_id_str}","messagePattern":"worker id should be integer: #(.+?)","errorType":"exception","errorClass":"Fluent::ConfigError","httpStatus":null,"severity":"error","filePath":"lib/fluent/static_config_analysis.rb","lineNumber":114,"sourceCode":"        ].flatten\n        ret << Elem::Worker.new(ids, config, nodes)\n      end\n\n      ret\n    end\n\n    def parse_worker_id(conf)\n      worker_id_str = conf.arg\n\n      if worker_id_str.empty?\n        raise Fluent::ConfigError, 'Missing worker id on <worker> directive'\n      end\n\n      l, r =\n         begin\n           worker_id_str.split('-', 2).map { |v| Integer(v) }\n         rescue TypeError, ArgumentError\n           raise Fluent::ConfigError, \"worker id should be integer: #{worker_id_str}\"\n         end\n\n      if l < 0 || l >= @workers\n        raise Fluent::ConfigError, \"worker id #{l} specified by <worker> directive is not allowed. Available worker id is between 0 and #{@workers-1}\"\n      end\n\n      # e.g. specified one worker id like `<worker 0>`\n      if r.nil?\n        return [l]\n      end\n\n      if r < 0 || r >= @workers\n        raise Fluent::ConfigError, \"worker id #{r} specified by <worker> directive is not allowed. Available worker id is between 0 and #{@workers-1}\"\n      end\n\n      if l > r\n        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>\"\n      end","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/static_config_analysis.rb#L96-L132","documentation":"Error \"worker id should be integer: #{worker_id_str}\" thrown in fluent/fluentd.","triggerScenarios":"Thrown at lib/fluent/static_config_analysis.rb:114 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"dd45c6e18dc7be33b5e5a0f0767bf46307ff5626","analyzedAt":"2026-08-21T16:22:07.332Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}