Skip to content
MCPA · Chapter 21 of 21 Appendix C: Error catalog

Appendix C: Error catalog

Every entry really occurred while this course was being built. On the left the message, on the right cause and remedy, after that the day on which it appears. The sections follow the layers from Day 16: from the outside (lab, names, TLS) to the inside (protocol, tool). The form of a message reveals the layer: plain text comes from the gateway or from transport protection, a JSON-RPC error from the protocol, isError from the tool.

Lab and environment

Message Cause and remedy Day
Permission denied (publickey) Put the public key into the VM’s ~/.ssh/authorized_keys via the virtualization console 0
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED VM reinstalled → verify, then ssh-keygen -R <address> 0
Temporary failure in name resolution for worker1, cp1 Line in /etc/hosts is missing 0, 14
uv: command not found source $HOME/.local/bin/env or log in again 0
uv missing only with ssh host befehl Non-interactive shell does not read .bashrc → ssh host 'bash -lc "…"' 0
ModuleNotFoundError: No module named 'pydantic' Server started with system Python → uv run python … 3
ModuleNotFoundError: No module named 'httpx' uv add httpx in the project 4
ModuleNotFoundError: No module named 'opentelemetry.sdk' OpenTelemetry packages missing on this machine 14
ModuleNotFoundError: No module named 'mcp.server.fastmcp' old server started with SDK 2 → uv run --no-project --with mcp==1.30.0 15
cannot import name 'streamablehttp_client' … Did you mean 'streamable_http_client'? same, old client under SDK 2 15
[Errno 98] address already in use old server still running → Ctrl+C, or run ss -ltnp and find the line with the port in the list (the Process column shows the PID) 8, 15
pkill -f <name> kills your own SSH session The pattern also matches the shell’s command line → find the PID with ss -ltnp 8
EOFError: EOF when reading a line Host or script wants an answer, stdin is redirected → start in the terminal or prepend echo j \| 5, 7, 10, 11, 12
httpx.ConnectError Ollama or a server on worker1 is not running → systemctl status ollama, terminal on worker1 4, 10, 11
Error: pull model manifest: … connection refused Ollama service is not running → journalctl -u ollama -n 30 0
Model answers with text instead of tool_calls Small models are inconsistent → ask again; ollama show must list tools 0, 4
qwen3:4b needs 90 seconds per answer The model ignores think: false → qwen3:4b-instruct 0

stdio

Message Cause and remedy Day
ValidationError … Invalid JSON: expected value at line 1 column 1 print() writes to stdout → print(…, file=sys.stderr) 1, 16
Only some of the responses arrive Server exited before it could respond → longer pause after cat 1, 2, 3
-32600 … this connection serves the handshake protocol era First message without _meta → server speaks the old style for this connection 2
parse error from jq on .jsonl Typo in one line → jq -c . datei.jsonl names line and column 1, 2
MCPError: Connection closed with FileNotFoundError above it Server aborts at startup, here SKILL.md is missing 15
FileNotFoundError for ../tag03/leitstand.py Host started from the wrong directory; paths are relative 4
Server starts by hand, but not in the host relative path or different --with in the host configuration → absolute paths 15, 16
No server object found … Use a standard variable name mcp run datei.py:objekt with the real name 15
Claude app not found ~/.config/Claude is missing 15

Streamable HTTP and transport protection

Message Cause and remedy Day
curl: (7) Failed to connect Server not running or listening only on 127.0.0.1 → host="0.0.0.0" 8, 9, 12
Bad Request: Missing session ID MCP-Protocol-Version missing → SDK takes the old path with sessions 8, 16
Session not found behind several replicas Old client with a session lands in the wrong pod → update the client or use sticky sessions 16
-32020 … header does not match Mcp-Method/Mcp-Name missing, duplicated or contradicting the body; also version header ≠ _meta 8, 16
HTTP 406 without a body Accept without application/json or text/event-stream 8, 9
Invalid Host header (421) Name not in allowed_hosts/ERLAUBTE_HOSTS → add names with port 8, 9, 14, 16
403 with plain text Forbidden, no JSON foreign Origin (server) or blocking rule in the gateway 8, 14, 16
HTTP 405 GET on the endpoint – the stream no longer exists 8, 16
HTTP 404 with -32601 Method unknown (ping, resources/subscribe) 2, 9, 16
HTTP 404 without JSON-RPC wrong path (/mpc) or no route in the gateway 14, 16
Nothing appears after subscriptions/listen curl without -N buffers the output 9
No events despite a change Not subscribed, or nothing has changed 9
KeyError: 'result' in the client Tool failed with isError, or error instead of result 9, 10

TLS, gateway and Kubernetes

Message Cause and remedy Day
CERTIFICATE_VERIFY_FAILED … self-signed certificate / TRAEFIK DEFAULT CERT No certificate matches the name: secretName missing, secret in the wrong namespace, or wrong name in the certificate 15, 16
CERTIFICATE_VERIFY_FAILED … unable to get local issuer certificate Lab CA not in the store that Python reads; SSL_CERT_FILE points to a different bundle 15
curl: (60) SSL certificate problem Lab CA missing in /usr/local/share/ca-certificates/ → update-ca-certificates 16
Gateway does not block a tool Client sends Mcp-Name as =?base64?…?= → the rule must decode or block it 14
Everything blocked after changing the rule Backslashes in the pattern missing or doubled 14, 16
middleware … not found Middleware and IngressRoute in different namespaces 14
429 Too Many Requests Rate limiter (5/s, burst 10) → slow down, respect Retry-After 14, 16
413 even for small requests maxRequestBodyBytes too small; SDK client falls back to initialize on a discover error 14, 16
502 Bad Gateway right after a rollout Traefik does not know the new pods yet → wait briefly 15, 16
Pods 0/1 Running, then OOMKilled Package installation at startup needs memory → limit 512Mi 14
Agent missing in kubectl get nodes Wrong token (401 in the journal) or cp1 not resolvable 14
permission denied with kubectl KUBECONFIG not set → source ~/.bashrc 14

Protocol

Message Cause and remedy Day
-32602 on every request _meta with version and capabilities missing 2, 16
-32022 with supported Version not supported → pick one from supported 2, 16
-32021 with requiredCapabilities Client did not announce the capability, for example "elicitation":{"form":{}} 10
Invalid or expired requestState (-32602) Seal older than 10 minutes or server restarted → repeat round 1 10
Unknown resource: log://… for an existing file The SDK’s path check rejects / in the parameter 6
-32603 Internal server error on prompts/get Required argument missing (specification: -32602) 7
Unknown tool returns isError instead of -32602 Behavior of SDK 2.3.0; the specification requires -32602 1, 16

Tools and host

Message Cause and remedy Day
Error executing tool … without explanation Exception that is not a ToolError → cause in server.log, report expected errors as ToolError 5
dienst reports “inactive” for typos systemctl show does not know unknown units → also check LoadState 3
List shorter than expected Server runs as a normal user and skips what it may not read 3
PermissionError in the log, client sees only a generic error File belongs to root → ResourceError with an understandable message 6
Entry created twice Model calls a non-idempotent tool twice → consent, idempotency 5
WARNUNG: … hat sich seit der Freigabe verändert … gesperrt Fingerprint check triggers (rug-pull protection) → review the change, delete the entry in freigaben.json 11, 12
Model follows a command in the file name indirect prompt injection – not a lab bug; consent in the host is the protection 11
Audit log shows ok instead of fehler In the middleware the result is a dict → check isError, not CallToolResult 14
Two traces instead of one Client without TracerProvider → no traceparent in _meta 14
404 from /api/services (Jaeger) Jaeger 2 uses /api/v3/… 14
Apps response always text mimeTypes missing → exactly text/html;profile=mcp-app 15
MCP Apps URIs must use the ui:// scheme Resource does not start with ui:// 15
ABGELEHNT for an unchanged skill Editor changed line endings, every byte counts → approve again 15

Authorization

Message Cause and remedy Day
invalid_target Audience mapper missing, resource_url spelled differently, or Keycloak without --features resource-indicators 12
Audience doesn't match in the server RESSOURCE with a trailing slash or localhost instead of the host name – character for character like aud 12
Audience doesn't match after refresh SDK requests offline_access, Keycloak 26.8 then ignores resource → grant_types=["authorization_code"] 12
Code not valid Code older than 60 seconds or copied incompletely → reload the sign-in 12
PKCE verification failed: Code mismatch Verifier does not match the challenge → start over 12
Missing parameter: code_challenge_method Sign-in URL without a challenge, client requires PKCE 12
Token still valid at the server after code replay Keycloak revokes, the JWT stays valid until exp → short lifetimes or introspection 12
kcadm.sh: HTTP 401 Unauthorized kcadm.sh login expired 12
200 instead of 403 in the scope test old token with mcp:write → fetch a new one 13
Policy 'Trusted Hosts' rejected request DCR from a non-allowed address → add the IP (DCR is deprecated) 13
Invalid Client ID: domain not allowed Domain missing in cimd-allow-permitted-domains or client ID ≠ URL of the document 13
client_id_metadata_document_supported is null Keycloak without --features cimd 13
invalid_scope for a CIMD client scope missing in the document; Keycloak caches the old version → delete the client 13
Client is not within the token audience Token exchange: the exchanging client is not in the old token’s aud 13
Invalid client credentials Client secret wrong or empty 13

Catalog (registry)

Message Cause and remedy Day
invalid remote URL remotes require HTTPS, even with MCP_REGISTRY_ALLOW_PRIVATE_REMOTE_URLS=true 15
401 … token is expired Token from mcp-publisher is valid for 5 minutes → log in again 15, 16
Validating against https://registry.modelcontextprotocol.io not logged in → validate goes to the public registry 15
404 for a server name / not encoded as %2F, or wrong upper/lower case 15
Empty search search searches only in the name 15
Wrong version published Versions are immutable → set to deleted, publish a new version 16

Contents

More