quickwit-oss/quickwit · error
no server currently available
Error message
no server currently available
What it means
Emitted by generated code (quickwit-codegen) in the `check_connectivity` method of the gRPC client adapter. The adapter tracks connected server addresses in `connection_addrs_rx`; when that list is empty there is no gRPC server to route requests to, so the adapter refuses calls with this error instead of failing at channel establishment time.
Source
Thrown at quickwit/quickwit-codegen/src/codegen.rs:1252
};
methods.extend(method);
}
(bounds, methods)
}
fn generate_grpc_client_adapter(context: &CodegenContext) -> TokenStream {
let service_name = &context.service_name;
let service_name_string = service_name.to_string();
let grpc_client_package_name = &context.grpc_client_package_name;
let grpc_client_package_name_string = &context.package_name.to_string();
let grpc_client_name = &context.grpc_client_name;
let grpc_client_adapter_name = &context.grpc_client_adapter_name;
let grpc_server_adapter_methods = generate_grpc_client_adapter_methods(context);
let extra_grpc_server_adapter_methods = if context.generate_extra_service_methods {
quote! {
async fn check_connectivity(&self) -> anyhow::Result<()> {
if self.connection_addrs_rx.borrow().is_empty() {
anyhow::bail!("no server currently available")
}
Ok(())
}
fn endpoints(&self) -> Vec<quickwit_common::uri::Uri> {
self.connection_addrs_rx
.borrow()
.iter()
.flat_map(|addr| quickwit_common::uri::Uri::from_str(&format!("grpc://{addr}/{}.{}", #grpc_client_package_name_string, #service_name_string)))
.collect()
}
}
} else {
TokenStream::new()
};
quote! {
#[derive(Debug, Clone)]View on GitHub (pinned to a39730c5cd)
Solutions
- Verify the target Quickwit service is running and its gRPC port is reachable (`grpc_listen_addr`), then wait for the client to observe it.
- Check the node's cluster configuration/seed addresses so the client discovers at least one server; fix peer/advertise settings if peers never join.
- Retry with backoff — transient during startup until `connection_addrs_rx` is populated.
- If the client is constructed manually, ensure the connection watcher/`connection_addrs_rx` is fed with server addresses.
Example fix
// before: calling immediately after client creation, before any server is known
let result = search_service.root_search(...).await; // may fail: no server currently available
// after: wait for at least one server before calling
while client.check_connectivity().await.is_err() {
tokio::time::sleep(Duration::from_millis(250)).await;
}
let result = search_service.root_search(...).await; Defensive patterns
Strategy: retry
Validate before calling
// Check server availability before the request
if client.check_connectivity().await.is_err() {
tokio::time::sleep(Duration::from_millis(500)).await; // wait for discovery
} Try / catch
let mut attempts = 0;
loop {
match client.check_connectivity().await {
Ok(()) => break,
Err(e) if e.to_string().contains("no server currently available") && attempts < 10 => {
attempts += 1;
tokio::time::sleep(Duration::from_millis(500 * attempts)).await;
}
Err(e) => return Err(e),
}
} Prevention
- Verify grpc_listen_addr and peer/seed configuration before startup.
- Use readiness probes that check connectivity before routing traffic to the node.
- Confirm the cluster actually formed (chitchat members) before issuing search/ingest calls.
When it happens
Trigger: Calling `check_connectivity()` or any service method on a generated gRPC client (e.g. GrpcSearchServiceAdapter) when no server address has ever been registered or all registered servers have disconnected (the watcher drained `connection_addrs_rx`).
Common situations: Quickwit started as a searcher-only node with no local gRPC services, the target server process is down or still booting, cluster topology changed and the client's server watch observed all peers leaving, or misconfigured chitchat/gRPC ports.
Understand the failure class
Background: ECONNREFUSED and "connection refused" / "could not connect to server" errors: what they mean and how to fix them — this error's family across 44 libraries.
Related errors
- actor `{}` is disconnected
- observation stream failed
- lambda invocation failed: {}
- position of a Kafka partition should never be EOF
- position of a Kinesis shard should never be EOF
AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08).
Data as JSON: /api/errors/bbed5b6ae1d27b73.
Report an issue: GitHub.