#connection error.

1 messages Β· Page 1 of 1 (latest)

gloomy urchin
#

my bot replies to me saying "Connection Error." on all messaging channels. Signal, Discord, TUI, Gateway. Things I've tried.

-I can access the gateway website.
-clawdbot status shows gateway up and running and healthy.

  • i've restarted the gateway.
    -logs don't show anything abnormal

Still the same issue.

grizzled gullBOT
#

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

gloomy urchin
#

@mystic bone

mystic boneBOT
# gloomy urchin <@1457407575476801641>

I see the Discord connection error notification and a message from NoLimits. The message is just a mention of user @mystic bone.

What would you like me to do? I can:

  • Check the channel status
  • Try to read the message in that channel
  • Investigate the connection error
  • Something else?

Let me know what you need! 🦐

gloomy urchin
#

@mystic bone my bot replies to me saying "Connection Error." on all messaging channels. Signal, Discord, TUI, Gateway. Things I've tried.

-I can access the gateway website.
-clawdbot status shows gateway up and running and healthy.
i've restarted the gateway.
-logs don't show anything abnormal

Still the same issue.

mystic boneBOT
# gloomy urchin <@1457407575476801641> my bot replies to me saying "Connection Error." on all m...

Since the docs are limited, let me provide systematic troubleshooting for this "Connection Error" on all channels:

Most likely causes:

  1. Gateway is up but plugins can't reach it - Check the gateway URL in your plugin configs matches what clawdbot gateway status reports
  2. Plugins aren't actually running - Even if gateway status looks healthy, the individual channel plugins (Signal, Discord, TUI) need to be running separately
  3. Gateway URL mismatch - If you recently changed gateway ports/hosts, plugins might be pointing to the old address

Quick diagnostic steps:

# 1. Confirm gateway is really running and get the URL
clawdbot gateway status

# 2. Check what URL your plugins are configured to use
# (depends on your setup - check ~/.clawd/ or your config directory)
#

# 3. Test gateway connectivity from the plugin host
curl -v http://YOUR_GATEWAY_URL/health

Common fix: If you restarted the gateway and the IP/port changed, you'll need to update the gateway URL in each channel plugin's configuration.

Could you share:

  1. Output of clawdbot gateway status
  2. Your gateway URL (from the status output)
  3. How you're running the plugins (Docker, npm, etc.)?

This will help pinpoint where the disconnect is. 🦐

gloomy urchin
#

Clawdbot 2026.1.24-3 (885167d) β€” Because Threads wasn't the answer either.

(node:78425) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)
β”‚
β—‡
Service: systemd (enabled)
File logs: /tmp/clawdbot/clawdbot-2026-01-28.log
Command: /usr/bin/node /home/finnigan/.npm-global/lib/node_modules/clawdbot/dist/entry.js gateway --port 18789
Service file: ~/.config/systemd/user/clawdbot-gateway.service
Service env: CLAWDBOT_GATEWAY_PORT=18789

Config (cli): ~/.clawdbot/clawdbot.json
Config (service): ~/.clawdbot/clawdbot.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 78141, state active, sub running, last exit 0, reason 0)
RPC probe: ok

Listening: 127.0.0.1:18789
Troubles: run clawdbot status
Troubleshooting: https://docs.clawd.bot/troubleshooting

@mystic bone

#

@mystic bone
Clawdbot 2026.1.24-3 (885167d) β€” Because Threads wasn't the answer either.

(node:78425) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)
β”‚
β—‡
Service: systemd (enabled)
File logs: /tmp/clawdbot/clawdbot-2026-01-28.log
Command: /usr/bin/node /home/finnigan/.npm-global/lib/node_modules/clawdbot/dist/entry.js gateway --port 18789
Service file: ~/.config/systemd/user/clawdbot-gateway.service
Service env: CLAWDBOT_GATEWAY_PORT=18789

Config (cli): ~/.clawdbot/clawdbot.json
Config (service): ~/.clawdbot/clawdbot.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 78141, state active, sub running, last exit 0, reason 0)
RPC probe: ok

Listening: 127.0.0.1:18789
Troubles: run clawdbot status
Troubleshooting: https://docs.clawd.bot/troubleshooting

mystic boneBOT
# gloomy urchin <@1457407575476801641> Clawdbot 2026.1.24-3 (885167d) β€” Because Threads wasn't ...

Found the issue! 🎯

Your gateway is bound to loopback only (127.0.0.1), meaning it only accepts connections from the local machine. Your plugins are likely running on a different machine or container and can't reach it.

The fix: Change the gateway bind address to 0.0.0.0 (all interfaces):

# Option 1: Via environment variable
export CLAWDBOT_GATEWAY_BIND=0.0.0.0
clawdbot gateway restart

# Option 2: Or update your service file
# Edit ~/.config/systemd/user/clawdbot-gateway.service
# Add: Environment="CLAWDBOT_GATEWAY_BIND=0.0.0.0"
systemctl --user daemon-reload
systemctl --user restart clawdbot-gateway
#

# Option 3: Or set in config
# In ~/.clawdbot/clawdbot.json:
# { "gateway": { "bind": "0.0.0.0" } }

After changing: The gateway will listen on all network interfaces, and your remote plugins should be able to connect.

⚠️ Security note: This exposes your gateway on your network. If you're running on a shared network, consider firewall rules or using a reverse proxy with authentication.

Let me know if you need help updating the service file! 🦐

gloomy urchin
#

@mystic bone the gateway and plugins are on the same machine, this shouldn't matter.

mystic boneBOT
# gloomy urchin <@1457407575476801641> the gateway and plugins are on the same machine, this sho...

You're right - on the same machine, loopback should work fine.

If everything is local and gateway is healthy, the issue is likely:

  1. Plugins aren't actually running - The gateway is up, but the channel plugins (Signal, Discord, TUI) might be stopped
  2. Wrong gateway URL in plugin configs - Plugins might be pointing to a different port/address
  3. Plugin authentication failures - Could be failing to connect to the actual messaging services (Discord API, Signal proxy, etc.)

Quick check:

# Are any plugins running?
clawdbot status

# Or check for running node processes
ps aux | grep clawdbot
#

What to look for:

  • If clawdbot status only shows gateway and no plugins β†’ they're not started
  • If plugins show as "stopped" or missing β†’ that's your problem

Can you run clawdbot status and share the output? That should show which plugins are actually running vs. the gateway. 🦐

gloomy urchin
#

@mystic bone they are all running fine. it seems like the gateway cannot talk to the model.

mystic boneBOT
# gloomy urchin <@1457407575476801641> they are all running fine. it seems like the gateway can...

That's the root cause! If the gateway can't reach the model, everything fails.

Quick diagnostics:

# Check model config
clawdbot model list

# Check recent logs for model errors
grep -i "model\|openai\|anthropic\|error" /tmp/clawdbot/clawdbot-2026-01-28.log | tail -50

Common causes:

  1. Invalid API key - Double-check your CLAWDBOT_MODEL_API_KEY or config
  2. Network block - Can't reach the model provider (common with cloud providers blocked in certain regions)
  3. Wrong model name - Typo in the model identifier
#
  1. Rate limiting - Hit quota limits

Test your API key directly:

# Test OpenAI
curl -H "Authorization: Bearer YOUR_API_KEY" https://api.openai.com/v1/models

# Test Anthropic  
curl -H "x-api-key: YOUR_API_KEY" https://api.anthropic.com/v1/messages

What provider/model are you using? And can you check the logs for any actual error messages when the bot tries to respond? 🦐

gloomy urchin
#

curl: (7) Failed to connect to api.anthropic.com port 443 after 2 ms: Connection refused

mystic boneBOT
#
# or
ufw status

Common causes:

  1. Firewall blocking outbound 443 - Check with your network admin or hosting provider
  2. Corporate/proxy network - Need to configure proxy settings
  3. Docker network isolation - If running in Docker, the container might be isolated
  4. ISP blocking - Some ISPs block certain API endpoints

If you're on a VPS or cloud host:

# Check if outgoing connections work at all
curl -I https://8.8.8.8
#

To configure a proxy (if needed):

export HTTPS_PROXY="http://proxy:port"
export HTTP_PROXY="http://proxy:port"

Ask your hosting provider or network administrator about outbound HTTPS access. This is outside Clawdbot's control. 🦐

gloomy urchin
#

This bot was working fine with no major changes. I can ping anthropic, no ufw setup. Seems like anthropic is rejecting me. However, Claude Code seems to work fine. Is it my token being rejected?

mystic boneBOT
# gloomy urchin This bot was working fine with no major changes. I can ping anthropic, no ufw se...

Interesting - if Claude Code works but curl fails, it's likely an authentication or header issue, not a network block.

Anthropic API requires specific headers. Try:

# With proper headers (this is what Clawdbot uses)
curl -H "x-api-key: YOUR_ANTHROPIC_KEY" \
     -H "anthropic-version: 2023-06-01" \
     -H "content-type: application/json" \
     https://api.anthropic.com/v1/messages \
     -d '{"model":"claude-sonnet-4-20250514","max_tokens":10,"messages":[{"role":"user","content":"hi"}]}'

If that fails but Claude Code works:

  1. Claude Code might be using a different API key - Check which key Claude Code is using vs. your Clawdbot config
  2. Claude Code might have a proxy configured - Check env vars: env | grep -i proxy
#
  1. Clawdbot config might have wrong key - Compare:
    # Your Clawdbot model config
    cat ~/.clawdbot/clawdbot.json | grep -A5 model
    

Quick test: Is Claude Code using the same API key file or environment variable as Clawdbot? 🦐

gloomy urchin
#

it appears Anthropic has revoked that oauth token. running claude setup-token no longer shows you the token to copy an paste.

mystic boneBOT
#
  1. Restart gateway:
    clawdbot gateway restart
    

Note: Use an API key (starts with sk-ant-api03-) rather than OAuth. OAuth tokens can expire/revoke; API keys are more stable for bot use.

Let me know once you've added the new key and if it's working! 🦐

gloomy urchin
#

Anthropic killed oauth tokens for use with moltbot. You should update the docs/setup wizard.