{"record":{"id":"0a6b43a45e6fae61","repo":"Mintplex-Labs/anything-llm","slug":"weaviate-invalid-alive-signal-received-is-the-s","errorCode":null,"errorMessage":"Weaviate::Invalid Alive signal received - is the service online?","messagePattern":"Weaviate::Invalid Alive signal received - is the service online\\?","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/utils/vectorDbProviders/weaviate/index.js","lineNumber":35,"sourceCode":"    return \"Weaviate\";\n  }\n\n  async connect() {\n    if (process.env.VECTOR_DB !== \"weaviate\")\n      throw new Error(\"Weaviate::Invalid ENV settings\");\n\n    const weaviateUrl = new URL(process.env.WEAVIATE_ENDPOINT);\n    const options = {\n      scheme: weaviateUrl.protocol?.replace(\":\", \"\") || \"http\",\n      host: weaviateUrl?.host,\n      ...(process.env?.WEAVIATE_API_KEY?.length > 0\n        ? { apiKey: new weaviate.ApiKey(process.env?.WEAVIATE_API_KEY) }\n        : {}),\n    };\n    const client = weaviate.client(options);\n    const isAlive = await await client.misc.liveChecker().do();\n    if (!isAlive)\n      throw new Error(\n        \"Weaviate::Invalid Alive signal received - is the service online?\"\n      );\n    return { client };\n  }\n\n  async heartbeat() {\n    await this.connect();\n    return { heartbeat: Number(new Date()) };\n  }\n\n  async totalVectors() {\n    const { client } = await this.connect();\n    const collectionNames = await this.allNamespaces(client);\n    var totalVectors = 0;\n    for (const name of collectionNames) {\n      totalVectors += await this.namespaceCountWithClient(client, name);\n    }\n    return totalVectors;","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/3aec848f2885144aa8f1e53b9731a04310d5d558/server/utils/vectorDbProviders/weaviate/index.js#L17-L53","documentation":"After constructing the Weaviate client from WEAVIATE_ENDPOINT (and optional WEAVIATE_API_KEY), connect() probes client.misc.liveChecker().do(). If the liveness endpoint does not report the service alive, this error is thrown: the client object built fine, but the Weaviate service itself failed the health probe.","triggerScenarios":"WEAVIATE_ENDPOINT pointing at a stopped or unreachable Weaviate; wrong scheme/host parsed from a malformed URL; Weaviate still booting and not ready; auth required but WEAVIATE_API_KEY missing so the probe is rejected; DNS/network failure between app and service.","commonSituations":"Docker Weaviate container not running or mid-startup; endpoint entered with a path or trailing slash that breaks host parsing; reverse proxy/TLS misconfigured; embedded/Weaviate Cloud instance paused or region URL wrong; firewall blocking egress.","solutions":["Check the service directly: curl $WEAVIATE_ENDPOINT/v1/.well-known/ready — expect HTTP 200","Fix WEAVIATE_ENDPOINT to a bare origin (e.g. http://localhost:8080 or https://host) with no path","If the instance has auth enabled, set WEAVIATE_API_KEY so the liveness call is not rejected with 401","Give Weaviate time to finish startup (or restart it), then retry the operation"],"exampleFix":"# before\nWEAVIATE_ENDPOINT=localhost:8080/v1\n\n# after\nWEAVIATE_ENDPOINT=http://localhost:8080","handlingStrategy":"retry","validationCode":"async function weaviateReady(endpoint, apiKey) {\n  const res = await fetch(`${endpoint}/v1/.well-known/ready`, {\n    headers: apiKey ? { Authorization: `Bearer ${apiKey}` } : {},\n  });\n  return res.ok;\n}\n// gate long operations on this preflight, with backoff, before calling connect()","typeGuard":null,"tryCatchPattern":"for (let attempt = 1; attempt <= 5; attempt++) {\n  try { return await weaviate.connect(); }\n  catch (e) {\n    if (!e.message.includes(\"Alive signal\") || attempt === 5) throw e;\n    await delay(500 * 2 ** attempt); // service may still be booting\n  }\n}","preventionTips":["Run a readiness preflight against /v1/.well-known/ready before heavy embedding jobs","In docker-compose, add a healthcheck + depends_on condition so the app starts after Weaviate is ready","Keep WEAVIATE_ENDPOINT as a bare origin URL and set the API key when auth is enabled"],"tags":["weaviate","vector-db","health-check","connectivity"],"backgroundTag":"service-unreachable","analyzedSha":"3aec848f2885144aa8f1e53b9731a04310d5d558","analyzedAt":"2026-08-18T10:02:21.017Z","contentChangedAt":"2026-08-18T10:02:21.017Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}