{"record":{"id":"5ee15af80468fe6d","repo":"fluent/fluentd","slug":"other-type-using-this-path-plugin-already-use","errorCode":null,"errorMessage":"Other '#{type_using_this_path}' plugin already use same buffer path: type = #{type_of_owner}, buffer path = #{@path}","messagePattern":"Other '#(.+?)' plugin already use same buffer path: type = #(.+?), buffer path = #(.+?)","errorType":"exception","errorClass":"Fluent::ConfigError","httpStatus":null,"severity":"error","filePath":"lib/fluent/plugin/buf_file.rb","lineNumber":74,"sourceCode":"\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}\")\n          else\n            @path = File.join(@path, \"worker#{fluentd_worker_id}\", \"buffer.*#{@path_suffix}\")\n            if fluentd_worker_id == 0\n              # worker 0 always checks unflushed buffer chunks to be resumed (might be created while non-multi-worker configuration)\n              @additional_resume_path = File.join(File.expand_path(\"../../\", @path), \"buffer.*#{@path_suffix}\")\n            end\n          end","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/plugin/buf_file.rb#L56-L92","documentation":"A process-wide Fluent::VariableStore maps each file-buffer path to the plugin type that claimed it; when a second plugin configures the same @path, configure raises this ConfigError naming both the existing type and the new one. The guard prevents two outputs from interleaving chunks in the same files, which would corrupt both. The check is skipped when called_in_test?, so tests will not surface it.","triggerScenarios":"Two <match> blocks with the identical <buffer> path (copy-paste configs); two outputs relying on the same root_dir and the same @id; mixing file and file_single buffers on one path in the same process.","commonSituations":"Duplicating an output stanza for a second tag and forgetting to change the buffer path; templated config generation reusing one path for many outputs; renames that accidentally collide paths.","solutions":["Give each buffered output a unique path (e.g. include the @id or tag in the path)","Or rely on root_dir + distinct @id per plugin so implicit paths differ automatically","Search the config for duplicated 'path' values inside <buffer> blocks and deduplicate","Remember the duplicate check is bypassed in tests, so validate paths in your config pipeline too"],"exampleFix":"# before\n<match a.**>\n  @type file\n  <buffer>\n    @type file\n    path /var/log/fluent/buffer/out\n  </buffer>\n</match>\n<match b.**>\n  @type file\n  <buffer>\n    @type file\n    path /var/log/fluent/buffer/out\n  </buffer>\n</match>\n\n# after\n<match b.**>\n  @type file\n  <buffer>\n    @type file\n    path /var/log/fluent/buffer/out_b\n  </buffer>\n</match>","handlingStrategy":"validation","validationCode":"# Lint generated configs for duplicate buffer paths\npaths = conf.scan(/path\\s+(\\S+)/).flatten\ndupes = paths.tally.select { |_, n| n > 1 }.keys\nabort \"duplicate buffer paths: #{dupes.join(', ')}\" unless dupes.empty?","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Derive buffer paths from @id or tag so they are unique by construction","The duplicate check is skipped in tests (called_in_test?), so lint paths in your config pipeline","Review copied <match> stanzas for forgotten path changes"],"tags":["fluentd","buffer","path-conflict","config"],"backgroundTag":"duplicate-resource-path","analyzedSha":"dd45c6e18dc7be33b5e5a0f0767bf46307ff5626","analyzedAt":"2026-08-21T16:22:07.332Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}