{"record":{"id":"eca7ec29d10eed32","repo":"fluent/fluentd","slug":"section-label-name-appears-twice","errorCode":null,"errorMessage":"Section <label #{name}> appears twice","messagePattern":"Section <label #(.+?)> appears twice","errorType":"exception","errorClass":"Fluent::ConfigError","httpStatus":null,"severity":"error","filePath":"lib/fluent/root_agent.rb","lineNumber":427,"sourceCode":"\n      input = Plugin.new_input(type)\n      # <source> emits events to the top-level event router (RootAgent#event_router).\n      # Input#configure overwrites event_router to a label's event_router if it has `@label` parameter.\n      # See also 'fluentd/plugin/input.rb'\n      input.context_router = @event_router\n      input.configure(conf)\n      input.event_emitter_apply_source_only if @source_only_mode.enabled?\n      if @enable_input_metrics\n        @event_router.add_metric_callbacks(input.plugin_id, Proc.new {|es| input.metric_callback(es) })\n      end\n      @inputs << input\n\n      input\n    end\n\n    def add_label(name)\n      label = Label.new(name, log: log)\n      raise ConfigError, \"Section <label #{name}> appears twice\" if @labels[name]\n      label.root_agent = self\n      @labels[name] = label\n    end\n\n    def find_label(label_name)\n      if label = @labels[label_name]\n        label\n      else\n        raise ArgumentError, \"#{label_name} label not found\"\n      end\n    end\n\n    def emit_error_event(tag, time, record, error)\n      error_info = {error: error, location: (error.backtrace ? error.backtrace.first : nil), tag: tag, time: time}\n      if @error_collector\n        # A record is not included in the logs because <@ERROR> handles it. This warn is for the notification\n        log.warn \"send an error event to @ERROR:\", error_info\n        @error_collector.emit(tag, time, record)","sourceCodeStart":409,"sourceCodeEnd":445,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/root_agent.rb#L409-L445","documentation":"Error \"Section <label #{name}> appears twice\" thrown in fluent/fluentd.","triggerScenarios":"Thrown at lib/fluent/root_agent.rb:427 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"}