| name | we-mp-rss-troubleshooting |
| title | we-mp-rss Docker Troubleshooting |
| description | Diagnose and fix common we-mp-rss Docker container issues: container exited state, Docker Desktop not running, service unresponsive, and cron job failures. |
| version | 1.0.0 |
| author | Hermes Agent |
| tags | ["docker","we-mp-rss","wechat","cron","troubleshooting"] |
we-mp-rss Docker Troubleshooting
Trigger: When wechat-mp-rss-extractor cron fails with "Connection refused", "Cannot reach we-mp-rss", or when the Docker container is in an unexpected state.
Common Failure Patterns
1. Docker Desktop Not Running (most frequent)
Symptoms:
Cannot connect to the Docker daemon at unix:///Users/jinguo/.docker/run/docker.sock
or
Cannot reach we-mp-rss at http://localhost:8001: <urlopen error [Errno 61] Connection refused>
Cause: Docker Desktop was not running when the cron job fired. The we-mp-rss container cannot start without Docker.
Fix:
open -a Docker
sleep 15
docker info >/dev/null 2>&1 && echo "Docker is running"
2. Container in Exited State
Symptoms:
we-mp-rss Exited (255) 15 seconds ago ghcr.io/rachelos/we-mp-rss:latest
Cause: Container crashed or was stopped. Exit code 255 typically means the process terminated abnormally.
Diagnosis:
docker logs we-mp-rss 2>&1 | tail -30
Fix:
docker restart we-mp-rss
sleep 10
curl -s -o /dev/null -w "%{http_code}" http://localhost:8001/rss?limit=1
3. Service Running but Slow to Respond
Symptoms: Cron runs but extractor gets connection refused even after docker restart.
Cause: Container is starting up but the web server hasn't bound port 8001 yet.
Fix:
sleep 10
curl -s -o /dev/null -w "%{http_code}" http://localhost:8001/rss?limit=1
Cron Job Pre-Run Checklist
Before running wechat-mp-rss-extractor.py:
docker info >/dev/null 2>&1 || { open -a Docker; sleep 15; }
docker ps --filter "name=we-mp-rss" --filter "status=running" | grep we-mp-rss
curl -s -o /dev/null -w "%{http_code}" http://localhost:8001/rss?limit=1
source ~/.wiki-cron.env
export PATH="$PATH:/Users/jinguo/Library/Python/3.14/bin"
cd ~/wiki && python3 scripts/wechat-mp-rss-extractor.py --latest=10
Verification After Scan
Important: The heartbeat file is typically touched by the cron preamble (cron-heartbeat.py touch), so find -newer heartbeat will NOT find new files (they're older than the heartbeat).
Instead, verify by:
ls ~/wiki/raw/wechat-inbox/*.md | wc -l
tail ~/wiki/cron-status.log
ls -lt ~/wiki/raw/wechat-inbox/*.md | head -5
Environment Setup
Required in cron shell (bash, non-interactive — .zshrc is NOT loaded):
source ~/.wiki-cron.env
export PATH="$PATH:/Users/jinguo/Library/Python/3.14/bin"
The .wiki-cron.env file contains WERSS_AK and WERSS_SK for API authentication.
Known Behaviors
- Container exit code 255 = abnormal termination, usually recoverable with
docker restart
- Docker Desktop must be started before cron jobs can run (cron runs in background, no GUI)
- Service startup takes ~10 seconds after
docker restart
- Inbox count is a dynamic equilibrium (~188-198 files), not a bug when stable
- 2 accounts (科技充电站, code秘密花园) will never have full content — we-mp-rss cannot scrape them