{"record":{"id":"174ff0e04ca76175","repo":"fluent/fluentd","slug":"non-directory-entry-exists-root-dir","errorCode":null,"errorMessage":"non directory entry exists:#{root_dir}","messagePattern":"non directory entry exists:#(.+?)","errorType":"exception","errorClass":"Fluent::InvalidRootDirectory","httpStatus":null,"severity":"error","filePath":"lib/fluent/supervisor.rb","lineNumber":713,"sourceCode":"\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\n        end\n      end\n\n      begin\n        ServerEngine::Privilege.change(@chuser, @chgroup)\n        MessagePackFactory.init(enable_time_support: @system_config.enable_msgpack_time_support)\n        Fluent::Engine.init(@system_config, supervisor_mode: true, start_in_parallel: ENV.key?(\"FLUENT_RUNNING_IN_PARALLEL_WITH_OLD\"))\n        Fluent::Engine.run_configure(@conf, dry_run: dry_run)\n      rescue Fluent::ConfigError => e\n        $log.error 'config error', file: @config_path, error: e\n        $log.debug_backtrace","sourceCodeStart":695,"sourceCodeEnd":731,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/supervisor.rb#L695-L731","documentation":"Error \"non directory entry exists:#{root_dir}\" thrown in fluent/fluentd.","triggerScenarios":"Thrown at lib/fluent/supervisor.rb:713 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"}