#restart loop

1 messages · Page 1 of 1 (latest)

golden basalt
#

03:29+07:00 info gateway/ws {"subsystem":"gateway/ws"} ⇄ res ✓ channels.status 3657ms conn=4fbc7366…a243 id=1b388d20…00f9
13:03:31+07:00 warn tools {"subsystem":"tools"} tools.allow allowlist contains unknown entries (lobster). These entries won't match any tool unless the plugin is enabled.
13:03:31+07:00 warn gateway/ws {"subsystem":"gateway/ws"} handshake timeout conn=2db51554-ad3e-43fc-ba5b-80a9a8565734 peer=127.0.0.1:49654->127.0.0.1:18789 remote=127.0.0.1
13:03:31+07:00 warn gateway/ws {"subsystem":"gateway/ws"} handshake timeout conn=59ca9cf4-e79f-4e07-91c4-3f84ad648be2 peer=127.0.0.1:49668->127.0.0.1:18789 remote=127.0.0.1
13:03:31+07:00 warn gateway/ws {"subsystem":"gateway/ws"} handshake timeout conn=3db2acdb-ac6f-4c44-a073-2e020409a0df peer=127.0.0.1:49684->127.0.0.1:18789 remote=127.0.0.1
13:03:31+07:00 error telegram/native-approvals {"subsystem":"telegram/native-approvals"} connect error: gateway closed (1000):
13:03:31+07:00 error gateway connect failed: Error: gateway closed (1000):
13:03:31+07:00 error gateway connect failed: Error: gateway closed (1000):
13:03:31+07:00 error gateway/channels/telegram {"subsystem":"gateway/channels/telegram"} failed to start native approval handler: Error: gateway closed: 1000
13:03:31+07:00 error telegram/native-approvals {"subsystem":"telegram/native-approvals"} connect error: gateway closed (1000):
13:03:31+07:00 error gateway connect failed: Error: gateway closed (1000):
13:03:31+07:00 error gateway connect failed: Error: gateway closed (1000):
13:03:31+07:00 error gateway/channels/telegram {"subsystem":"gateway/channels/telegram"} failed to start native approval handler: Error: gateway closed: 1000
13:03:31+07:00 error telegram/native-approvals {"subsystem":"telegram/native-approvals"} connect error: gateway closed (1000):
13:03:31+07:00 error gateway connect failed: Error: gateway closed (1000):
13:03:31+07:00 error gateway connect failed: Error: gateway closed (1000):
13:03:31+07:00 error gateway/channels/telegram {"subsystem":"gateway/channels/telegram"} failed to start native approval handler: Error: gateway closed: 1000
43d0-a50a-a60ec02d65bd","host":"127.0.0.1:18789","remoteAddr":"127.0.0.1","remotePort":49654,"localAddr":"127.0.0.1","localPort":18789,"endpoint":"127.0.0.1:49654->127.0.0.1:18789","handshakeMs":10623} closed before connect conn=2db51554-ad3e-43fc-ba5b-80a9a8565734 peer=127.0.0.1:49654->127.0.0.1:18789 remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a code=1000 reason=n/a
13:03:32+07:00 info gateway/ws {"subsystem":"gateway/ws"} ⇄ res ✓ sessions.list 268ms conn=4fbc7366…a243 id=ca75fefe…242e
13:03:32+07:00 info gateway/channels/whatsapp {"subsystem":"gateway/channels/whatsapp"} Listening for personal WhatsApp inbound messages.
Log tail truncated (increase --max-bytes).
13:03:32+07:00 warn web-inbound {"module":"web-inbound"} {"error":"Error: rate-overlimit"} failed hydrating participating groups on connect
13:03:32+07:00 warn gateway/channels/whatsapp/inbound {"subsystem":"gateway/channels/whatsapp/inbound"} Failed hydrating participating groups on connect: Error: rate-overlimit
13:03:33+07:00 info gateway/ws {"subsystem":"gateway/ws"} ⇄ res ✓ health 7326ms conn=4fbc7366…a243 id=a673f80d…6a03
Gateway not reachable. Is it running and accessible?
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: /home/ubuntu/.openclaw/openclaw.json
Bind: loopback
Hint: run openclaw doctor.

please help me @grim flower

keen sageBOT
frosty shoreBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

keen sageBOT
grim flowerBOT
#

Yep, I think the important part here is that the Gateway itself is unstable locally, and the Telegram errors are mostly fallout.

What I’d focus on from your log:

  • Gateway target: ws://127.0.0.1:18789 + Source: local loopback
    → this is a local gateway/process problem, not a remote network problem.
  • handshake timeout ... 127.0.0.1
    → clients are reaching the port, but the Gateway is not completing connects cleanly.
  • gateway closed (1000) from Telegram native approvals
    → usually secondary, because the gateway connection is dropping underneath it.
  • tools.allow allowlist contains unknown entries (lobster)
    → likely config drift, probably not the main outage, but worth fixing.

Can you paste these 4 outputs in one reply:

#
openclaw --version
openclaw status --all
openclaw gateway status --deep
openclaw doctor

If you want a quick guess before that, my top suspects are:

  1. the gateway service is restarting/crashing
  2. you have multiple gateway-like services fighting each other
  3. config drift in ~/.openclaw/openclaw.json

Also, if you manually added lobster under tools.allow, remove it for now unless that plugin is actually enabled. There’s a known gotcha around unknown allowlist entries.

Docs:

golden basalt
#

Archive 390 orphan transcript files in ~/.openclaw/agents/main/sessions? This only renames them to *.deleted.<timestamp>.
│ ○ Yes / ● No

?

grim flowerBOT
#

Yep, I’d pick Yes.

That prompt is just doctor offering to archive orphan session transcripts, meaning .jsonl files that are not referenced by sessions.json anymore. It does not hard-delete them, it only renames them to:

*.deleted.<timestamp>

So it’s a pretty safe cleanup step, and with 390 of them, I’m glad doctor caught it.

A couple notes:

  • this might help if your session state got messy
  • but it’s probably not the whole root cause of the restart/connect loop

So I’d do this:

#
  1. answer Yes
  2. let openclaw doctor finish
  3. paste the full output from:
    openclaw --version
    openclaw gateway status --deep
    openclaw status --all
    

If the lobster warning is still there after that, we should also clean up that config entry next.

golden basalt
#
13:08:53+07:00 info plugins {"subsystem":"plugins"} embedded acpx runtime backend ready
Log tail truncated (increase --max-bytes).
13:08:53+07:00 info gateway/ws {"subsystem":"gateway/ws"} ⇄ res ✓ logs.tail 53ms conn=1dc78e48…d5ae id=93ac839d…b2ea
13:09:02+07:00 warn gateway/ws {"subsystem":"gateway/ws"} handshake timeout conn=2d761465-f5ce-4a08-8e97-37ebd8506eea peer=127.0.0.1:55282->127.0.0.1:18789 remote=127.0.0.1
peer=127.0.0.1:55306->127.0.0.1:18789 remote=127.0.0.1
13:09:02+07:00 error telegram/native-approvals {"subsystem":"telegram/native-approvals"} connect error: gateway closed (1000):
13:09:02+07:00 error gateway connect failed: Error: gateway closed (1000):
13:09:02+07:00 error gateway connect failed: Error: gateway closed (1000):
13:09:02+07:00 error gateway/channels/telegram {"subsystem":"gateway/channels/telegram"} failed to start native approval handler: Error: gateway closed: 1000
13:09:02+07:00 error telegram/native-approvals {"subsystem":"telegram/native-approvals"} connect error: gateway closed (1000):
13:09:02+07:00 error gateway connect failed: Error: gateway closed (1000):
13:09:02+07:00 error gateway/channels/telegram {"subsystem":"gateway/channels/telegram"} failed to start native approval handler: Error: gateway closed: 1000
13:09:02+07:00 error telegram/native-approvals {"subsystem":"telegram/native-approvals"} connect error: gateway closed (1000):
13:09:02+07:00 error gateway connect failed: Error: gateway closed (1000):
13:09:02+07:00 error gateway connect failed: Error: gateway closed (1000):
13:09:02+07:00 error gateway/channels/telegram {"subsystem":"gateway/channels/telegram"} failed to start native approval handler: Error: gateway closed: 1000
13:09:02+07:00 warn gateway/ws {"subsystem":"gateway/ws"} {"cause":"handshake-timeout","handshake":"failed","durationMs":10190,"lastFrameType":"req","lastFrameMethod":"connect","lastFrameId":"70120c41-aa60-4b2c-94e4-31a454362d05","host":"127.0.0.1:18789","remoteAddr":"127.0.0.1","remotePort":55306,"localAddr":"127.0.0.1","localPort":18789,"endpoint":"127.0.0.1:55306->127.0.0.1:18789","handshakeMs":10100} closed before connect conn=e0ef08c1-31e3-4ea1-80f4-eef3934d2385 peer=127.0.0.1:55306->127.0.0.1:18789 remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a code=1000 reason=n/a
13:09:02+07:00 warn gateway/ws {"subsystem":"gateway/ws"} {"cause":"handshake-timeout","handshake":"failed","durationMs":10237,"lastFrameType":"req","lastFrameMethod":"connect","lastFrameId":"8ef3873d-c221-40fb-ba92-
13:09:02+07:00 warn gateway/ws {"subsystem":"gateway/ws"} {"cause":"handshake-timeout","handshake":"failed","durationMs":10245,"lastFrameType":"req","lastFrameMethod":"connect","lastFrameId":"166437e2-59c9-4e18-baa1-5218ba97541a","host":"127.0.0.1:18789","remoteAddr":"127.0.0.1","remotePort":55282,"localAddr":"127.0.0.1","localPort":18789,"endpoint":"127.0.0.1:55282->127.0.0.1:18789","handshakeMs":10149} closed before connect conn=2d761465-f5ce-4a08-8e97-37ebd8506eea peer=127.0.0.1:55282->127.0.0.1:18789 remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a code=1000 reason=n/a
13:09:03+07:00 warn tools {"subsystem":"tools"} tools.allow allowlist contains unknown entries (lobster). These entries won't match any tool unless the plugin is enabled.
13:09:03+07:00 warn web-session {"module":"web-session"} {"credsPath":"/home/ubuntu/.openclaw/credentials/whatsapp/eve-whatsapp/creds.json"} restored corrupted WhatsApp creds.json from backup
13:09:03+07:00 info gateway/channels/whatsapp {"subsystem":"gateway/channels/whatsapp"} Listening for personal WhatsApp inbound messages.
Gateway not reachable. Is it running and accessible?
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: /home/ubuntu/.ope
grim flowerBOT
#

This new log helps a lot.

The key clue is here:

  • lastFrameMethod":"connect" + handshake-timeout

So the client is reaching the gateway and sending connect, but the gateway is not finishing the handshake within ~10s. That makes me think this is less “port is dead” and more “gateway is wedged/busy during startup”.

The Telegram approval errors still look like symptoms, not the root cause.

I’d try this next:

  1. Temporarily disable Telegram native exec approvals
    in ~/.openclaw/openclaw.json:

#
   channels: {
     telegram: {
       execApprovals: {
         enabled: false
       }
     }
   }
  1. Remove lobster from tools.allow if it’s there and you did not explicitly enable that plugin.

  2. Restart the gateway

  3. Paste these in one message:

#
   openclaw --version
   openclaw gateway status --deep
   openclaw status --all

A couple side notes:

  • restored corrupted WhatsApp creds.json from backup is worth noticing, but I don’t think it’s the main blocker.
  • rate-overlimit on WhatsApp group hydration also looks like noise, not the core issue.

Docs:

If you paste the version + status output, we can narrow down whether this is config drift, a stuck service, or a version-specific bug.

golden basalt
#

i'm running on vps 2cpu 8gb ram 60gb ssd nvme
here

grim flowerBOT
#

That VPS is plenty. 2 CPU, 8 GB RAM, 60 GB NVMe is not the problem here.

So I’d stop blaming resources and focus on service/state/config.

Because it’s a VPS, the next most useful check is:

openclaw --version
openclaw gateway status --deep
openclaw status --all

--deep matters here because it can catch multiple gateway/systemd installs or service mismatches, and that can absolutely cause this kind of weird loop.

Also tell me which of these is true:

  • running OpenClaw directly on the VPS
#
  • running it in Docker/Podman

And if you haven’t done the earlier cleanup yet, I still would:

  • set channels.telegram.execApprovals.enabled: false
  • remove lobster from tools.allow if that plugin is not actually enabled
  • restart the gateway once

Troubleshooting doc: https://docs.openclaw.ai/gateway/troubleshooting

Paste those outputs and we can get much sharper.

golden basalt
#

the output is too long to be delivered here. tell me what do u need specifically

grim flowerBOT
#

Yep, totally fine, just paste the small bits below.

I need exactly this:

  1. Version

    openclaw --version
    
  2. From openclaw gateway status --deep, only these lines:

    • Runtime: ...
    • RPC probe: ...
    • Gateway target: ... or URL line
    • Config (cli): ...
    • Config (service): ...
    • anything mentioning Other gateway-like services detected
#
  1. Are you running OpenClaw:

    • directly on the VPS
    • or in Docker/Podman
  2. From your config, only these non-secret parts from ~/.openclaw/openclaw.json:

    • tools.allow
    • channels.telegram.execApprovals

    Please do not paste tokens/passwords.

  3. Tell me whether you already changed:

    • channels.telegram.execApprovals.enabled: false
    • removed lobster from tools.allow

That should be enough to narrow it down.

golden basalt
#

OpenClaw 2026.4.14 (323493f)

Service: systemd (enabled)
File logs: /tmp/openclaw/openclaw-2026-04-17.log
Command: /usr/bin/node /home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
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.

Runtime: running (pid 1852745, state active, sub running, last exit 0, reason 0)
RPC probe: ok
"tools": {
    "profile": "full",
    "web": {
      "search": {
        "enabled": true,
        "provider": "blockrun-exa"
      },
      "fetch": {
        "enabled": true
      }
    },
    "sessions": {
      "visibility": "all"
    },
    "agentToAgent": {
      "enabled": true,
      "allow": [
        "main",
        "agent2",
        "agent3",
        "agent4",
        "agent5",
        "agent6",
        "agent7"
      ]
    },
    "exec": {
      "ask": "off",
      "security": "full",
      "backgroundMs": 10000,
      "timeoutSec": 7000,
      "cleanupMs": 2400000,
      "strictInlineEval": false
    }
  },
grim flowerBOT
#

This is actually good news.

Your gateway itself looks healthy:

  • OpenClaw 2026.4.14 is recent
  • Runtime: running
  • RPC probe: ok
  • same config for CLI + service
  • systemd service looks normal

So I don’t think this is a real gateway restart loop anymore, and I don’t think your VPS resources are the issue.

What’s left is much narrower:

  1. a stray lobster entry somewhere in an allowlist
  2. Telegram native exec approvals trying to connect and timing out during startup
#

The config snippet you pasted is missing the two exact blocks I still need:

  • tools.allow
  • channels.telegram.execApprovals

So either paste those two blocks, or just answer these two yes/no questions:

  • Does tools.allow contain lobster anywhere?
  • Is channels.telegram.execApprovals.enabled set, and if yes, what is it set to?

If you want the fastest likely fix right now, I’d do this:

  • remove lobster from any tools.allow
  • set channels.telegram.execApprovals.enabled: false
  • restart the gateway once

If the bot otherwise works after that, then the scary logs were mostly Telegram approval-client noise, not a dead gateway.

#

If you want, paste just those two tiny config blocks and I’ll tell you exactly what to change.

golden basalt
#
13:46:02+07:00 error telegram/native-approvals {"subsystem":"telegram/native-approvals"} connect error: gateway closed (1000):
13:46:02+07:00 error gateway connect failed: Error: gateway closed (1000):
13:46:02+07:00 error gateway connect failed: Error: gateway closed (1000):
13:46:02+07:00 error gateway/channels/telegram {"subsystem":"gateway/channels/telegram"} failed to start native approval handler: Error: gateway closed: 1000
13:46:02+07:00 warn gateway/ws {"subsystem":"gateway/ws"} {"cause":"handshake-timeout","handshake":"failed","durationMs":13069,"lastFrameType":"req","lastFrameMethod":"connect","lastFrameId":"00d503f9-8440-4482-9008-cca1dc37519a","host":"127.0.0.1:18789","remoteAddr":"127.0.0.1","remotePort":57972,"localAddr":"127.0.0.1","localPort":18789,"endpoint":"127.0.0.1:57972->127.0.0.1:18789","handshakeMs":13041} closed before connect conn=7fc5048f-c8c6-4be4-bc09-9619b5937f25 peer=127.0.0.1:57972->127.0.0.1:18789 remote=127.0.0.1 fwd=n/a origin=n/a host=127.0.0.1:18789 ua=n/a code=1000 reason=n/a
13:46:04+07:00 warn web-session {"module":"web-session"} {"credsPath":"/home/ubuntu/.openclaw/credentials/whatsapp/eve-whatsapp/creds.json"} restored corrupted WhatsApp creds.json from backup
13:46:04+07:00 warn gateway/ws {"subsystem":"gateway/ws"} handshake timeout conn=da288a2d-cc1b-42ef-957a-9ffea34a59b4 peer=127.0.0.1:54572->127.0.0.1:18789 remote=127.0.0.1
13:46:04+07:00 warn gateway/ws {"subsystem":"gateway/ws"} handshake timeout conn=6ff657d3-9ba8-4caa-8564-d3c2f74c969f peer=127.0.0.1:54582->127.0.0.1:18789 remote=127.0.0.1
13:46:04+07:00 warn gateway/ws {"subsystem":"gateway/ws"} handshake timeout conn=d5300bca-7e95-4524-963c-62c22aa634f2 peer=127.0.0.1:54590->127.0.0.1:18789 remote=127.0.0.1
13:46:04+07:00 warn gateway/ws {"subsystem":"gateway/ws"} handshake timeout conn=b2125e71-b581-4e61-a0e0-1d6798bfbb5a peer=127.0.0.1:54604->127.0.0.1:18789 remote=127.0.0.1
13:46:04+07:00 error telegram/native-approvals {"subsystem":"telegram/native-approvals"} connect error: gateway closed (1000):
13:46:04+07:00 error gateway connect failed: Error: gateway closed (1000):
13:46:04+07:00 error gateway connect failed: Error: gateway closed (1000):
13:46:04+07:00 error gateway/channels/telegram {"subsystem":"gateway/channels/telegram"} failed to start native approval handler: Error: gateway closed: 1000
13:46:04+07:00 error telegram/native-approvals {"subsystem":"telegram/native-approvals"} connect error: gateway closed (1000):
13:46:04+07:00 error gateway connect failed: Error: gateway closed (1000):
13:46:04+07:00 error gateway connect failed: Error: gateway closed (1000):
13:46:04+07:00 error gateway/channels/telegram {"subsystem":"gateway/channels/telegram"} failed to start native approval handler: Error: gateway closed: 1000

again 🙁

grim flowerBOT
#

Okay, I’m pretty convinced now this is channel-specific startup noise, not a dead core gateway.

Why I’m saying that:

  • systemd service is healthy
  • RPC probe: ok
  • same config file for CLI + service
  • the repeated failures are all clustering around Telegram native approvals
  • the lobster warning is separate config drift

So I’d do a clean isolation pass:

  1. Search the config for every lobster reference and remove it from any tool allowlist/additive allowlist
    (tools.allow, tools.alsoAllow, or agent-specific tool allowlists)

  2. Set this explicitly

#
   channels: {
     telegram: {
       execApprovals: {
         enabled: false
       }
     }
   }
  1. Restart the gateway once.

  2. If it still happens, temporarily disable Telegram channel startup entirely:

    channels: {
      telegram: {
    
#
       enabled: false
     }
   }

then restart again.

If the handshake spam disappears with Telegram disabled, then we’ve isolated it to the Telegram approval/channel path, not the gateway itself.

One more important nuance: the lobster warning may not be in the global tools block you pasted. It can also come from tools.alsoAllow or agent-specific tool policy, so search the whole config for the word lobster, not just tools.allow.

I’d ignore the WhatsApp backup-restore warning for the moment. Weird, yes, but it doesn’t look like the main blocker.

If you want, paste just the tiny before/after config bits for:

  • telegram
  • any line containing lobster
#

and I’ll sanity check them.

golden basalt
#

i've disabled both of them but the problem still exists. the strange thing is that there's always main.sqlite.tmp-..... files generated. i don't know why. i think that process that cause this whole problem

grim flowerBOT
#

Ah, that’s a much better clue.

If the files are literally named main.sqlite.tmp-*, I’m now suspicious of memory indexing, not Telegram.

By default, OpenClaw’s memory index lives at:

~/.openclaw/memory/{agentId}.sqlite

So for main, that’s usually:

~/.openclaw/memory/main.sqlite

That means:

#
  • main.sqlite is not the core gateway DB
  • it’s usually the memory search/index store
  • .tmp-* files usually mean a write is being started and not finishing cleanly

So I’d do this next:

  1. Confirm the exact path of those files
    If they’re under ~/.openclaw/memory/, that’s the memory subsystem.

  2. Temporarily disable memory search for a test:

    agents: {
      defaults: {
        memorySearch: {
          enabled: false
        }
    
#
     }
   }
  1. Restart the gateway once.

  2. Watch whether:

    • new main.sqlite.tmp-* files stop appearing
    • the handshake timeout spam stops

If both stop, then we’ve isolated the problem to memory indexing / memory store writes.

A couple important notes:

  • I would not delete main.sqlite yet
  • leftover .tmp-* files are usually a symptom of interrupted writes, not necessarily the original cause