quickwit-oss/quickwit · error · anyhow::Error

data dir ` ` does not exist

Error message

data dir `{}` does not exist

What it means

While loading and validating a NodeConfig, the configured data directory path does not exist on the local filesystem. Quickwit requires the data dir to already be present (it stores indexes, caches, and metastore data there), so startup validation fails.

Solutions

  1. Create the directory, e.g. `mkdir -p /path/to/data`
  2. Fix a typo in the configured `data_dir` path
  3. Ensure the process has permission and the volume is mounted at that path
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at quickwit/quickwit-config/src/node_config/mod.rs:976 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08). Data as JSON: /api/errors/50ef7f1de3b5f8fe. Report an issue: GitHub.

Appendix: source

Thrown at quickwit/quickwit-config/src/node_config/mod.rs:976

    pub async fn load(config_format: ConfigFormat, config_content: &[u8]) -> anyhow::Result<Self> {
        Self::load_with_enabled_services(config_format, config_content, None).await
    }

    /// Parses and validates a [`NodeConfig`] after overriding its enabled services.
    ///
    /// The override takes precedence over both the config file and `QW_ENABLED_SERVICES` and is
    /// applied before service-dependent validation.
    pub async fn load_with_enabled_services(
        config_format: ConfigFormat,
        config_content: &[u8],
        enabled_services: Option<&HashSet<QuickwitService>>,
    ) -> anyhow::Result<Self> {
        let env_vars = env::vars().collect::<HashMap<_, _>>();
        let config =
            load_node_config_with_env(config_format, config_content, &env_vars, enabled_services)
                .await?;
        if !config.data_dir_path.try_exists()? {
            bail!(
                "data dir `{}` does not exist",
                config.data_dir_path.display()
            );
        }
        Ok(config)
    }

    /// Returns the list of peer seed addresses. The addresses MUST NOT be resolved. Otherwise, the
    /// DNS-based discovery mechanism implemented in Chitchat will not work correctly.
    pub async fn peer_seed_addrs(&self) -> anyhow::Result<Vec<String>> {
        let mut peer_seed_addrs = Vec::new();
        let default_gossip_port = self.gossip_listen_addr.port();

        // We want to pass non-resolved addresses to Chitchat but still want to resolve them for
        // validation purposes. Additionally, we need to append a default port if necessary and
        // finally return the addresses as strings, which is tricky for IPv6. We let the logic baked
        // in `HostAddr` handle this complexity.
        let mut found_something = false;

View on GitHub (pinned to a39730c5cd)