#Changing heartbeat broke the gateway
1 messages ยท Page 1 of 1 (latest)
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
Hey! Heartbeat changes can sometimes cause issues depending on what exactly was modified. A few things to check:
-
Is your config valid JSON5? A trailing comma or wrong format can break the gateway on reload.
-
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. -
Check your logs - the error usually tells you exactly what went wrong. Run:
clawdbot gateway call healthOr look at the gateway logs directly.
- To recover, you can either:
- Revert the config change and run
clawdbot gateway call config.apply - Or restart the gateway entirely:
clawdbot gateway restart
- Revert the config change and run
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! ๐ฆ
The error is actually unrelated to heartbeat:
Gateway start blocked: set gateway.mode=local (current: unset) or pass --allow-unconfigured.
The fix: Add this to your config:
{
gateway: {
mode: "local"
}
}
Then restart the gateway:
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. ๐ฆ
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"! ๐ฆ
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": {
Found it! Your config has "gateway": { "auth": { ... but no mode key.
Fix with one command:
sed -i 's/"gateway": {/"gateway": { "mode": "local",/' ~/.clawdbot/clawdbot.json
Then verify:
grep -A2 '"gateway"' ~/.clawdbot/clawdbot.json
Should show:
"gateway": {
"mode": "local",
"auth": {
Then restart:
clawdbot gateway restart
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.
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:
- Docs with config examples: https://docs.clawd.bot/gateway/configuration-examples
- 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. ๐ฆ
I did reconfigure it, but getting this error
โ ๏ธ Agent failed before reply: Unknown model: minimax/MiniMax-M2.1. Check gateway logs for details.
The minimax/MiniMax-M2.1 model needs provider config. Check your config:
grep -A10 '"minimax"' ~/.clawdbot/clawdbot.json
Should look like:
{
"minimax": {
"apiKey": "your-api-key-here",
// optional: "baseUrl": "https://api.minimax.chat/v1/text/chatcompletion_v2"
}
}
Quick fix: Add the minimax provider config to your ~/.clawdbot/clawdbot.json:
{
"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:
clawdbot gateway restart
Weird, I had to manually add apikey in json and it didn't come when I pasted the key in clawdbot configure
now working
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! ๐ฆ
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.