18:16:42 [gateway] loading configuration…
18:16:43 [gateway] resolving authentication…
18:16:43 [gateway] starting...
18:17:18 [gateway] starting HTTP server...
18:17:18 [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/
18:17:18 [health-monitor] started (interval: 300s, startup-grace: 60s, channel-connect-grace: 120s)
18:17:19 [gateway] agent model: lmstudio/qwen/qwen3.5-9b
18:17:19 [gateway] ready (6 plugins: acpx, browser, device-pair, discord, phone-control, talk-voice; 35.5s)
18:17:19 [gateway] log file: \tmp\openclaw\openclaw-2026-04-17.log
18:17:19 [gateway] security warning: dangerous config flags enabled: gateway.controlUi.allowInsecureAuth=true. Run openclaw security audit.
18:17:19 [gateway] starting channels and sidecars...
18:17:20 [hooks] loaded 4 internal hook handlers
18:17:57 [bonjour] watchdog detected non-announced service; attempting re-advertise
18:18:27 [bonjour] restarting advertiser (service stuck in announcing for 29912ms
18:18:29 [plugins] embedded acpx runtime backend registered
18:18:29 [browser/server] Browser control listening on http://127.0.0.1:18791/ (auth=token)
18:18:31 [heartbeat] started
18:18:31 [discord] [default] starting provider
18:18:31 [plugins] embedded acpx runtime backend ready
18:18:33 [bonjour] watchdog detected non-announced service; attempting re-advertise (gateway fqdn= (OpenClaw)._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=probing)
18:18:33 [discord] client initialized as 1483445847722033315 (OpenClawy); awaiting gateway readiness
#openclaw gateway issue
1 messages · Page 1 of 1 (latest)
From this snippet, the gateway itself did come up. ready (6 plugins...) means core startup succeeded.
The two things that stand out are:
-
Bonjour advertiser flapping
watchdog detected non-announced service/restarting advertiser- usually non-fatal, mostly affects LAN auto-discovery, not core gateway/chat
- docs: https://docs.openclaw.ai/gateway/bonjour
-
Discord not fully READY yet
client initialized as ...; awaiting gateway readiness- that means the bot token was accepted, but Discord had not finished the READY handshake yet
- if it stays there for more than ~30s, there should usually be follow-up timeout/restart logs
Can you paste these next:
openclaw --version
openclaw status --all
openclaw gateway status
openclaw channels status --probe
Then let this run for another 30 to 60 seconds and paste the next lines too:
openclaw logs --follow
Also, which of these is the real symptom?
- bot never shows online
- bot shows online but never replies
- Control UI cannot connect
One extra note:
gateway.controlUi.allowInsecureAuth=true is a security warning, but probably not the cause of this startup issue.
Useful refs:
- https://docs.openclaw.ai/help/faq
- https://docs.openclaw.ai/gateway/troubleshooting
- https://docs.openclaw.ai/channels/discord
If the bot is online but silent in servers, the first thing I’d check after this is Message Content Intent plus the Discord guild allowlist / requireMention settings.
openclaw version : 2026.4.15
Discord | ON | OK | token config (sha256:833c6fda · len 72) · accounts 1/1
Agents | 1 total · 1 bootstrapping · 0 active · 1 sessions
âś“ Config: C:\Users\.openclaw\openclaw.json
âś“ Secret diagnostics (0)
âś“ Restart sentinel: none
! Port 18789
Port 18789 is already in use.
- pid 34464: "C:\Program Files\nodejs\node.exe"
- Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
! Tailscale: off · unknown
✓ Skills: 11 eligible · 0 missing · C:\Users\.openclaw\workspace
âś“ Plugin compatibility (none)
âś“ Channel issues (none)
Service: Scheduled Task (registered)
File logs: \tmp\openclaw\openclaw-2026-04-17.log
Command: C:\Program Files\nodejs\node.exe
Service file: ~.openclaw\gateway.cmd
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~.openclaw\openclaw.json
Config (service): ~.openclaw\openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Gateway reachable.
-
Discord default: enabled, configured, running, connected, bot:@OpenClawy, token:config, intents:content=limited, works
-
Bot comes online, but never replies (I'm using LM Studio Provider)
Here's some error I found in openclaw logs --follow
warn gateway/ws {"subsystem":"gateway/ws"} unauthorized conn=>remote= client=openclaw-control-ui webchat v2026.4.15 role=operator scopes=5 auth=token device=yes platform=Win32 instance=8ffc3879-1f0c-41c0-aadc-c502af87a8ec host=127.0.0.1:18789 origin=http://127.0.0.1:18789 ua=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36 reason=device_token_mismatch
warn gateway {"subsystem":"gateway"} security warning: dangerous config flags enabled: gateway.controlUi.allowInsecureAuth=true. Run openclaw security audit.
Nice, this narrows it down a lot.
What’s healthy
- Gateway is up
- Discord transport is up
channels status --probesays Discord connected and worksPort 18789 is already in usejust means the gateway is already running, not a second bug
What’s not the cause
device_token_mismatchis your Control UI/browser auth, not Discord repliesallowInsecureAuth=trueis just a security warning
So this looks much more like an agent/model-side problem, not a Discord connection problem.
Biggest clue
You have:
Agents | 1 total · 1 bootstrapping · 0 active · 1 sessions- local model:
lmstudio/qwen/qwen3.5-9b
That usually means the main agent is still stuck in first-run bootstrapping or the local model is choking on a normal OpenClaw turn.
Next checks I’d do
- Test the model directly
openclaw infer model run --model lmstudio/qwen/qwen3.5-9b --prompt "Reply with exactly: smoke-ok" --json
If this hangs or errors, the problem is LM Studio / model compatibility, not Discord.
- Check whether bootstrap is still pending
See if this file still exists:
C:\Users\bhupa\.openclaw\workspace\BOOTSTRAP.md
BOOTSTRAP.md should be removed after first-run completes. If it’s still there, the agent is still stuck in bootstrap. Docs: https://docs.openclaw.ai/start/bootstrapping
- Tail logs while sending one test DM/message
You want to catch the lines right after a message arrives:
openclaw logs --follow
If you see drop guild message (mention required) or allowlist/blocked logs, then it’s Discord policy.
If you see model/backend errors, it’s LM Studio.
My bet
The most likely issue is LM Studio + qwen3.5-9b not handling full OpenClaw agent prompts/tooling well. That’s a common local-model failure mode. Docs:
- https://docs.openclaw.ai/gateway/local-models
- https://docs.openclaw.ai/gateway/troubleshooting#local-openai-compatible-backend-passes-direct-probes-but-agent-runs-fail
About the browser auth warning
If the dashboard keeps failing with device_token_mismatch, that’s a separate stale device token issue. Docs/fix path: https://docs.openclaw.ai/cli/devices
If you want, paste:
- the result of
openclaw infer model run ... - whether
BOOTSTRAP.mdexists - 20 to 40 log lines right after you send the bot a test message
and I’ll help pinpoint which branch it is.
18:30:52 [lmstudio/stream] LM Studio inference preload failed for "qwen/qwen3.5-9b" (1 consecutive failure, next preload attempt skipped for ~5s); continuing without preload: Error: LM Studio model discovery failed: TypeError: fetch failed
Yep, that’s the strongest lead so far.
LM Studio inference preload failed ... model discovery failed: TypeError: fetch failed
means OpenClaw couldn’t reach the LM Studio API when it tried to use that model.
So the picture now is:
- Discord is fine
- Gateway is fine
- LM Studio connectivity/model availability is the likely failure
A small nuance: that specific preload warning is not always fatal because OpenClaw can continue without preload, but paired with “bot comes online, never replies”, it’s very likely the real problem.
Check these next
- Is the LM Studio server actually running?
The app being open is not enough, the local API server must be up.
- Can the API be reached from the same machine?
curl http://127.0.0.1:1234/api/v1/models
- Can OpenClaw run the model directly?
openclaw infer model run --model lmstudio/qwen/qwen3.5-9b --prompt "Reply with exactly: smoke-ok" --json
- Check the configured LM Studio base URL
openclaw config get models.providers.lmstudio
What I’d expect
- If
curlfails, LM Studio server is down / wrong port / wrong bind - If
curlworks butinfer model runfails, it’s model compatibility or auth - If LM Studio auth is enabled, make sure
LM_API_TOKENmatches
Also worth checking:
- model loaded? LM Studio can unload models
- JIT loading enabled? docs mention that helps avoid “model not loaded” style hangs
Docs:
- https://docs.openclaw.ai/providers/lmstudio
- https://docs.openclaw.ai/gateway/local-models
- https://docs.openclaw.ai/help/troubleshooting
If you paste the outputs of:
curl http://127.0.0.1:1234/api/v1/modelsopenclaw infer model run ...
openclaw config get models.providers.lmstudio
I can tell you pretty quickly which branch you’re in.
openclaw infer model run --model lmstudio/qwen/qwen3.5-9b --prompt "Reply with exactly: smoke-ok" --json
18:34:12 [lmstudio/stream] LM Studio inference preload failed for "qwen/qwen3.5-9b" (1 consecutive failure, next preload attempt skipped for ~5s); continuing without preload: Error: LM Studio model discovery failed: TypeError: fetch failed
18:34:45 [agent/embedded] embedded run agent end: runId=7c356e3a-af79-43db-8481-a1e809d72573 isError=true model=qwen/qwen3.5-9b provider=lmstudio error=LLM request timed out. rawError=Request timed out.
That confirms it.
Discord is not the problem.
Your model path is failing even on a direct CLI test:
LM Studio model discovery failed: TypeError: fetch failed- then
LLM request timed out
So OpenClaw can receive the Discord message, but it cannot get a usable response from LM Studio.
What this means
Most likely one of these:
- LM Studio server is not actually reachable on
127.0.0.1:1234 - The model is not loaded (or cold-loading too slowly)
- qwen3.5-9b is too slow / unstable for this OpenClaw setup
- Less likely, but possible: LM Studio auth/base URL mismatch
Do these in order
1. Verify LM Studio API is reachable
curl http://127.0.0.1:1234/api/v1/models
If that fails, fix LM Studio first.
If the desktop app is open but the server is not started, OpenClaw will behave exactly like this.
2. Manually load the model in LM Studio
Open LM Studio and make sure qwen/qwen3.5-9b is actually loaded, then retry:
openclaw infer model run --model lmstudio/qwen/qwen3.5-9b --prompt "Reply with exactly: smoke-ok" --json
3. Check your LM Studio config
openclaw config get models.providers.lmstudio
If curl works but infer still times out
Then I’d treat it as a local model performance/compatibility issue.
Best next moves:
- try a stronger/faster model
- or temporarily switch to a hosted model to confirm the rest of OpenClaw is fine
- if you want to keep local, try:
agents.defaults.experimental.localModelLean: true- and for very slow local models, consider raising
agents.defaults.llm.idleTimeoutSeconds
Docs:
If you paste the curl .../api/v1/models output and openclaw config get models.providers.lmstudio, I can tell you whether this is server unreachable vs model too slow.
curl http://127.0.0.1:1234/api/v1/models
Security Warning: Script Execution Risk
Invoke-WebRequest parses the content of the web page. Script code in the web page might be run when the page is parsed.
RECOMMENDED ACTION:
Use the -UseBasicParsing switch to avoid script code execution.
Do you want to continue?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): A
StatusCode : 200
StatusDescription : OK
Content : {
"models": [
{
"type": "llm",
"publisher": "Jackrong",
"key": "qwopus3.5-4b-v3",
"display_name": "Qwen3.5 4B",
"architecture": "qwen35",
"quantization": {
...
RawContent : HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: *
Connection: keep-alive
Keep-Alive: timeout=5
Content-Length: 2531
Content-Type: application/json; charset=utf-8
Da...
Forms : {}
Headers : {[Access-Control-Allow-Origin, *], [Access-Control-Allow-Headers, *], [Connection, keep-alive], [Keep-Alive, timeout=5]...}
Images : {}
InputFields : {}
Links : {}
ParsedHtml : mshtml.HTMLDocumentClass
RawContentLength : 2531
Aha, this is really helpful.
Your LM Studio API is reachable now. But there’s an important mismatch:
- OpenClaw is trying:
lmstudio/qwen/qwen3.5-9b - Your LM Studio API is returning keys like:
qwopus3.5-4b-v3
OpenClaw needs the exact LM Studio key from /api/v1/models, not a guessed model name.
So this looks like a stale/wrong model ID in OpenClaw config, and possibly also a model-loading issue.
What to do next
- Use the exact LM Studio model key
If the model you want is reallyqwopus3.5-4b-v3, set:
openclaw models set lmstudio/qwopus3.5-4b-v3
If you actually want the 9B model, make sure that exact model is installed/loaded in LM Studio first, and that its key appears in /api/v1/models.
- Then rerun the smoke test
openclaw infer model run --model lmstudio/qwopus3.5-4b-v3 --prompt "Reply with exactly: smoke-ok" --json
- If it still times out
Then it’s not just the name mismatch, it’s likely model speed/compatibility. At that point I’d try:
- manually loading the model in LM Studio
- a stronger local model
- or a hosted model just to confirm the rest of OpenClaw is healthy
Important note
A 4B model may be enough for a smoke test, but it’s usually pretty weak for full OpenClaw agent behavior.
Docs:
Also, tiny Windows tip: PowerShell aliases curl to Invoke-WebRequest, so curl.exe ... avoids that scary parsing prompt next time.
If you want, paste the full list of LM Studio key values and I’ll tell you the exact openclaw models set ... command to use.
how do I change port to http://192.168.111.246:1234?
If you mean the LM Studio backend URL (not the OpenClaw dashboard port), set this:
openclaw config set models.providers.lmstudio.baseUrl "http://192.168.111.246:1234/v1"
openclaw gateway restart
A couple of important bits:
- use the LM Studio base URL with
/v1 - this changes where OpenClaw sends model requests
- after changing it, make sure the model key also matches what that LM Studio server exposes
So I’d also re-check the model list on that host and then set the exact model: