quickwit-oss/quickwit · critical
failed to create {index_name} index: {error}
Error message
failed to create {index_name} index: {error} What it means
During startup, serve_quickwit creates the default index(es) (e.g. the ingest API's _ingest index) through the IndexManager. Creation is tolerated when the metastore reports the index already exists, but any other IndexServiceError (metastore down, storage backend error, invalid index config template) is wrapped as 'failed to create {index_name} index: {error}' and aborts the server startup.
Source
Thrown at quickwit/quickwit-serve/src/lib.rs:713
&& node_config.indexer_config.enable_otlp_endpoint
{
{
let otel_logs_index_config =
OtlpGrpcLogsService::index_config(&node_config.default_index_root_uri)
.context("failed to load OTEL logs index config")?;
let otel_traces_index_config =
OtlpGrpcTracesService::index_config(&node_config.default_index_root_uri)
.context("failed to load OTEL traces index config")?;
for (index_name, index_config) in [
("OTEL logs", otel_logs_index_config),
("OTEL traces", otel_traces_index_config),
] {
match index_manager.create_index(index_config, false).await {
Ok(_)
| Err(IndexServiceError::Metastore(MetastoreError::AlreadyExists(
EntityKind::Index { .. },
))) => {}
Err(error) => bail!("failed to create {index_name} index: {error}",),
};
}
}
}
let search_split_cache_opt: Option<Arc<SearchSplitCache>> =
if let Some(split_cache_limits) = node_config.searcher_config.split_cache {
let search_split_cache = SearchSplitCache::with_root_path(
node_config.data_dir_path.join("searcher-split-cache"),
storage_resolver.clone(),
split_cache_limits,
)
.context("failed to load searcher split cache")?;
Some(search_split_cache)
} else {
None
};
View on GitHub (pinned to a39730c5cd)
Solutions
- Read the inner {error} in the message to identify the root cause (metastore vs storage) and fix that dependency.
- Verify metastore connectivity: postgres_uri reachable, credentials valid, schema migrations applied (quickwit metastore tools).
- Verify the object-storage backend is reachable and credentials (AWS/Azure/GCS env vars or config) are present.
- If the index exists but with a conflicting state, inspect it via the metastore/API and resolve the conflict, then restart.
- Restart the node once the metastore/storage is healthy.
Example fix
// before QUICKWIT_METASTORE_URI=postgres://wrong:pass@db:5432/qw // after QUICKWIT_METASTORE_URI=postgres://quickwit:correct@db:5432/qw
Defensive patterns
Strategy: try-catch
Validate before calling
// Before starting quickwit, verify metastore and storage reachability
await new Promise((resolve, reject) => {
const net = require('net');
const s = net.connect(5432, dbHost, () => { s.end(); resolve(); });
s.on('error', () => reject(new Error('Metastore unreachable at startup')));
}); Try / catch
// Startup is aborted by this error; wrap the process launch and surface the inner error
try {
await runQuickwitServe();
} catch (e) {
const m = e.message.match(/failed to create (\S+) index: (.+)/s);
if (m) {
console.error(`Index ${m[1]} creation failed; root cause: ${m[2]}. Check metastore/storage availability and credentials.`);
}
throw e;
} Prevention
- Pre-flight check metastore (Postgres) connectivity and credentials before each deploy/restart.
- Ensure storage credentials (AWS/Azure/GCS) are present in the environment of the quickwit process.
- Apply metastore migrations as part of deployment before nodes start.
- Treat the inner error text as the actionable signal; route it to your logging/observability stack.
When it happens
Trigger: serve_quickwit (invoked by the `quickwit run` CLI execute() or spawn_node) attempting create_index on the metastore and receiving an error other than AlreadyExists: metastore unreachable (Postgres down), underlying storage failures, or a bad index config used for the default index.
Common situations: PostgreSQL metastore credentials/host wrong or DB unreachable; S3/object-store credentials missing at boot; metastore migration not applied; transient metastore outage during node restart; storage bucket permissions denied.
Understand the failure class
Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.
Related errors
- `metastore_read_replica_uri` must be set when the `metastore
- unknown URI protocol `{protocol}`
- failed to render config file template: environment variable
- GCP PubSub subscription `{subscription_name}` does not exist
- topic `{}` does not exist
AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08).
Data as JSON: /api/errors/b80ee7996b685d37.
Report an issue: GitHub.