#Changing heartbeat broke the gateway

1 messages ยท Page 1 of 1 (latest)

glad patrolBOT
#

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

coral urchin
#

clawdbot-gateway.service: Found left-over process 420816 (MainThread) in control group while starting unit. Ignoring.
Jan 14 04:04:51 instance-20251211-1800 systemd[271960]: clawdbot-gateway.service: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Jan 14 04:04:51 instance-20251211-1800 systemd[271960]: Started clawdbot-gateway.service - Clawdbot Gateway (v2026.1.11-4).
Jan 14 04:04:53 instance-20251211-1800 node[477060]: Gateway start blocked: set gateway.mode=local (current: unset) or pass --allow-unconfigured.
Jan 14 04:04:53 instance-20251211-1800 systemd[271960]: clawdbot-gateway.service: Main process exited, code=exited, status=1/FAILURE
Jan 14 04:04:53 instance-20251211-1800 systemd[271960]: clawdbot-gateway.service: Failed with result 'exit-code'.
Jan 14 04:04:53 instance-20251211-1800 systemd[271960]: clawdbot-gateway.service: Unit process 420816 (MainThread) remains running after unit stopped.
Jan 14 04:04:53 instance-20251211-1800 systemd[271960]: clawdbot-gateway.service: Consumed 2.639s CPU time, 351.7M memory peak, 0B memory swap peak.

#

@tall kiln

tall kilnBOT
#

Hey! Heartbeat changes can sometimes cause issues depending on what exactly was modified. A few things to check:

  1. Is your config valid JSON5? A trailing comma or wrong format can break the gateway on reload.

  2. From the docs, these heartbeat settings ARE hot-reloadable:

    • agents.defaults.heartbeat*
    • agent.heartbeat*
    • cron*

    But if you changed anything in gateway.*, plugins.*, or other non-reloadable sections, that would require a full restart.

  3. Check your logs - the error usually tells you exactly what went wrong. Run:

    clawdbot gateway call health
    

    Or look at the gateway logs directly.

#
  1. To recover, you can either:
    • Revert the config change and run clawdbot gateway call config.apply
    • Or restart the gateway entirely: clawdbot gateway restart

What specifically did you change in your config? That'll help pinpoint the issue. Also, clawdbot --version if you haven't already - version mismatches can cause weird issues too! ๐Ÿฆ

tall kilnBOT
#
clawdbot gateway restart

This is a required setting - the gateway won't start without gateway.mode being explicitly set. It was likely missing or got removed during your config edit. ๐Ÿฆ

tall kilnBOT
# coral urchin <@1457407575476801641>

That's Clawd, not me! ๐Ÿฆž But I'll help!

You need to edit your config file (~/.clawdbot/clawdbot.json) and add:

{
  "gateway": {
    "mode": "local"
  }
}

Steps:

# 1. Edit the config
#
nano ~/.clawdbot/clawdbot.json

# 2. Add gateway.mode at the top level (not inside agents)
# Should look like:
# {
#   "gateway": { "mode": "local" },
#   "agents": { ... },
#   ...
# }

# 3. Save and restart
clawdbot gateway restart

Quick check if your config is missing it:

#
grep -A1 '"gateway"' ~/.clawdbot/clawdbot.json

If nothing comes back or it shows "gateway": {} - that's the problem. Add mode: "local"! ๐Ÿฆ

coral urchin
#

ubuntu@instance-20251211-1800:~$ clawdbot gateway call health

๐Ÿฆž Clawdbot 2026.1.11-4 (unknown) โ€” curl for conversations.

Gateway call failed: Error: gateway closed (1006 abnormal closure (no close frame)): no close reason
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: /home/ubuntu/.clawdbot/clawdbot.json
Bind: loopback

ubuntu@instance-20251211-1800:~$ grep -A1 '"gateway"' ~/.clawdbot/clawdbot.json
"gateway": {
"auth": {

tall kilnBOT
#
  "mode": "local",
  "auth": {

Then restart:

clawdbot gateway restart
coral urchin
#

This makes the gateway run, but I guess when I asked clawd to update heartbeat from 30m to 6h. It did reset all my config.

tall kilnBOT
# coral urchin This makes the gateway run, but I guess when I asked clawd to update heartbeat f...

Oh no! ๐Ÿ˜Ÿ That's rough. The config.apply might have created a backup before overwriting, but let's check:

Check for backups:

# Look for backup files
ls -la ~/.clawdbot/*.json* | head -20

# Check systemd's snapshot of the unit file (sometimes has env vars)
systemctl cat clawdbot-gateway

# Check /var/lib/clawdbot for any state
ls -la /var/lib/clawdbot/

If no backup exists:

  1. Docs with config examples: https://docs.clawd.bot/gateway/configuration-examples
#
  1. Full config schema: https://docs.clawd.bot/gateway/configuration

To prevent this in the future:

  • Before running config.apply, the gateway should back up to ~/.clawdbot/clawdbot.json.bak
  • If you have any other machines with the same config, you can copy from there

What specifically did you change? If you remember what you had, I can help you rebuild just the basics to get back up and running quickly. ๐Ÿฆ

coral urchin
#

I did reconfigure it, but getting this error

โš ๏ธ Agent failed before reply: Unknown model: minimax/MiniMax-M2.1. Check gateway logs for details.

tall kilnBOT
#
{
  "minimax": {
    "apiKey": "YOUR_MINIMAX_API_KEY"
  },
  "gateway": { "mode": "local" },
  "agents": {
    "defaults": {
      "model": "minimax/MiniMax-M2.1"
    }
  }
}

Get your API key from https://api.minimax.chat/ and restart:

coral urchin
#

Weird, I had to manually add apikey in json and it didn't come when I pasted the key in clawdbot configure

#

now working

tall kilnBOT
# coral urchin Weird, I had to manually add apikey in json and it didn't come when I pasted the...

That's odd! Did you run clawdbot configure or a specific provider command like clawdbot configure minimax?

Check where your key might be:

# Check environment variables
env | grep -i minimax

# Check if there's a separate config
cat ~/.clawdbot/providers.json 2>/dev/null

# Check the main config again
cat ~/.clawdbot/clawdbot.json | grep -i minimax -A5

For future reference, you can also set API keys via env var:

#
# Add to systemd service or ~/.bashrc
export MINIMAX_API_KEY="your-key-here"

If clawdbot configure isn't saving minimax keys properly, that's a bug worth reporting. What exact command did you run? ๐Ÿฆ

#

Glad it's working! ๐ŸŽ‰

Note for later: If clawdbot configure doesn't save provider keys properly, that might be worth filing as a bug. But for now, at least you know the workaround (manually add to JSON).

You should be all set now! ๐Ÿฆ

coral urchin
#

Ah I lost my crons and skills. Any place I can look to recover them?

tall kilnBOT
# coral urchin Ah I lost my crons and skills. Any place I can look to recover them?

Check for backups and where things live:

# List all config files
ls -la ~/.clawdbot/

# Check for any backup files
ls -la ~/.clawdbot/*.bak 2>/dev/null
ls -la /var/lib/clawdbot/ | grep -i cron
ls -la /var/lib/clawdbot/ | grep -i skill

# Check workspace for skills
ls -la ~/clawd/skills/ 2>/dev/null

Crons are stored in your main config under cron.jobs. If you have a backup of clawdbot.json.bak, check there.