{"title":"故障排查常见问题","slug":"troubleshooting","category":"faq","summary":"Synapse 常见问题的解决方案 — 认证、网络、数据、部署。","audience":["human","llm"],"tags":["faq","troubleshooting","problems","solutions"],"difficulty":"beginner","updated":"2026-06-27","word_count":406,"read_minutes":2,"lang":"zh","translated":true,"requested_lang":"zh","content_markdown":"\n# 故障排查常见问题\n\nSynapse 常见问题的解决方案。\n\n## 无法登录\n\n### 症状\n\n- `POST /login` 返回 401\n- \"Invalid email or password\"\n\n### 解决方案\n\n1. **确认邮箱正确** — 区分大小写\n2. **检查密码** — 至少 6 个字符\n3. 若无账户请先注册：`POST /register`\n4. （如已配置 SMTP）通过 Web UI 重置密码\n\n## 丢失了 Mind Key\n\n### 症状\n\n- 无法访问记忆\n- Mind Key 已删除或丢失\n\n### 解决方案\n\nMind Key 无法找回。你必须：\n\n1. 登录获取 JWT：`POST /login`\n2. 列出 Mind：`GET /minds`（用 JWT）\n3. 创建新 Mind：`POST /minds`\n4. 保存新的 Mind Key\n5. （可选）删除旧 Mind：`DELETE /minds/:id`\n\n**旧 Mind 中的数据将丢失**，除非你能找到 Mind Key。\n\n## API 调用返回 401\n\n### 症状\n\n- 所有 API 调用返回 401 Unauthorized\n- \"Mind Key fehlt oder ungültig\"\n\n### 解决方案\n\n1. **确认请求头格式**：`Authorization: Bearer mk_...`\n2. **检查 Mind Key 是否以 `mk_` 开头**（不是 `eyJ`，那是 JWT）\n3. **直接测试**：\n   ```bash\n   curl -H \"Authorization: Bearer mk_YOUR_KEY\" \\\n        https://synapse.schaefer.zone/memory/recall\n   ```\n4. **Mind Key 可能已被吊销** — 创建新 Mind\n\n参见 [Authentication](/docs/getting-started/authentication)。\n\n## API 调用返回 404\n\n### 症状\n\n- 404 Not Found\n- \"Route not found\"\n\n### 解决方案\n\n> [!CRITICAL]\n> 不要猜测端点路径。只有 `GET /endpoints` 中列出的路径才存在。\n\n1. **检查有效端点**：`curl https://synapse.schaefer.zone/endpoints`\n2. **逐字符对比 URL** — 区分大小写，无尾斜杠\n3. **检查 HTTP 方法** — `GET /memory` 与 `POST /memory` 是不同的\n\n## API 调用返回 429\n\n### 症状\n\n- 429 Too Many Requests\n- \"Rate limit exceeded\"\n\n### 解决方案\n\n1. **改用头部认证**（无限制）：\n   ```bash\n   # 不要这样做\n   curl \".../memory/recall?key=mk_...\"\n   \n   # 推荐做法\n   curl -H \"Authorization: Bearer mk_...\" .../memory/recall\n   ```\n2. 如果必须用 `?key=`，请等待 `Retry-After` 秒\n\n参见 [限速](/docs/api/rate-limits)。\n\n## 记忆搜索返回零结果\n\n### 症状\n\n- `GET /memory/search?q=...` 返回空\n- 确知有记忆存在\n\n### 解决方案\n\n1. **确认记忆存在**：`GET /memory/recall`\n2. **检查搜索语法** — FTS5 有特定语法\n3. **尝试更简单的查询** — 用 `?q=docker` 而非 `?q=docker+swarm+deployment`\n4. **概念查询用语义搜索**：`GET /memory/semantic-search?q=...`\n\n参见 [FTS5 搜索](/docs/concepts/fts5-search)。\n\n## 记忆未持久化\n\n### 症状\n\n- POST /memory 返回成功\n- GET /memory/recall 看不到它们\n\n### 解决方案\n\n1. **确认使用相同的 Mind Key** — 不同 key = 不同 Mind\n2. **检查响应** — POST 应返回 `{ \"id\": \"mem_...\", \"status\": \"stored\" }`\n3. **改用 GET /memory**（JSON 列表）代替 /memory/recall（文本）\n4. **检查过滤条件** — `?category=` 或 `?tag=` 可能将它们隐藏\n\n## Claude Desktop 中看不到工具\n\n### 症状\n\n- Claude Desktop 显示 0 个工具\n- 没有 🔌 图标\n\n### 解决方案\n\n1. **完全重启 Claude Desktop**（Cmd+Q）\n2. **确认配置文件为有效 JSON**\n3. **检查已安装 Node.js 18+**\n4. **手动运行 MCP**：`npx -y synapse-mcp-api@latest`\n5. **查看日志**：`~/Library/Logs/Claude/mcp.log`\n\n参见 [MCP 故障排查](/docs/mcp/troubleshooting)。\n\n## Synapse 离线\n\n### 症状\n\n- 无法访问 synapse.schaefer.zone\n- curl 超时\n\n### 解决方案\n\n1. **检查你的网络** — 试试其他网站\n2. **检查 Synapse 健康**：`curl https://synapse.schaefer.zone/health`\n3. **等待** — 可能是临时故障或部署中\n4. **查看状态页**（如有）\n\n自托管请检查 Docker 容器状态与数据库连接。\n\n## 数据库错误\n\n### 症状\n\n- 500 Internal Server Error\n- \"Database connection failed\"\n\n### 解决方案\n\n自托管：\n\n1. **检查 PostgreSQL 是否运行**：`docker ps | grep postgres`\n2. **检查环境变量 DATABASE_URL**\n3. **检查迁移**：`npm run migrate:check`\n4. **检查磁盘空间**：`df -h`\n\n托管版本：联系支持。\n\n## Webhook 未触发\n\n### 症状\n\n- 已注册 Webhook 但未收到回调\n- URL 没有 POST 请求到达\n\n### 解决方案\n\n1. **确认 URL 可达**：`curl -X POST your-url -d '{}'`\n2. **检查事件过滤** — `memory.*` 匹配所有记忆事件\n3. **测试 Webhook**：`POST /webhooks/:id/test`\n4. **检查 Webhook 是否启用**：`GET /webhooks/:id`\n5. **验证 SSL** — Synapse 要求 Webhook URL 使用有效 HTTPS\n\n参见 [Webhooks API](/docs/api/webhooks)。\n\n## Cron 任务未运行\n\n### 症状\n\n- 已创建 Cron 任务但不触发\n- `next_run` 不更新\n\n### 解决方案\n\n1. **检查调度语法** — 必须是有效的 5 字段 cron 或整数秒\n2. **确认端点被允许** — 必须是 http(s)，无私有 IP\n3. **检查任务是否启用**：`GET /cron`\n4. **等待下一个计划时间** — cron 不是即时的\n\n参见 [Cron 与调度器](/docs/api/cron)。\n\n## 需要更多帮助？\n\n1. **查看现有文档**：<https://synapse.schaefer.zone/docs>\n2. **搜索文档**：`GET /docs/search?q=your+question`\n3. **提交 issue**：<https://gitlab.com/schaefer-services/synapse/-/issues>\n4. **联系**：参见 `/support` 页面\n\n## 下一步\n\n- [错误与错误处理](/docs/api/errors)\n- [API 常见问题](/docs/faq/api-faq)\n- [MCP 故障排查](/docs/mcp/troubleshooting)\n","content_html":"<h1>故障排查常见问题</h1>\n<p>Synapse 常见问题的解决方案。</p>\n<h2>无法登录</h2>\n<h3>症状</h3>\n<ul>\n<li><code>POST /login</code> 返回 401</li>\n<li>&quot;Invalid email or password&quot;</li>\n</ul>\n<h3>解决方案</h3>\n<ol>\n<li><strong>确认邮箱正确</strong> — 区分大小写</li>\n<li><strong>检查密码</strong> — 至少 6 个字符</li>\n<li>若无账户请先注册：<code>POST /register</code></li>\n<li>（如已配置 SMTP）通过 Web UI 重置密码</li>\n</ol>\n<h2>丢失了 Mind Key</h2>\n<h3>症状</h3>\n<ul>\n<li>无法访问记忆</li>\n<li>Mind Key 已删除或丢失</li>\n</ul>\n<h3>解决方案</h3>\n<p>Mind Key 无法找回。你必须：</p>\n<ol>\n<li>登录获取 JWT：<code>POST /login</code></li>\n<li>列出 Mind：<code>GET /minds</code>（用 JWT）</li>\n<li>创建新 Mind：<code>POST /minds</code></li>\n<li>保存新的 Mind Key</li>\n<li>（可选）删除旧 Mind：<code>DELETE /minds/:id</code></li>\n</ol>\n<p><strong>旧 Mind 中的数据将丢失</strong>，除非你能找到 Mind Key。</p>\n<h2>API 调用返回 401</h2>\n<h3>症状</h3>\n<ul>\n<li>所有 API 调用返回 401 Unauthorized</li>\n<li>&quot;Mind Key fehlt oder ungültig&quot;</li>\n</ul>\n<h3>解决方案</h3>\n<ol>\n<li><strong>确认请求头格式</strong>：<code>Authorization: Bearer mk_...</code></li>\n<li><strong>检查 Mind Key 是否以 <code>mk_</code> 开头</strong>（不是 <code>eyJ</code>，那是 JWT）</li>\n<li><strong>直接测试</strong>：<pre><code class=\"hljs language-bash\">curl -H <span class=\"hljs-string\">&quot;Authorization: Bearer mk_YOUR_KEY&quot;</span> \\\n     https://synapse.schaefer.zone/memory/recall</code></pre></li>\n<li><strong>Mind Key 可能已被吊销</strong> — 创建新 Mind</li>\n</ol>\n<p>参见 <a href=\"/docs/getting-started/authentication\">Authentication</a>。</p>\n<h2>API 调用返回 404</h2>\n<h3>症状</h3>\n<ul>\n<li>404 Not Found</li>\n<li>&quot;Route not found&quot;</li>\n</ul>\n<h3>解决方案</h3>\n<div class=\"callout callout-critical\">不要猜测端点路径。只有 `GET /endpoints` 中列出的路径才存在。</div><ol>\n<li><strong>检查有效端点</strong>：<code>curl https://synapse.schaefer.zone/endpoints</code></li>\n<li><strong>逐字符对比 URL</strong> — 区分大小写，无尾斜杠</li>\n<li><strong>检查 HTTP 方法</strong> — <code>GET /memory</code> 与 <code>POST /memory</code> 是不同的</li>\n</ol>\n<h2>API 调用返回 429</h2>\n<h3>症状</h3>\n<ul>\n<li>429 Too Many Requests</li>\n<li>&quot;Rate limit exceeded&quot;</li>\n</ul>\n<h3>解决方案</h3>\n<ol>\n<li><strong>改用头部认证</strong>（无限制）：<pre><code class=\"hljs language-bash\"><span class=\"hljs-comment\"># 不要这样做</span>\ncurl <span class=\"hljs-string\">&quot;.../memory/recall?key=mk_...&quot;</span>\n\n<span class=\"hljs-comment\"># 推荐做法</span>\ncurl -H <span class=\"hljs-string\">&quot;Authorization: Bearer mk_...&quot;</span> .../memory/recall</code></pre></li>\n<li>如果必须用 <code>?key=</code>，请等待 <code>Retry-After</code> 秒</li>\n</ol>\n<p>参见 <a href=\"/docs/api/rate-limits\">限速</a>。</p>\n<h2>记忆搜索返回零结果</h2>\n<h3>症状</h3>\n<ul>\n<li><code>GET /memory/search?q=...</code> 返回空</li>\n<li>确知有记忆存在</li>\n</ul>\n<h3>解决方案</h3>\n<ol>\n<li><strong>确认记忆存在</strong>：<code>GET /memory/recall</code></li>\n<li><strong>检查搜索语法</strong> — FTS5 有特定语法</li>\n<li><strong>尝试更简单的查询</strong> — 用 <code>?q=docker</code> 而非 <code>?q=docker+swarm+deployment</code></li>\n<li><strong>概念查询用语义搜索</strong>：<code>GET /memory/semantic-search?q=...</code></li>\n</ol>\n<p>参见 <a href=\"/docs/concepts/fts5-search\">FTS5 搜索</a>。</p>\n<h2>记忆未持久化</h2>\n<h3>症状</h3>\n<ul>\n<li>POST /memory 返回成功</li>\n<li>GET /memory/recall 看不到它们</li>\n</ul>\n<h3>解决方案</h3>\n<ol>\n<li><strong>确认使用相同的 Mind Key</strong> — 不同 key = 不同 Mind</li>\n<li><strong>检查响应</strong> — POST 应返回 <code>{ &quot;id&quot;: &quot;mem_...&quot;, &quot;status&quot;: &quot;stored&quot; }</code></li>\n<li><strong>改用 GET /memory</strong>（JSON 列表）代替 /memory/recall（文本）</li>\n<li><strong>检查过滤条件</strong> — <code>?category=</code> 或 <code>?tag=</code> 可能将它们隐藏</li>\n</ol>\n<h2>Claude Desktop 中看不到工具</h2>\n<h3>症状</h3>\n<ul>\n<li>Claude Desktop 显示 0 个工具</li>\n<li>没有 🔌 图标</li>\n</ul>\n<h3>解决方案</h3>\n<ol>\n<li><strong>完全重启 Claude Desktop</strong>（Cmd+Q）</li>\n<li><strong>确认配置文件为有效 JSON</strong></li>\n<li><strong>检查已安装 Node.js 18+</strong></li>\n<li><strong>手动运行 MCP</strong>：<code>npx -y synapse-mcp-api@latest</code></li>\n<li><strong>查看日志</strong>：<code>~/Library/Logs/Claude/mcp.log</code></li>\n</ol>\n<p>参见 <a href=\"/docs/mcp/troubleshooting\">MCP 故障排查</a>。</p>\n<h2>Synapse 离线</h2>\n<h3>症状</h3>\n<ul>\n<li>无法访问 synapse.schaefer.zone</li>\n<li>curl 超时</li>\n</ul>\n<h3>解决方案</h3>\n<ol>\n<li><strong>检查你的网络</strong> — 试试其他网站</li>\n<li><strong>检查 Synapse 健康</strong>：<code>curl https://synapse.schaefer.zone/health</code></li>\n<li><strong>等待</strong> — 可能是临时故障或部署中</li>\n<li><strong>查看状态页</strong>（如有）</li>\n</ol>\n<p>自托管请检查 Docker 容器状态与数据库连接。</p>\n<h2>数据库错误</h2>\n<h3>症状</h3>\n<ul>\n<li>500 Internal Server Error</li>\n<li>&quot;Database connection failed&quot;</li>\n</ul>\n<h3>解决方案</h3>\n<p>自托管：</p>\n<ol>\n<li><strong>检查 PostgreSQL 是否运行</strong>：<code>docker ps | grep postgres</code></li>\n<li><strong>检查环境变量 DATABASE_URL</strong></li>\n<li><strong>检查迁移</strong>：<code>npm run migrate:check</code></li>\n<li><strong>检查磁盘空间</strong>：<code>df -h</code></li>\n</ol>\n<p>托管版本：联系支持。</p>\n<h2>Webhook 未触发</h2>\n<h3>症状</h3>\n<ul>\n<li>已注册 Webhook 但未收到回调</li>\n<li>URL 没有 POST 请求到达</li>\n</ul>\n<h3>解决方案</h3>\n<ol>\n<li><strong>确认 URL 可达</strong>：<code>curl -X POST your-url -d &#39;{}&#39;</code></li>\n<li><strong>检查事件过滤</strong> — <code>memory.*</code> 匹配所有记忆事件</li>\n<li><strong>测试 Webhook</strong>：<code>POST /webhooks/:id/test</code></li>\n<li><strong>检查 Webhook 是否启用</strong>：<code>GET /webhooks/:id</code></li>\n<li><strong>验证 SSL</strong> — Synapse 要求 Webhook URL 使用有效 HTTPS</li>\n</ol>\n<p>参见 <a href=\"/docs/api/webhooks\">Webhooks API</a>。</p>\n<h2>Cron 任务未运行</h2>\n<h3>症状</h3>\n<ul>\n<li>已创建 Cron 任务但不触发</li>\n<li><code>next_run</code> 不更新</li>\n</ul>\n<h3>解决方案</h3>\n<ol>\n<li><strong>检查调度语法</strong> — 必须是有效的 5 字段 cron 或整数秒</li>\n<li><strong>确认端点被允许</strong> — 必须是 http(s)，无私有 IP</li>\n<li><strong>检查任务是否启用</strong>：<code>GET /cron</code></li>\n<li><strong>等待下一个计划时间</strong> — cron 不是即时的</li>\n</ol>\n<p>参见 <a href=\"/docs/api/cron\">Cron 与调度器</a>。</p>\n<h2>需要更多帮助？</h2>\n<ol>\n<li><strong>查看现有文档</strong>：<a href=\"https://synapse.schaefer.zone/docs\">https://synapse.schaefer.zone/docs</a></li>\n<li><strong>搜索文档</strong>：<code>GET /docs/search?q=your+question</code></li>\n<li><strong>提交 issue</strong>：<a href=\"https://gitlab.com/schaefer-services/synapse/-/issues\">https://gitlab.com/schaefer-services/synapse/-/issues</a></li>\n<li><strong>联系</strong>：参见 <code>/support</code> 页面</li>\n</ol>\n<h2>下一步</h2>\n<ul>\n<li><a href=\"/docs/api/errors\">错误与错误处理</a></li>\n<li><a href=\"/docs/faq/api-faq\">API 常见问题</a></li>\n<li><a href=\"/docs/mcp/troubleshooting\">MCP 故障排查</a></li>\n</ul>\n","urls":{"html":"/docs/faq/troubleshooting","text":"/docs/faq/troubleshooting?format=text","json":"/docs/faq/troubleshooting?format=json","llm":"/docs/faq/troubleshooting?format=llm"},"translations_available":["en","zh","hi","es","fr","ar","pt","ru","ja","de","it","ko","nl","pl","tr","sv","vi","th","id","uk"]}