TinkerLab
TOOL 02 // INTERACTIVE TROUBLESHOOTER TREES

Interactive Deployment & Streaming API Troubleshooter

Static HTTP status tables miss runtime failures. Pick a failure scenario below, run the one-line terminal probes, and follow the decision tree to the verified fix.

[KEY VERIFIED TAKEAWAY / TL;DR]Tinker AI Lab’s Interactive Troubleshooter provides 13 directed diagnostic decision trees across all 4 engineering pillars: Docker container-to-host 11434 networking, silent CPU fallback, post-HTTP-200 SSE stream drops, n8n timeouts, HTTP 403 CORS/Proxy errors, DeepSeek-R1 <think> loops, Raspberry Pi 5 power/Hailo-8L/ALSA errors, RAG vector dimension mismatches (1024 vs 768), AMD Strix Halo / Intel Arc B580 / NVIDIA DGX Spark GPU memory traps, and n8n + MCP tool-calling failures. Every leaf node ships with root-cause analysis, copyable fix configs, and a terminal verification command.
Container Cannot Reach Host Local Model (Ollama / vLLM)
Step 1: Check Host Listening Interface

Run the command below on your host machine. Is port 11434 bound to 127.0.0.1 or *:11434 (0.0.0.0)?

Diagnostic Probe Command
lsof -nP -iTCP:11434 -sTCP:LISTEN || ss -tlnp | grep 11434

If it shows 127.0.0.1:11434, requests from Docker bridge networks will be immediately refused.

Select what your environment outputs:
TERMINAL DIAGNOSTIC CHEAT SHEET // 终端一行式快速排障命令速查表

6 Essential One-Line Terminal Probes for Local AI & Containers

Not sure which decision tree to pick first? Run these read-only terminal probes to isolate the exact failure layer in seconds.

LayerOne-Line Diagnostic CommandHealthy BaselineFailure Signal
1. GPU Layer Offloadollama ps100% GPUShows CPU/GPU split → VRAM OOM & Slow Generation
2. Host Socket Bindingss -tlnp | grep 11434 (or lsof -iTCP:11434)*:11434 / 0.0.0.0:11434Only 127.0.0.1:11434 → Docker ECONNREFUSED
3. Browser CORS Checkcurl -i -X OPTIONS http://127.0.0.1:11434/api/tags -H "Origin: chrome-extension://test"HTTP/1.1 204 / 200HTTP 403 Forbidden → 403 CORS & Reverse Proxy
4. Embedding Dimensioncurl -s http://127.0.0.1:11434/api/embeddings -d '{"model":"bge-m3","prompt":"a"}' | jq '.embedding|length'1024 (bge-m3) / 768 (nomic)Mismatch vs DB collection → RAG Empty & Dimension
5. Pi 5 Voltage & Thermalvcgencmd get_throttled && lspcithrottled=0x00x50000 or empty lspci → Pi 5 Power & Hailo NPU
6. Instant VRAM Flushcurl -s http://127.0.0.1:11434/api/generate -d '{"model":"qwen2.5:14b","keep_alive":0}'done_reason: "unload"VRAM still full → Check nvidia-smi for zombie processes
ALL VERIFIED FIXES IN THIS TREE // 本树涵盖的全部根因与修复方案一览

4 Verified Root Causes & Fixes in "Container Cannot Reach Host Local Model (Ollama / vLLM)"

Fix: Bind Host Ollama to 0.0.0.0 (or Docker Bridge IP)

By default, Ollama binds strictly to 127.0.0.1:11434. Traffic arriving from a Docker bridge interface (172.17.0.x) is rejected by the OS TCP stack.

  • On macOS: set OLLAMA_HOST via launchctl and restart the Ollama desktop app.
  • On Linux systemd: add Environment="OLLAMA_HOST=0.0.0.0:11434" via systemctl edit ollama.service.
  • Security check: ensure your host firewall blocks port 11434 on public LAN/WAN interfaces.
Verify: lsof -nP -iTCP:11434 -sTCP:LISTEN

Fix: Replace localhost with host.docker.internal

Inside a container network namespace, localhost/127.0.0.1 refers to the container itself, not the physical host running your model.

  • Update OLLAMA_BASE_URL or your HTTP node URL to http://host.docker.internal:11434.
  • Ensure extra_hosts: ["host.docker.internal:host-gateway"] is present in docker-compose.yml.
Verify: docker exec tinker-open-webui wget -qO- http://host.docker.internal:11434/api/version

Fix: Map host-gateway in Linux Docker Compose

Unlike Docker Desktop on Mac/Windows, native Linux Docker Engine does not inject host.docker.internal into /etc/hosts unless explicitly requested.

  • Add extra_hosts: ["host.docker.internal:host-gateway"] to your service definition in docker-compose.yml.
  • Recreate the container with docker compose up -d --force-recreate.
Verify: docker exec tinker-open-webui getent hosts host.docker.internal

Fix: Allow Docker Bridge Subnet Through Host Firewall (UFW / firewalld)

Linux UFW or iptables drops packets originating from the docker0 / br-* subnet (172.16.0.0/12) destined for host port 11434.

  • Grant access strictly from the private Docker bridge CIDR (172.16.0.0/12) to port 11434.
  • Reload UFW and test from inside the container again.
Verify: docker exec tinker-open-webui wget -qO- --timeout=5 http://host.docker.internal:11434/api/version