tinyhumansai/openhuman · error · Error
core not reachable at ${RPC_URL} — start it with `cargo run
Error message
core not reachable at ${RPC_URL} — start it with `cargo run --bin openhuman -- serve`. (${err.message}) What it means
main() sanity-checks connectivity with a single openhuman.health_snapshot RPC before doing any work; when that first call fails for any reason (ECONNREFUSED, HTTP error like 287, or a JSON-RPC error like 288), the script rethrows wrapped with this hint naming the startup command.
Source
Thrown at scripts/test-memory-email-ingest.mjs:112
threads.get(tid).push(m);
}
return [...threads.entries()].map(([threadId, msgs]) => {
msgs.sort((a, b) => parseEmailDate(a.date) - parseEmailDate(b.date));
return {
threadId,
subject: msgs[0]?.subject || "(no subject)",
messages: msgs.map(toEmailMessage),
};
});
}
async function main() {
console.log(`[memory-email-ingest] fixture=${FIXTURE}`);
console.log(`[memory-email-ingest] rpc_url=${RPC_URL}`);
// Sanity-check that the core is up.
await rpc("openhuman.health_snapshot", {}).catch((err) => {
throw new Error(
`core not reachable at ${RPC_URL} — start it with \`cargo run --bin openhuman -- serve\`. (${err.message})`,
);
});
const raw = await readFile(FIXTURE, "utf8");
const inbox = JSON.parse(raw);
const messages = Array.isArray(inbox.messages) ? inbox.messages : [];
if (messages.length === 0) {
console.error("[memory-email-ingest] no messages in fixture, nothing to do");
process.exit(1);
}
console.log(`[memory-email-ingest] loaded ${messages.length} email(s)`);
const threads = groupByThread(messages);
console.log(`[memory-email-ingest] grouped into ${threads.length} thread(s)`);
let chunksWritten = 0;
let chunksDropped = 0;View on GitHub (pinned to a221052e0d)
Solutions
- Start the core: cargo run --bin openhuman -- serve (release tree: ./target/debug/openhuman-core serve) and wait for its listening log
- Verify liveness on the same base: curl http://127.0.0.1:7810/health
- Align RPC_URL with the port the core actually logged; the token for a standalone core lives in {workspace}/core.token
Example fix
# before node scripts/test-memory-email-ingest.mjs # core not reachable at http://127.0.0.1:7810/rpc # after cargo run --bin openhuman -- serve & # wait for the listening line RPC_URL='http://127.0.0.1:7810/rpc' node scripts/test-memory-email-ingest.mjs
Defensive patterns
Strategy: validation
Validate before calling
async function waitForCore(url, tries = 30) {
for (let i = 0; i < tries; i++) {
try { const r = await fetch(url.replace(/\/rpc$/, '/health')); if (r.ok) return; } catch {}
await new Promise((r) => setTimeout(r, 1000));
}
throw new Error(`core never became healthy at ${url}`);
} Prevention
- start the core before the ingest script; gate on /health
- keep RPC_URL and token in one sourced env file
- treat any health_snapshot failure as environment, not fixture, trouble first
When it happens
Trigger: No core listening on RPC_URL (default http://127.0.0.1:7810/rpc); core on a different port; core up but health_snapshot itself erroring (JSON-RPC failure still lands here via err.message).
Common situations: Forgot to run `cargo run --bin openhuman -- serve` in a separate terminal; core crashed between two script runs; stale RPC_URL exported from an earlier session pointing at a dead port.
Related errors
- ${method}: HTTP ${res.status} ${await res.text()}
- ${method}: ${body.error.message || JSON.stringify(body.error
- RPC envelope contains undefined data
- Socket not connected — no client ID for event routing
- [transport:manager] all transports failed to connect
AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16).
Data as JSON: /api/errors/2c8b537d34086d81.
Report an issue: GitHub.