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 with “No online participants”
Causes & Solutions:
-
Health check failing - The participant sends health checks every 10 seconds. If the hub doesn’t receive them for 30 seconds, the participant is marked offline.
- Check if the participant process is still running
- Check network connectivity between participant and hub
-
Firewall blocking traffic - Ensure the hub port (default 3000) is accessible.
Terminal window # Test connectivitycurl http://hub-ip:3000/rooms -
Wrong hub URL - Verify the participant is connecting to the correct hub.
Connection Timeout
Section titled “Connection Timeout”Symptoms:
- Requests hang and eventually timeout
- “ETIMEDOUT” or “ECONNREFUSED” errors
Causes & Solutions:
-
Hub not running - Start the hub first:
Terminal window gambi serve --port 3000 -
Wrong port - Ensure you’re using the same port everywhere.
-
Network issues - Check if machines can reach each other:
Terminal window ping hub-ip -
Participant published
localhostto a remote hub -localhostonly works on the participant machine itself.- Let Gambi auto-rewrite it in interactive mode
- Or pass
--network-endpoint http://<participant-lan-ip>:11434 - Use
--no-network-rewriteonly if you intentionally want to opt out
mDNS Discovery Not Working
Section titled “mDNS Discovery Not Working”Symptoms:
gambi listdoesn’t find any hubs- “No hubs found on network”
Causes & Solutions:
-
mDNS not enabled - Start the hub with
--mdnsflag:Terminal window gambi serve --mdns -
Different network segments - mDNS only works on the same local network segment. VPNs and different subnets won’t work.
-
Firewall blocking mDNS - mDNS uses UDP port 5353. Ensure it’s not blocked.
-
macOS/Linux permission issues - mDNS may require elevated privileges on some systems.
CORS Errors
Section titled “CORS Errors”Symptoms:
- Browser console shows CORS errors
- SDK works from Node.js but not from browser
Causes & Solutions:
Gambi’s hub includes CORS headers by default. If you’re still seeing errors:
-
Custom proxy interfering - If using a reverse proxy (nginx, Caddy), ensure it passes CORS headers.
-
Different origin - The SDK must be served from the same origin or the hub must allow the origin.
Request Goes to Wrong Participant
Section titled “Request Goes to Wrong Participant”Symptoms:
- Request goes to a different participant than expected
gambi.model("llama3")routes to wrong endpoint
Causes & Solutions:
-
Multiple participants with same model - When using
gambi.model(), it routes to the first online participant with that model. Usegambi.participant()for specific targeting. -
Participant went offline - The routing falls back to available participants.
SDK Not Finding Hub
Section titled “SDK Not Finding Hub”Symptoms:
- “Failed to connect to hub” errors
- SDK initialization fails
Causes & Solutions:
-
Wrong hubUrl - Ensure the URL is correct:
const gambi = createGambi({roomCode: "ABC123",hubUrl: "http://192.168.1.100:3000", // Include protocol and port}); -
Hub on different network - If using mDNS, both SDK and hub must be on the same network.
High Latency
Section titled “High Latency”Symptoms:
- Requests take much longer than expected
- Streaming feels slow
Causes & Solutions:
-
Network latency - Check ping times between machines.
-
LLM endpoint slow - The bottleneck is usually the LLM itself, not Gambi.
-
Too many concurrent requests - Consider adding more participants to distribute load.
Still Having Issues?
Section titled “Still Having Issues?”-
Check logs - Run the hub with verbose output:
Terminal window DEBUG=* gambi serve -
Test endpoint directly - Verify the LLM endpoint works:
Terminal window curl http://localhost:11434/v1/responses \-H "Content-Type: application/json" \-d '{"model": "llama3", "input": "Hi"}' -
Open an issue - If the problem persists, open an issue on GitHub with:
- Error message
- Steps to reproduce
- Environment (OS, Node version, LLM provider)