Files
Memoh/assets/troubleshooting.md.DGskTOuw.js
T
2026-02-18 16:21:10 +00:00

2 lines
12 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{_ as a,o as i,c as e,ag as t}from"./chunks/framework.DEqXEGcv.js";const k=JSON.parse('{"title":"Troubleshooting","description":"","frontmatter":{},"headers":[],"relativePath":"troubleshooting.md","filePath":"troubleshooting.md","lastUpdated":1771431627000}'),n={name:"troubleshooting.md"};function o(l,s,h,r,p,d){return i(),e("div",null,[...s[0]||(s[0]=[t('<h1 id="troubleshooting" tabindex="-1">Troubleshooting <a class="header-anchor" href="#troubleshooting" aria-label="Permalink to &quot;Troubleshooting&quot;"></a></h1><h2 id="mcp-container-no-running-task-found-task-mcp-xxx-not-found" tabindex="-1">MCP Container: <code>no running task found: task mcp-xxx not found</code> <a class="header-anchor" href="#mcp-container-no-running-task-found-task-mcp-xxx-not-found" aria-label="Permalink to &quot;MCP Container: `no running task found: task mcp-xxx not found`&quot;"></a></h2><h3 id="symptom" tabindex="-1">Symptom <a class="header-anchor" href="#symptom" aria-label="Permalink to &quot;Symptom&quot;"></a></h3><p>When a bot tries to use container tools (e.g., execute commands), the server logs show:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>level=WARN msg=&quot;exec failed&quot; provider=container_tool bot_id=xxx command=date error=&quot;no running task found: task mcp-xxx not found&quot;</span></span></code></pre></div><p>The containerd container logs may also show:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>level=error msg=&quot;failed to delete task&quot; error=&quot;rpc error: code = NotFound desc = container not created: not found&quot;</span></span></code></pre></div><h3 id="cause" tabindex="-1">Cause <a class="header-anchor" href="#cause" aria-label="Permalink to &quot;Cause&quot;"></a></h3><p>The <code>[mcp] data_root</code> in <code>config.toml</code> is set to a <strong>host machine path</strong> (e.g., <code>/Users/you/Code/Memoh/data</code>), but the server and containerd containers use a Docker named volume mounted at <code>/opt/memoh/data</code>.</p><p>When the server creates an MCP container inside containerd, it uses <code>data_root</code> as the mount source. Since this host path does not exist inside the containerd container, <code>runc</code> fails with:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>failed to fulfil mount request: open /Users/you/Code/Memoh/data/bots/xxx: no such file or directory</span></span></code></pre></div><h3 id="solution" tabindex="-1">Solution <a class="header-anchor" href="#solution" aria-label="Permalink to &quot;Solution&quot;"></a></h3><ol><li>Set <code>data_root</code> to the in-container path in your config:</li></ol><div class="language-toml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">toml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">mcp</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">data_root = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;/opt/memoh/data&quot;</span></span></code></pre></div><ol start="2"><li>Clean up the stale containerd container (if it exists):</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> exec</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> memoh-containerd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ctr</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> default</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> containers</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> rm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> mcp-</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">bot-i</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">d</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span></span></code></pre></div><ol start="3"><li>Restart the server:</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> compose</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> restart</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> server</span></span></code></pre></div><blockquote><p><strong>Note</strong>: If you also run the server locally (outside Docker), keep the Docker config (<code>conf/app.docker.toml</code>) separate from your local <code>config.toml</code>, and update <code>docker-compose.yml</code> to mount the Docker-specific config instead.</p></blockquote><h2 id="mcp-container-image-update-not-taking-effect-after-rebuild" tabindex="-1">MCP Container: Image update not taking effect after rebuild <a class="header-anchor" href="#mcp-container-image-update-not-taking-effect-after-rebuild" aria-label="Permalink to &quot;MCP Container: Image update not taking effect after rebuild&quot;"></a></h2><h3 id="symptom-1" tabindex="-1">Symptom <a class="header-anchor" href="#symptom-1" aria-label="Permalink to &quot;Symptom&quot;"></a></h3><p>After updating <code>Dockerfile.containerd</code> (e.g., adding Node.js/Python to the MCP image), rebuilding and restarting the containerd container, MCP tools still fail with errors like:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>exec: &quot;npx&quot;: executable file not found in $PATH</span></span></code></pre></div><h3 id="cause-1" tabindex="-1">Cause <a class="header-anchor" href="#cause-1" aria-label="Permalink to &quot;Cause&quot;"></a></h3><p>The containerd entrypoint script (<code>containerd-entrypoint.sh</code>) skips image import if the image already exists in containerd&#39;s image store:</p><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">if</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> !</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ctr</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> default</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> images</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> check</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;name==${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">MCP_IMAGE</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}&quot;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">; </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">then</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # import</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">fi</span></span></code></pre></div><p>Since <code>containerd_data</code> is a persistent Docker volume, the old MCP image survives across container restarts. The new image embedded in the rebuilt Docker image is never imported.</p><h3 id="solution-1" tabindex="-1">Solution <a class="header-anchor" href="#solution-1" aria-label="Permalink to &quot;Solution&quot;"></a></h3><ol><li>Remove the old MCP image from containerd:</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> exec</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> memoh-containerd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ctr</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> default</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> images</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> rm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker.io/library/memoh-mcp:latest</span></span></code></pre></div><ol start="2"><li>Restart the containerd container to trigger re-import:</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> compose</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> restart</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> containerd</span></span></code></pre></div><ol start="3"><li>Verify the new image was imported (size should be significantly larger if Node.js/Python were added):</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> exec</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> memoh-containerd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ctr</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> default</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> images</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ls</span></span></code></pre></div><ol start="4"><li>Delete the bot&#39;s MCP container and recreate it from the bot detail page so it uses the new image.</li></ol>',35)])])}const g=a(n,[["render",o]]);export{k as __pageData,g as default};