{"record":{"id":"247dd66a0ee80a47","repo":"fluent/fluentd","slug":"missing-worker-id-on-worker-directive-247dd6","errorCode":null,"errorMessage":"Missing worker id on <worker> directive","messagePattern":"Missing worker id on <worker> directive","errorType":"exception","errorClass":"Fluent::ConfigError","httpStatus":null,"severity":"error","filePath":"lib/fluent/static_config_analysis.rb","lineNumber":107,"sourceCode":"          end\n        end\n\n        nodes = [\n          static_label_analyse(config),\n          static_filter_and_output_analyse(config),\n          static_input_analyse(config),\n        ].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","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/static_config_analysis.rb#L89-L125","documentation":"Error \"Missing worker id on <worker> directive\" thrown in fluent/fluentd.","triggerScenarios":"Thrown at lib/fluent/static_config_analysis.rb:107 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"}