milvus-io/milvus · error
Server error
Error message
Server error
What it means
Thrown by the Milvus WebUI telemetry login flow in telemetry.html. After POSTing credentials to GET /_telemetry/clients with the computed Basic auth token, any non-2xx response other than 401 (which is handled separately as a bad-credential message) raises this generic 'Server error'. It means the HTTP request reached a server that refused it for a reason other than authentication: typically 500 (telemetry handler panic or embedded etcd/proxy not ready), 403, or a proxy/gateway in front returning 502/503.
Source
Thrown at internal/http/webui/telemetry.html:1549
// Create Basic Auth token
authToken = 'Basic ' + btoa(username + ':' + password);
// Test auth by making a request
try {
const resp = await fetch(`${API_BASE}/_telemetry/clients`, {
headers: { 'Authorization': authToken }
});
if (resp.status === 401) {
errorDiv.textContent = 'Invalid username or password';
errorDiv.style.display = 'block';
authToken = '';
return;
}
if (!resp.ok) {
throw new Error('Server error');
}
// Save auth
sessionStorage.setItem('milvusAuth', authToken);
sessionStorage.setItem('milvusUser', username);
showApp(username);
} catch (error) {
errorDiv.textContent = 'Connection error: ' + error.message;
errorDiv.style.display = 'block';
authToken = '';
}
}
function showApp(username) {
document.getElementById('loginPage').style.display = 'none';
document.getElementById('appContainer').style.display = 'block';
document.getElementById('currentUser').textContent = username;
loadData();View on GitHub (pinned to b43a76673a)
Solutions
- Open the same URL /_telemetry/clients with curl -u user:pass -i and read the actual status code and body, which the UI discards.
- If 500: check the Milvus proxy logs for a panic or stack trace around the telemetry handler and restart the component if it crashed.
- If 403/401-loop: verify web auth settings (common.security.authorizationEnabled, proxy auth) and that the WebUI is served by the same Milvus instance you are authenticating against.
- If behind a proxy: ensure /_telemetry/* is passed through to Milvus unchanged, including the Authorization header.
- Retry after Milvus is fully healthy (healthz/metrics endpoints respond).
Example fix
// before
if (!resp.ok) {
throw new Error('Server error');
}
// after - surface the real status/body so the cause is diagnosable
if (!resp.ok) {
const body = await resp.text().catch(() => '');
throw new Error(`Server error: HTTP ${resp.status} ${body.slice(0, 200)}`);
} Defensive patterns
Strategy: try-catch
Try / catch
try {
const resp = await fetch(`${API_BASE}/_telemetry/clients`, { headers: { 'Authorization': authToken } });
if (resp.status === 401) { /* bad credentials */ }
if (!resp.ok) {
const body = await resp.text().catch(() => '');
throw new Error(`Server error: HTTP ${resp.status} ${body.slice(0, 200)}`);
}
} catch (e) {
// distinguish network failure (TypeError) from HTTP failure
showError(e instanceof TypeError ? 'Cannot reach Milvus WebUI endpoint' : e.message);
} Prevention
- Confirm Milvus is fully healthy (curl the metrics endpoint) before logging into the telemetry UI.
- Keep the WebUI on the same origin as the Milvus instance or proxy /_telemetry/* with the Authorization header intact.
- Include the HTTP status and truncated body in every thrown message instead of a generic string.
When it happens
Trigger: Calling the WebUI login when the Milvus proxy is up but the telemetry HTTP server has an internal error (500), when the auth config (webui auth username/password or proxy.authEnabled) is inconsistent so the server returns 403, or when a reverse proxy returns 502/503 while Milvus is starting. Any resp.status not in 2xx and not 401 hits this branch.
Common situations: Milvus still starting up (proxy listens before the telemetry handler is fully wired); mismatch between the credentials expected by the server and those typed in; a load balancer / ingress intercepting /_telemetry/* routes; telemetry disabled via config so the handler errors.
Related errors
- HTTP error: ${resp.status}
- Failed to delete command
- Failed to request errors
- HTTP ${response.status}
- Failed to push config
AI-assisted analysis of milvus-io/milvus@b43a76673a (2026-08-15).
Data as JSON: /api/errors/b7917be99781c629.
Report an issue: GitHub.