vectordotdev/vector · error
source output misconfigured - output for port
Error message
source output misconfigured - output for port {:?} missing What it means
During topology schema computation, possible_definitions unwraps a source's output for a given port that source_output_for_port already reported as existing (Ok(Some(_))), so the None branch is marked unreachable. Hitting it means source_output_for_port and its output lookup disagree — the source claimed to have an output for the port but returned None. This indicates a source implementation bug or an inconsistent build unit graph.
Solutions
- Inspect the source implementation's output_for_port to ensure it cannot return Ok(None) for a port it advertises
- Rebuild with consistent crate versions to rule out a stale build
- File/check a Vector bug with the topology config that triggers it
Defensive patterns
Strategy: validation
Validate before calling
// Validate the topology before schema expansion vector validate --no-environment config.yaml
Prevention
- Implement custom source output_for_port to never return Ok(None) for advertised ports
- Keep all Vector crates on the same version in embedded builds
- Rebuild cleanly after touching component metadata code
When it happens
Trigger: A source component whose output implementation returns Ok(None) for a port it earlier reported as existing; adding a custom source with a misimplemented output_for_port; race/regression in topology builder against source unit metadata.
Common situations: Developing a custom Vector source with named output ports; Vector version mismatches between library crates where the topology and source code disagree.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- source output misconfigured
- transform must exist - already found inputs
- transform output misconfigured - output for port
- already found inputs
- can't run runner twice
AI-assisted analysis of vectordotdev/vector@bdb87aeaa4 (2026-09-16).
Data as JSON: /api/errors/d8e8826c4ba17cc9.
Report an issue: GitHub.
Appendix: source
Thrown at src/topology/schema.rs:46
return Ok(vec![]);
}
// Try to get the definition from the cache.
if let Some(definition) = cache.get(&(config.schema_enabled(), inputs.to_vec())) {
return Ok(definition.clone());
}
let mut definitions = Vec::new();
for input in inputs {
let key = &input.component;
// If the input is a source, the output is merged into the top-level schema.
if let Ok(maybe_output) = config.source_output_for_port(key, &input.port) {
let mut source_definition = input.with_definitions(
maybe_output
.unwrap_or_else(|| {
unreachable!(
"source output misconfigured - output for port {:?} missing",
&input.port
)
})
.schema_definition(config.schema_enabled()),
);
if contains_never(&source_definition) {
return Err(Error::ContainsNever);
}
definitions.append(&mut source_definition);
}
// If the input is a transform, the output is merged into the top-level schema
if let Some(inputs) = config.transform_inputs(key) {
let input_definitions =
possible_definitions(inputs, config, enrichment_tables.clone(), cache)?;View on GitHub (pinned to bdb87aeaa4)