paperclipai/paperclip · error · Error
The Paperclip database is not running or reachable, so the…
Error message
The Paperclip database is not running or reachable, so the pre-update backup cannot be taken. Start the service with `paperclipai service start` and retry, or skip the backup with `paperclipai update --no-backup`.
What it means
Error "The Paperclip database is not running or reachable, so the pre-update backup cannot be taken. Start the service with `paperclipai service start` and retry, or skip the backup with `paperclipai update --no-backup`." thrown in paperclipai/paperclip.
Solutions
- Start the service with `paperclipai service start` and retry, or skip the backup with `paperclipai update --no-backup`.
When it happens
Trigger: Thrown at cli/src/commands/update.ts:61 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18).
Data as JSON: /api/errors/ca7fdd93701f7d70.
Report an issue: GitHub.
Appendix: source
Thrown at cli/src/commands/update.ts:61
if (typeof record.code === "string" && DATABASE_UNREACHABLE_CODES.has(record.code)) return true;
if (typeof record.message === "string" && /\b(?:ECONNREFUSED|EHOSTUNREACH|ENETUNREACH|ETIMEDOUT)\b|connection refused/i.test(record.message)) return true;
if (record.cause !== undefined) pending.push(record.cause);
if (Array.isArray(record.errors)) pending.push(...record.errors);
}
return false;
}
async function runPreUpdateBackup(options: UpdateOptions, backup: () => Promise<void>, hasInstanceData = hasPaperclipInstanceData): Promise<void> {
if (!hasInstanceData()) {
const message = "Skipping the pre-update backup because this Paperclip instance has not been onboarded and has no data to back up.";
if (options.json) console.error(message); else console.log(pc.yellow(message));
return;
}
try {
await backup();
} catch (error) {
if (isDatabaseUnreachableError(error)) {
throw new Error(
"The Paperclip database is not running or reachable, so the pre-update backup cannot be taken. Start the service with `paperclipai service start` and retry, or skip the backup with `paperclipai update --no-backup`.",
{ cause: error },
);
}
throw error;
}
}
async function restartActiveManagedService(expectedVersion: string): Promise<boolean> {
const instanceId = resolvePaperclipInstanceId();
const detection = await detectServiceManager({ instanceId });
if (!detection.supported || !(await detection.manager.status()).active) return false;
await restartManagedService({ instanceId, expectedVersion });
return true;
}
export function detectInstallMode(executablePath = process.argv[1] ?? "", paths = resolveInstallStorePaths()): InstallMode {
const resolved = path.resolve(executablePath || ".");View on GitHub (pinned to 01ad858492)