Skip to content

Commit 2f479dc

Browse files
GoGoComputerclaude
andcommitted
fix(start+lockdown): include docker-compose.sandbox.yml so docker.sock survives restart
User's Discord bot was Online but every reply was the generic: ⚠ Something went wrong while processing your request. Please try again, or use /new to start a fresh session. Gateway logs showed the actual failure: [diagnostic] lane task error: lane=session:agent:main:discord:channel:<id> error="Failed to inspect sandbox image: failed to connect to the docker API at unix:///var/run/docker.sock; ... no such file or directory" Each Discord message spawns an OpenClaw tool-sandbox sub-container, which requires /var/run/docker.sock mounted into the gateway. The install step_sandbox builds ~/DEV/openclaw/docker-compose.sandbox.yml (the overlay that mounts the socket) and brings the stack up with that overlay - but neither cmd/start.sh nor install.sh step_lockdown referenced it afterward. So the very first `./openclaw stop && start` - or any `network online --restart` / `network isolated --restart` - silently dropped the mount, and from then on every tool call died. Verification on the user's machine: docker inspect openclaw-openclaw-gateway-1 \ --format '{{range .Mounts}}{{.Source}} {{end}}' Before this patch the output omitted /var/run/docker.sock entirely. After the patch + restart, the mount returns and the gateway log line changes from "ready (6 plugins: …)" to: ready (7 plugins: acpx, bonjour, browser, device-pair, discord, phone-control, talk-voice; 11.1s) [discord] client initialized as <id> (openclaw) Fix - cmd/start.sh: add the sandbox overlay to the compose args list, using the same conditional `[ -f "$sandbox" ] && args+=…` pattern already used for compose.security.yml / compose.network.yml. If the overlay doesn't exist (sandbox disabled by OPENCLAW_SANDBOX=0 or never set up), the start path is unchanged. - install.sh step_lockdown: same fix. Without this, even the first `./openclaw install` was dropping the sandbox mount in its very last step - the bot only worked between step_sandbox and step_lockdown, so the regression was invisible until people tried Discord. Docs - GUIDE-DAILY-USE 트러블슈팅 row for "Something went wrong" with the docker.sock cause and the one-liner mount-verification. - GUIDE-DISCORD-BOT troubleshooting: dedicated entry with the log grep, mount inspection, and v0.2.16-and-earlier regression history. - CHANGELOG v0.2.17. VERSION 0.2.16 -> 0.2.17. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent f7e4d9a commit 2f479dc

6 files changed

Lines changed: 78 additions & 1 deletion

File tree

‎CHANGELOG.md‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## 📖 목차 / Contents
44

5+
- [v0.2.17 — 2026-05-14](#v0217--2026-05-14)
56
- [v0.2.16 — 2026-05-14](#v0216--2026-05-14)
67
- [v0.2.15 — 2026-05-14](#v0215--2026-05-14)
78
- [v0.2.14 — 2026-05-14](#v0214--2026-05-14)
@@ -25,6 +26,43 @@
2526

2627
---
2728

29+
## v0.2.17 — 2026-05-14
30+
31+
### Bug fix — Discord bot replies "Something went wrong" after stop/start (sandbox compose overlay drop)
32+
User's Discord bot was Online but every message got the generic OpenClaw error reply:
33+
34+
> ⚠️ Something went wrong while processing your request. Please try again, or use `/new` to start a fresh session.
35+
36+
Gateway logs revealed the actual cause:
37+
38+
```
39+
[diagnostic] lane task error: lane=session:agent:main:discord:channel:...
40+
error="Error: Failed to inspect sandbox image: failed to connect to the
41+
docker API at unix:///var/run/docker.sock; ... no such file or directory"
42+
```
43+
44+
The bot processes each message by spinning a sandbox sub-container, which needs `/var/run/docker.sock` mounted into the gateway container. `install.sh` step_sandbox generates `~/DEV/openclaw/docker-compose.sandbox.yml` (the overlay that mounts the socket) and brings the gateway up with that overlay included — but **neither `cmd/start.sh` nor `step_lockdown` referenced this overlay afterward**. So the first `./openclaw stop && ./openclaw start` (or any `network online --restart` / `network isolated --restart`) silently dropped the socket mount, and the bot stopped being able to invoke tools.
45+
46+
Symptom: `docker inspect openclaw-openclaw-gateway-1 --format '{{range .Mounts}}{{.Source}} {{end}}'` shows the workspace and config mounts but **no `/var/run/docker.sock`**. Plugins list shrinks from 7 (with `discord`) back to 6 because the discord channel can't run.
47+
48+
- **`cmd/start.sh`** — now adds `-f $OPENCLAW_DIR/docker-compose.sandbox.yml` to the compose args when that file exists. Same conditional include pattern already used for `compose.security.yml` / `compose.network.yml`. If the overlay doesn't exist (sandbox disabled by `OPENCLAW_SANDBOX=0`, or never set up) the start path is unchanged.
49+
- **`cmd/install.sh step_lockdown`** — same fix. Without this, the very last step of `./openclaw install` (the auto-lockdown to isolated) was already dropping the sandbox mount on first install, so the bot worked only between step_sandbox and step_lockdown — invisible to users until they tried Discord.
50+
51+
### Documentation
52+
- **GUIDE-DAILY-USE 트러블슈팅 표** — new row for "`Something went wrong while processing your request`" with the docker.sock cause and the `git pull → stop → start` recovery. Includes a one-liner to verify the mount.
53+
- **GUIDE-DISCORD-BOT 트러블슈팅** — new dedicated entry "봇이 응답으로 'Something went wrong...'" with the full diagnosis, log grep one-liner, mount verification, and history of the v0.2.16-and-earlier regression.
54+
55+
### Verified on user's machine
56+
After patch + `./openclaw stop && start`:
57+
- Gateway healthy
58+
- Mounts now include `/var/run/docker.sock -> /var/run/docker.sock`
59+
- Plugins line: `ready (7 plugins: acpx, bonjour, browser, device-pair, **discord**, phone-control, talk-voice)`
60+
- `discord client initialized as <id> (openclaw); awaiting gateway readiness` — connected and ready to process messages.
61+
62+
VERSION 0.2.16 → 0.2.17.
63+
64+
---
65+
2866
## v0.2.16 — 2026-05-14
2967

3068
### GUIDE-DAILY-USE TL;DR — Discord prompt cheat sheet alongside host commands

‎docs/GUIDE-DAILY-USE.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ rm ~/.openclaw-mgr/state
395395
|---|---|
396396
| 웹UI "Safari Can't Connect" | [isolated 모드 → online 으로](../README.md#-외부-네트워크-잠깐-켜기) |
397397
| TUI 답이 안 옴: **`fetch failed`** / **`LLM request failed: network connection error`** | 컨테이너→Ollama 네트워크 자체는 OK 인데 **모델 이름이 실제 설치된 이름과 다름** (예: `gemma4` vs `gemma4:26b`). 아래 [현재 어떤 모델을 쓰는지 확인](#-현재-어떤-모델을-쓰는지--openclawjson-점검) 참조 |
398+
| Discord 봇 응답: **`Something went wrong while processing your request. Please try again, or use /new to start a fresh session.`** (게이트웨이 로그에서 `Failed to inspect sandbox image: dial unix /var/run/docker.sock: no such file or directory`) | `./openclaw stop && start` 또는 `network` 토글 후 **gateway 컨테이너에 `/var/run/docker.sock` 마운트가 빠진 상태**. 봇이 도구 실행할 때 sandbox 컨테이너 못 띄움. v0.2.17+ 에서 `start.sh` / `step_lockdown` 이 자동으로 `docker-compose.sandbox.yml` 오버레이를 포함하도록 패치됨 — `git pull && ./openclaw stop && ./openclaw start` 한 번이면 해결. 확인: `docker inspect openclaw-openclaw-gateway-1 --format '{{range .Mounts}}{{.Source}} {{end}}' \| grep docker.sock` |
398399
| TUI 에서 답이 안 옴 / 느림 (메시지는 가긴 감) | 모델이 너무 크다 — `./openclaw chat` 의 picker 로 가벼운 모델 선택 |
399400
| install 이 [skip] 만 띄움 | [state 파일 vs 실제 산출물 어긋남 FAQ](../README.md) |
400401
| chat 에서 "Ollama not reachable" | Ollama 앱 안 켜진 상태 — `open -a Ollama` |

‎docs/GUIDE-DISCORD-BOT.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,30 @@ json.dump(cfg, open("/Users/mo/.openclaw/openclaw.json", "w"), indent=2)
831831
- [ ] OpenClaw 게이트웨이 컨테이너가 떠 있는가? `docker compose ps`
832832
- [ ] 방화벽이 `discord.com`/`gateway.discord.gg` outbound 를 차단? (회사 네트워크 흔한 케이스)
833833

834+
### "봇이 응답으로 `Something went wrong while processing your request. Please try again, or use /new to start a fresh session.`"
835+
836+
게이트웨이 로그에 다음이 보이면 `docker.sock` 마운트 누락:
837+
```bash
838+
./openclaw logs | grep -i "Failed to inspect sandbox image"
839+
# → Error: Failed to inspect sandbox image: failed to connect to the docker
840+
# API at unix:///var/run/docker.sock; ... no such file or directory
841+
```
842+
843+
원인: `./openclaw stop && start` 또는 `network online/isolated --restart` 사이클 후 gateway 컨테이너 안에 `/var/run/docker.sock` 마운트가 빠진 상태. 봇이 메시지를 받으면 도구 실행을 위해 **sandbox 서브컨테이너**를 띄우려는데 socket 이 없어 실패.
844+
845+
해결 (v0.2.17+):
846+
```bash
847+
cd ~/DEV/openclawAgent/openclaw-workspace/openclaw-mgr
848+
git pull
849+
./openclaw stop && ./openclaw start
850+
# 확인:
851+
docker inspect openclaw-openclaw-gateway-1 \
852+
--format '{{range .Mounts}}{{.Source}} {{end}}' | tr ' ' '\n' | grep docker.sock
853+
# → /var/run/docker.sock 이 나와야 정상
854+
```
855+
856+
원래는 install 의 `step_sandbox` 가 `docker-compose.sandbox.yml` 을 만들어 처음엔 마운트가 들어가는데, 그 이후 stop/start 또는 lockdown 이 호출되면 sandbox 오버레이가 빠지는 게 v0.2.16 까지의 회귀였음. v0.2.17 에서 `start.sh` 와 `step_lockdown` 둘 다 sandbox 오버레이를 자동 포함하도록 수정.
857+
834858
### "봇이 Online 인데 어떤 메시지에도 응답 안 함 — TUI 에서는 `fetch failed`"
835859

836860
OpenClaw 의 설정에 등록된 **모델 이름이 실제 설치된 Ollama 모델과 다른** 케이스. OpenClaw 가 onboard 중 하드코딩 기본값 (`gemma4` 등 태그 없는 이름) 을 자동으로 모델 목록에 끼워 넣어 일어남. → [GUIDE-DAILY-USE: 현재 어떤 모델을 쓰는지](GUIDE-DAILY-USE.md#-현재-어떤-모델을-쓰는지--openclawjson-점검) 의 진단·해결 3단계 그대로 적용. 빠른 fix: `./openclaw setup --skip-confirm` (v0.2.11+ 자동 정리).

‎openclaw-mgr/cmd/install.sh‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,13 @@ step_lockdown() {
454454
[ -f compose.yml ] && files="-f compose.yml"
455455
local sec="$OPENCLAW_MGR_DIR/compose.security.yml"
456456
local net="$OPENCLAW_MGR_DIR/compose.network.yml"
457+
local sandbox_overlay="$OPENCLAW_DIR/docker-compose.sandbox.yml"
457458
[ -f "$sec" ] && files="$files -f $sec"
458459
[ -f "$net" ] && files="$files -f $net"
460+
# 🛡 step_sandbox 가 만든 docker.sock 마운트 오버레이도 포함해 lockdown.
461+
# 안 그러면 lockdown 직후 sandbox 마운트가 풀려 봇이 도구 호출 시 "Failed
462+
# to inspect sandbox image" 로 떨어진다. (start.sh 와 동일한 회귀 방지.)
463+
[ -f "$sandbox_overlay" ] && files="$files -f $sandbox_overlay"
459464
# shellcheck disable=SC2086
460465
docker compose $files up -d --pull missing
461466
}

‎openclaw-mgr/cmd/start.sh‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ OPENCLAW_DIR="${OPENCLAW_DIR:-$HOME/DEV/openclaw}"
3737
cd "$OPENCLAW_DIR"
3838
sec="${OPENCLAW_MGR_DIR}/compose.security.yml"
3939
net="${OPENCLAW_MGR_DIR}/compose.network.yml"
40+
# install 의 step_sandbox 가 생성한 docker.sock 마운트 오버레이.
41+
# 없으면 (샌드박스 비활성 또는 사용자가 OPENCLAW_SANDBOX=0 으로 설정) 그냥 스킵.
42+
sandbox="$OPENCLAW_DIR/docker-compose.sandbox.yml"
4043

4144
# 네트워크 override 가 없으면 isolated 로 자동 생성 (기본 = 최고 보안).
4245
if [ ! -f "$net" ]; then
@@ -50,6 +53,12 @@ info "네트워크 모드: $mode (변경: ./openclaw network online|isolated --r
5053
args=(-f docker-compose.yml)
5154
[ -f "$sec" ] && args+=(-f "$sec")
5255
[ -f "$net" ] && args+=(-f "$net")
56+
# 🛡 샌드박스 오버레이 포함 — 없으면 gateway 컨테이너 안에 /var/run/docker.sock
57+
# 마운트가 빠져, 봇이 도구 실행할 때 "Failed to inspect sandbox image: dial
58+
# unix /var/run/docker.sock: no such file or directory" 로 떨어진다. install
59+
# 의 step_sandbox 가 이 파일을 만들지만 그 직후 ./openclaw stop && start 만
60+
# 해도 이 오버레이가 빠지는 게 v0.2.16 까지의 회귀였다.
61+
[ -f "$sandbox" ] && args+=(-f "$sandbox")
5362
docker compose "${args[@]}" up -d
5463
ok "컨테이너 시작 완료"
5564

‎openclaw-mgr/openclaw‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ set -euo pipefail
1313
OPENCLAW_MGR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
1414
export OPENCLAW_MGR_DIR
1515

16-
VERSION="0.2.16"
16+
VERSION="0.2.17"
1717

1818
# .env 자동 초기화: .env 없으면 .env.example 에서 자동 생성 (cp 불필요, 첫 실행부터 동작)
1919
# Auto-init: create .env from .env.example on first run — zero-config for beginners

0 commit comments

Comments
 (0)