quickwit-oss/quickwit · error · anyhow::Error
failed to parse service `{service_str}`. supported services
Error message
failed to parse service `{service_str}`. supported services are: `{}` What it means
`QuickwitService::from_str` parses a service name string into the `QuickwitService` enum. Any string outside the supported set (misspellings, unknown names) hits the bail arm listing the supported services. It exists to reject unknown/typo'd service identifiers early when parsing node config or env-var service lists.
Source
Thrown at quickwit/quickwit-config/src/service.rs:104
}
}
impl FromStr for QuickwitService {
type Err = anyhow::Error;
fn from_str(service_str: &str) -> Result<Self, Self::Err> {
match service_str {
"compactor" => Ok(QuickwitService::Compactor),
"control-plane" | "control_plane" => Ok(QuickwitService::ControlPlane),
"indexer" => Ok(QuickwitService::Indexer),
"janitor" => Ok(QuickwitService::Janitor),
"metastore" => Ok(QuickwitService::Metastore),
"metastore-read-replica" | "metastore_read_replica" => {
Ok(QuickwitService::MetastoreReadReplica)
}
"searcher" => Ok(QuickwitService::Searcher),
_ => {
bail!(
"failed to parse service `{service_str}`. supported services are: `{}`",
QuickwitService::supported_services().iter().join("`, `")
)
}
}
}
}
View on GitHub (pinned to a39730c5cd)
Solutions
- Fix the service string to one of the names listed in the error message (backtick-separated).
- Use `metastore-read-replica` or `metastore_read_replica` (not e.g. `read-replica`) for read replicas.
- Check the accepted aliases in quickwit/quickwit-config/src/service.rs `FromStr` impl for your Quickwit version.
Example fix
// before
let service = QuickwitService::from_str("search").unwrap();
// after
let service = QuickwitService::from_str("searcher").unwrap(); Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED_SERVICES: &[&str] = &[
"indexer", "searcher", "metastore",
"metastore-read-replica", "metastore_read_replica",
"janitor", "compactor",
];
fn is_valid_service(s: &str) -> bool {
SUPPORTED_SERVICES.contains(&s)
} Type guard
fn valid_service(s: &str) -> Option<&str> {
SUPPORTED_SERVICES.iter().find(|&&k| k == s).copied()
} Try / catch
match QuickwitService::from_str(service_str) {
Ok(svc) => enable(svc),
Err(e) => eprintln!(
"{} — supported: {}",
e,
QuickwitService::supported_services().iter().join(", ")
),
} Prevention
- Copy service names exactly from the error's supported list; watch hyphens vs underscores.
- Trim whitespace and split on ',' when parsing QW_SERVICE-style lists.
- Add a config test asserting every service name in your deployment config parses.
When it happens
Trigger: Calling `QuickwitService::from_str("foo")` via config parsing where `foo` is not one of the accepted service strings (e.g. `indexer`, `searcher`, `metastore`, `metastore-read-replica`/`metastore_read_replica`, `janitor`, `compactor` depending on version).
Common situations: Typos like `search` instead of `searcher` or stray whitespace; using a renamed service name after an upgrade; setting `QW_SERVICE=search,indexer` with unsupported names.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- the `compactor` service can only be enabled when `enable_sta
- failed to compile VRL script: {formatter}
- stdin can only be used as source through the CLI command `qu
- Quickwit currently supports multiple pipelines only for GCP
- concatenate field has `include_dynamic_fields` set, but inde
AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08).
Data as JSON: /api/errors/2d23a45802fbb719.
Report an issue: GitHub.