{"record":{"id":"4e371a8342e8b3d5","repo":"fluent/fluentd","slug":"buffer-path-is-not-configured-specify-path-in","errorCode":null,"errorMessage":"buffer path is not configured. specify 'path' in <buffer>","messagePattern":"buffer path is not configured\\. specify 'path' in <buffer>","errorType":"exception","errorClass":"Fluent::ConfigError","httpStatus":null,"severity":"error","filePath":"lib/fluent/plugin/buf_file.rb","lineNumber":67,"sourceCode":"        @additional_resume_path = nil\n        @buffer_path = nil\n        @variable_store = nil\n      end\n\n      def configure(conf)\n        super\n\n        @variable_store = Fluent::VariableStore.fetch_or_build(:buf_file)\n\n        multi_workers_configured = owner.system_config.workers > 1\n\n        using_plugin_root_dir = false\n        unless @path\n          if root_dir = owner.plugin_root_dir\n            @path = File.join(root_dir, 'buffer')\n            using_plugin_root_dir = true # plugin_root_dir path contains worker id\n          else\n            raise Fluent::ConfigError, \"buffer path is not configured. specify 'path' in <buffer>\"\n          end\n        end\n\n        type_of_owner = Plugin.lookup_type_from_class(@_owner.class)\n        if @variable_store.has_key?(@path) && !called_in_test?\n          type_using_this_path = @variable_store[@path]\n          raise ConfigError, \"Other '#{type_using_this_path}' plugin already use same buffer path: type = #{type_of_owner}, buffer path = #{@path}\"\n        end\n\n        @buffer_path = @path\n        @variable_store[@buffer_path] = type_of_owner\n\n        specified_directory_exists = File.exist?(@path) && File.directory?(@path)\n        unexisting_path_for_directory = !File.exist?(@path) && !@path.include?('.*')\n\n        if specified_directory_exists || unexisting_path_for_directory # directory\n          if using_plugin_root_dir || !multi_workers_configured\n            @path = File.join(@path, \"buffer.*#{@path_suffix}\")","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/plugin/buf_file.rb#L49-L85","documentation":"The file buffer plugin needs a storage location: either an explicit path in <buffer> or an implicit one derived from <system> root_dir plus the owning plugin's @id (owner.plugin_root_dir). When @path is nil and no plugin root dir exists, configure raises this ConfigError. The implicit path is preferred in multi-worker setups because it already contains the worker id.","triggerScenarios":"<buffer>@type file</buffer> with no path, on an output whose plugin has no @id, and with no <system> root_dir set; configs ported from setups relying on a default that was never configured.","commonSituations":"First-time file-buffer configs omitting path; adding @type file buffers to existing outputs that lack @id; multi-worker deployments where per-worker storage via root_dir was intended but never declared.","solutions":["Add an explicit path in the buffer section: <buffer>@type file</buffer> path /var/log/fluent/buffer (use a directory path or a 'prefix.*.suffix' pattern as documented)","Or provide the implicit location: give the output plugin an @id and set <system> root_dir /var/log/fluent </system> (recommended for multi-worker, since the path then includes the worker id)","Keep buffer paths unique per output to avoid the related 'already use same buffer path' error","Verify the buffer directory is writable by the fluentd user"],"exampleFix":"# before\n<match demo.**>\n  @type forward\n  <buffer>\n    @type file\n  </buffer>\n</match>\n\n# after\n<match demo.**>\n  @type forward\n  @id fwd_out\n  <buffer>\n    @type file\n    path /var/log/fluent/buffer/fwd_out\n  </buffer>\n</match>","handlingStrategy":"validation","validationCode":"# In config generation, assert every file buffer has a location\nconf.scan(/<buffer>(.*?)<\\/buffer>/m).each do |body|\n  next unless body.first.include?('@type file')\n  abort 'file buffer without path' unless body.first.include?('path ') || conf.include?('root_dir')\nend","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set path in <buffer>@type file</buffer> blocks or use system root_dir + @id","Give every buffered output an @id so implicit paths work","Include buffer config in CI dry-runs"],"tags":["fluentd","buffer","file-buffer","config"],"backgroundTag":"missing-required-config","analyzedSha":"dd45c6e18dc7be33b5e5a0f0767bf46307ff5626","analyzedAt":"2026-08-21T16:22:07.332Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}