Common Issues
Common Issues
Section titled “Common Issues”Participant Shows as Offline
Section titled “Participant Shows as Offline”Symptoms:
- participant joined successfully but shows as offline
- requests fail because no participant is available
Causes and solutions:
-
Health checks are failing.
- The participant sends a heartbeat every 10 seconds.
- If the hub misses them for 30 seconds, the participant is marked offline.
- Check whether the
gambi participant joinprocess is still running.
-
The participant tunnel is disconnected.
- A participant is only routable while its tunnel is connected.
- Restart
gambi participant join. - Check whether a firewall or proxy is blocking WebSocket upgrades.
-
The hub is unreachable.
curl http://hub-ip:3000/v1/healthConnection Timeout
Section titled “Connection Timeout”Symptoms:
- requests hang and eventually time out
- you see
ETIMEDOUTorECONNREFUSED
Causes and solutions:
- The hub is not running.
gambi hub serve --port 3000-
The participant can reach the hub over HTTP, but the tunnel upgrade is blocked.
- Test without an intermediate reverse proxy.
- If you are using nginx, Caddy, or another proxy, ensure WebSocket upgrade headers are passed through.
-
The wrong hub URL is configured.
mDNS Discovery Not Working
Section titled “mDNS Discovery Not Working”Symptoms:
- discovery helpers do not find any hubs
- no rooms are discovered on the local network
Causes and solutions:
- mDNS is not enabled.
gambi hub serve --mdns-
Machines are on different network segments.
-
UDP port 5353 is blocked.
CORS Errors
Section titled “CORS Errors”Symptoms:
- browser console shows CORS errors
- Node.js usage works but browser usage does not
Causes and solutions:
- A custom proxy is stripping CORS headers.
- A custom proxy is also stripping WebSocket upgrade headers needed for participant tunnels.
Request Goes To The Wrong Participant
Section titled “Request Goes To The Wrong Participant”Symptoms:
- a request routes to a different participant than expected
Causes and solutions:
-
gambi.model("llama3")routes to the first available participant with that model.- Use
gambi.participant("worker-1")for exact targeting.
- Use
-
The intended participant is offline, busy, or tunnel-disconnected.
Participant Reports tunnel_failed or heartbeat_failed
Section titled “Participant Reports tunnel_failed or heartbeat_failed”Symptoms:
gambi participant join --format ndjsonemits atunnel_failedevent and exitsgambi participant join --format ndjsonemits aheartbeat_failedevent and exits- a custom runtime built on
createParticipantSession()reports a close reason of"tunnel_closed"or"heartbeat_failed"
These are distinct failure modes. Diagnose by the lifecycle event or close reason.
tunnel_failed / close reason "tunnel_closed"
Section titled “tunnel_failed / close reason "tunnel_closed"”The WebSocket tunnel to the hub was interrupted. Common causes:
- A proxy between the participant and the hub is stripping
Upgrade: websocket. Test by pointing the participant directly at the hub, bypassing the proxy. - The hub process was restarted or crashed. Check hub logs and retry.
- The bootstrap token expired before the participant finished upgrading. The token has a 60-second TTL; a stalled or slow network can miss that window. Re-running
gambi participant joinissues a new token. - The hub evicted the previous tunnel because the same participant id reconnected from elsewhere. Decide whether you intend to run two runtimes with the same id and pick a different id if not.
heartbeat_failed
Section titled “heartbeat_failed”The management HTTP heartbeat loop failed repeatedly. This is about HTTP reachability to /v1, not the WebSocket path. Common causes:
- The hub URL is wrong or stale.
- A proxy or firewall is blocking
POST /v1/rooms/:code/participants/:id/heartbeat. - The room or participant was deleted from the hub while the runtime was still running. Check with
gambi room getandgambi participant joinagain.
In both cases, the runtime removes itself from the room as a best effort when it can, so restarting is a safe operation.
High Latency
Section titled “High Latency”Symptoms:
- requests take much longer than expected
- streaming feels slow
Causes and solutions:
- Network latency between participant and hub.
- Slow provider or model.
- Too many requests targeting too few participants.
Watch room events and look at llm.complete.metrics to inspect:
ttftMsdurationMstokensPerSecond
Still Having Issues?
Section titled “Still Having Issues?”- Check hub logs:
DEBUG=* gambi hub serve- Test the provider endpoint directly:
curl http://localhost:11434/v1/responses \ -H "Content-Type: application/json" \ -d '{"model": "llama3", "input": "Hi"}'- Open an issue on GitHub with:
- the error message
- steps to reproduce
- environment details