vectordotdev/vector · error

source output misconfigured

Error message

source output misconfigured

What it means

expanded_definitions matches a sink's required input against candidate source definitions; on no match it raises unreachable! because topology validation elsewhere should have rejected a misconfigured graph first. Reaching it means an invalid sink→source connection slipped past earlier validation, so the schema layer hits dead code. The comment in the source confirms the topology builder owns this error state; this panic is a safety net.

Solutions

  1. Run vector validate on the config and fix the sink inputs to reference existing source outputs/ports
  2. Ensure topology construction goes through the standard builder/validation path
  3. Upgrade Vector; if reproducible with a stock config, file a bug with the config
Defensive patterns

Strategy: validation

Validate before calling

// Check sink inputs resolve to real source outputs before building
vector validate config.yaml

Prevention

When it happens

Trigger: A sink's inputs referencing a source/port that does not exist or emits incompatible types, while the earlier validation pass did not reject the config; programmatic topology construction bypassing validate().

Common situations: Hand-built topologies in embedded usage; Vector bugs where validation and schema expansion disagree; typos in port names combined with a validation skip (e.g. --skip-healthchecks style paths or tests).

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


AI-assisted analysis of vectordotdev/vector@bdb87aeaa4 (2026-09-16). Data as JSON: /api/errors/c57790d653574fa2. Report an issue: GitHub.

Appendix: source

Thrown at src/topology/schema.rs:151

            // After getting the source matching to the given input, we need to further narrow the
            // actual output of the source feeding into this input, and then get the definition
            // belonging to that output.
            let mut source_definitions =
                outputs
                    .into_iter()
                    .find_map(|output| {
                        if output.port == input.port {
                            Some(input.with_definitions(
                                output.schema_definition(config.schema_enabled()),
                            ))
                        } else {
                            None
                        }
                    })
                    .unwrap_or_else(|| {
                        // If we find no match, it means the topology is misconfigured. This is a fatal
                        // error, but other parts of the topology builder deal with this state.
                        unreachable!("source output misconfigured")
                    });

            if contains_never(&source_definitions) {
                return Err(Error::ContainsNever);
            }

            definitions.append(&mut source_definitions);

        // A transform can receive from multiple inputs, and each input needs to be expanded to
        // a new pipeline.
        } else if let Some(inputs) = config.transform_inputs(key) {
            let input_definitions =
                possible_definitions(inputs, config, enrichment_tables.clone(), &mut merged_cache)?;

            let mut transform_definition = config
                .transform_outputs(key, enrichment_tables.clone(), &input_definitions)
                .expect("already found inputs")
                .iter()

View on GitHub (pinned to bdb87aeaa4)