{"record":{"id":"dbded21b32bf1183","repo":"paperclipai/paperclip","slug":"failed-to-start-runtime-service-servicename","errorCode":null,"errorMessage":"Failed to start runtime service \"${serviceName}\": ${actionableFailure}${serviceOutputExcerpt ? ` | output: ${serviceOutputExcerpt.trim()}` : \"\"}","messagePattern":"Failed to start runtime service \"(.+?)\": (.+?)(.+?)` : \"\"\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/services/workspace-runtime.ts","lineNumber":6177,"sourceCode":"            + `${exposureCollisionDiagnosis ?? \"owner unavailable\"}. `\n            + `Quarantined pair ${exposureCollisionPorts.join(\"/\")} and reallocating.\\n`,\n        ).catch(() => undefined);\n      }\n      throw new RuntimeServicePortBindCollision(port, exposureCollisionDiagnosis, true);\n    }\n    const deploymentBindConflict = /local_trusted requires server\\.bind=loopback/i.test(\n      `${failureMessage}\\n${serviceOutputExcerpt}`,\n    );\n    // The guest reported an assigned-port EADDRINUSE, but no host listener owned\n    // the port. Explain that the runtime did not quarantine the pair, so a future\n    // occurrence needs no diagnostic cycle and the pool stays intact.\n    const unverifiedExposureCollision = exposureTextNamesAssignedPort && !exposureHostCollision;\n    const actionableFailure = deploymentBindConflict\n      ? `${failureMessage} | deployment/bind conflict: local_trusted requires server.bind=loopback; the managed runtime requested an incompatible bind mode`\n      : unverifiedExposureCollision\n        ? `${failureMessage} | exposure port collision not verified: the guest reported EADDRINUSE on assigned port ${exposureNamedPorts.join(\"/\")}, but no host listener owns it (${exposureCollisionDiagnosis ?? \"owner unavailable\"}); the runtime did not quarantine the pair`\n        : failureMessage;\n    throw new Error(\n      `Failed to start runtime service \"${serviceName}\": ${actionableFailure}${serviceOutputExcerpt ? ` | output: ${serviceOutputExcerpt.trim()}` : \"\"}`,\n    );\n  });\n\n  return { record, readiness: readinessPromise };\n}\n\nasync function prepareRuntimeProvisioning(\n  input: StartLocalRuntimeServiceInput,\n): Promise<RuntimeServiceRecord | null> {\n  const runtimeProvisionCommand = asString(input.runtimeProvisionCommand, \"\").trim();\n  if (!runtimeProvisionCommand) return null;\n  const coordinator = input.provisionCoordinator ?? createRuntimeProvisionCoordinator();\n  if (coordinator.promise) {\n    await coordinator.promise;\n    return null;\n  }\n","sourceCodeStart":6159,"sourceCodeEnd":6195,"githubUrl":"https://github.com/paperclipai/paperclip/blob/a7e689b3c35347b529cb9f54c9b9a8575a3dcab6/server/src/services/workspace-runtime.ts#L6159-L6195","documentation":"startLocalRuntimeService failed for serviceName: the raw failure was converted into an actionableFailure message with an output excerpt; this is the generic start-failure throw after diagnosis (bind conflicts throw the more specific collision error).","triggerScenarios":"Thrown at server/src/services/workspace-runtime.ts:6177 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the actionableFailure text and service output excerpt for the root cause","Fix the service command/config it names (missing binary, bad env, config path)","Address any bind/server.bind conflict described in the diagnosis","Retry starting the service after the fix"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a7e689b3c35347b529cb9f54c9b9a8575a3dcab6","analyzedAt":"2026-08-21T17:58:32.592Z","contentChangedAt":"2026-08-21T17:58:32.592Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}