{"record":{"id":"a3a6ccb248ae8559","repo":"vectordotdev/vector","slug":"unknown-output-running","errorCode":null,"errorMessage":"unknown output","messagePattern":"unknown output","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/topology/running.rs","lineNumber":974,"sourceCode":"        key: &ComponentKey,\n        diff: &ConfigDiff,\n        new_pieces: &mut builder::TopologyPieces,\n    ) {\n        let (tx, inputs) = new_pieces.inputs.remove(key).unwrap();\n\n        let old_inputs = self\n            .config\n            .inputs_for_node(key)\n            .into_iter()\n            .flatten()\n            .cloned()\n            .collect::<HashSet<_>>();\n\n        let new_inputs = inputs.iter().cloned().collect::<HashSet<_>>();\n        let inputs_to_add = &new_inputs - &old_inputs;\n\n        for input in inputs {\n            let output = self.outputs.get_mut(&input).expect(\"unknown output\");\n\n            if diff.contains(&input.component) || inputs_to_add.contains(&input) {\n                // If the input we're connecting to is changing, that means its outputs will have been\n                // recreated, so instead of replacing a paused sink, we have to add it to this new\n                // output for the first time, since there's nothing to actually replace at this point.\n                debug!(component_id = %key, fanout_id = %input, \"Adding component input to fanout.\");\n\n                _ = output.send(ControlMessage::Add(key.clone(), tx.clone()));\n            } else {\n                // We know that if this component is connected to a given input, and neither\n                // components were changed, then the output must still exist, which means we paused\n                // this component's connection to its output, so we have to replace that connection\n                // now:\n                debug!(component_id = %key, fanout_id = %input, \"Replacing component input in fanout.\");\n\n                _ = output.send(ControlMessage::Replace(key.clone(), tx.clone()));\n            }\n        }","sourceCodeStart":956,"sourceCodeEnd":992,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/src/topology/running.rs#L956-L992","documentation":"`setup_inputs` looks up each input's source in the running topology's `outputs` map and panics with \"unknown output\" if it is missing (src/topology/running.rs:974). During a diff-based reload, every input referenced by a component must have a known output registered in `self.outputs`; a miss means the diff bookkeeping dropped or never registered that output.","triggerScenarios":"`connect_diff` connecting an input whose producing component was removed or renamed in the new config but still referenced, or whose output was never added to `self.outputs` during the diff application.","commonSituations":"Renaming a component in the config while other components still list the old name in their `inputs`; reload races where outputs were not migrated.","solutions":["Verify every component's `inputs` names a component that exists in the new config; fix stale names before reloading.","Ensure `connect_diff` registers all new outputs (via setup_outputs) before setup_inputs runs.","Fall back to a full topology rebuild instead of diff reload if outputs bookkeeping is inconsistent."],"exampleFix":"// config mistake\n// before: sink.inputs = [\"old_source\"]  (source renamed to new_source)\n// after:\n// source:\n//   new_source: ...\n// sink:\n//   inputs: [\"new_source\"]","handlingStrategy":"validation","validationCode":"// before reload: every input name must exist as a component in the new config\nfor c in new_config.components() {\n    for inp in &c.inputs {\n        assert!(new_config.contains_component(inp), \"input {inp} of {} missing\", c.id());\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["After renaming a component, update every `inputs` reference in the same config change.","Run `vector validate` before applying reloads.","Keep diff application order: register outputs before wiring inputs."],"tags":["rust","topology","reload","config"],"backgroundTag":"resource-not-found","analyzedSha":"bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013","analyzedAt":"2026-09-16T02:53:35.741Z","contentChangedAt":"2026-09-16T02:53:35.741Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}