{"record":{"id":"7ec059be5bf906ab","repo":"fluent/fluentd","slug":"invalid-number-of-workers-must-be-0-system","errorCode":null,"errorMessage":"invalid number of workers (must be > 0):#{@system_config.workers}","messagePattern":"invalid number of workers \\(must be > 0\\):#(.+?)","errorType":"exception","errorClass":"Fluent::ConfigError","httpStatus":null,"severity":"error","filePath":"lib/fluent/supervisor.rb","lineNumber":702,"sourceCode":"      # and `system_config.log.rotate_size`.\n      # However, currently, there is a bug that `system_config.log` parameters\n      # are not in `Fluent::SystemConfig::SYSTEM_CONFIG_PARAMETERS`, and these\n      # parameters are not merged in `build_system_config()`.\n      # Until we fix the bug of `Fluent::SystemConfig`, we need to use these instance variables.\n      @log_path = opt[:log_path]\n      @log_rotate_age = opt[:log_rotate_age]\n      @log_rotate_size = opt[:log_rotate_size]\n\n      @finished = false\n    end\n\n    def run_supervisor(dry_run: false)\n      if dry_run\n        $log.info \"starting fluentd-#{Fluent::VERSION} as dry run mode\", ruby: RUBY_VERSION\n      end\n\n      if @system_config.workers < 1\n        raise Fluent::ConfigError, \"invalid number of workers (must be > 0):#{@system_config.workers}\"\n      end\n\n      if Fluent.windows? && @system_config.with_source_only\n        raise Fluent::ConfigError, \"with-source-only is not supported on Windows\"\n      end\n\n      root_dir = @system_config.root_dir\n      if root_dir\n        if File.exist?(root_dir)\n          unless Dir.exist?(root_dir)\n            raise Fluent::InvalidRootDirectory, \"non directory entry exists:#{root_dir}\"\n          end\n        else\n          begin\n            FileUtils.mkdir_p(root_dir, mode: @system_config.dir_permission || Fluent::DEFAULT_DIR_PERMISSION)\n          rescue => e\n            raise Fluent::InvalidRootDirectory, \"failed to create root directory:#{root_dir}, #{e.inspect}\"\n          end","sourceCodeStart":684,"sourceCodeEnd":720,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/supervisor.rb#L684-L720","documentation":"Error \"invalid number of workers (must be > 0):#{@system_config.workers}\" thrown in fluent/fluentd.","triggerScenarios":"Thrown at lib/fluent/supervisor.rb:702 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"}