{"record":{"id":"d0b4ccc70bd57ad2","repo":"fluent/fluentd","slug":"worker-id-r-specified-by-worker-directive-is","errorCode":null,"errorMessage":"worker id #{r} specified by <worker> directive is not allowed. Available worker id is between 0 and #{@workers-1}","messagePattern":"worker id #(.+?) specified by <worker> directive is not allowed\\. Available worker id is between 0 and #(.+?)","errorType":"exception","errorClass":"Fluent::ConfigError","httpStatus":null,"severity":"error","filePath":"lib/fluent/static_config_analysis.rb","lineNumber":127,"sourceCode":"\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\n\n      [l, r]\n    end\n\n    def static_label_analyse(conf)\n      ret = []\n      conf.elements(name: 'label').each do |e|\n        name = e.arg\n        if name.empty?\n          raise ConfigError, 'Missing symbol argument on <label> directive'\n        end\n\n        if @labels[name]","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/static_config_analysis.rb#L109-L145","documentation":"Error \"worker id #{r} specified by <worker> directive is not allowed. Available worker id is between 0 and #{@workers-1}\" thrown in fluent/fluentd.","triggerScenarios":"Thrown at lib/fluent/static_config_analysis.rb:127 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"}