This guide covers common issues when working with Rhombus WebSocket connections and how to resolve them.Documentation Index
Fetch the complete documentation index at: https://api-docs.rhombus.community/llms.txt
Use this file to discover all available pages before exploring further.
Connection Issues
Unable to Connect (Connection Refused)
Symptoms: WebSocket handshake fails immediately with a connection error. Possible Causes:- Firewall blocking outbound connections on port 8443
- Incorrect hostname
- Verify outbound access to
ws.rhombussystems.comon port8443: - Check that your network/firewall allows outbound WSS on port 8443
- If behind a corporate proxy, ensure WebSocket upgrade requests are permitted
HTTP 401 Unauthorized
Symptoms: WebSocket handshake fails with HTTP 401. Possible Causes:- Invalid API token
- Expired API token
- Missing
x-auth-apikeyheader
- Verify your API token works with the REST API:
- Regenerate the token in the Rhombus console under Settings > API Access
- Ensure the
x-auth-apikeyheader is set (not just the query parameter)
HTTP 403 Forbidden
Symptoms: WebSocket handshake fails with HTTP 403. Possible Causes:- API token lacks permissions for WebSocket access
- Partner token used without specifying the target organization
- Token does not have access to the specified organization
- Check token permissions in the Rhombus console
- If using a partner token, ensure you include
x-auth-orgquery parameter:
Certificate-Based Auth Not Working
Symptoms: Connection fails when using mTLS certificates. Cause: WebSocket connections do not support certificate-based authentication. Solution: Generate an API token for WebSocket connections. Certificate auth is only supported for the REST API.STOMP Protocol Issues
CONNECTED Frame Never Received
Symptoms: WebSocket connects successfully, but no STOMPCONNECTED response after sending CONNECT.
Possible Causes:
- Malformed STOMP
CONNECTframe - Missing null terminator (
\x00) - Incorrect
accept-versionvalue
- Verify your frame includes the null byte terminator:
- Ensure there is an empty line (
\n\n) between headers and body - Use
accept-version:1.2(not1.0or1.1)
No Messages Received After Subscribing
Symptoms: Connection and subscription succeed, but no MESSAGE frames arrive. Possible Causes:- Incorrect organization UUID in the topic
- No events occurring in the organization
- Subscription frame malformed
- Verify your org UUID by calling the REST API:
- Trigger a test event (e.g., adjust a camera setting) to confirm the stream is active
- Verify the topic format is exactly
/topic/change/{orgUuid}with no trailing slashes or spaces
Connection Stability Issues
Connection Drops Every ~30 Seconds
Symptoms: WebSocket connection closes after approximately 30 seconds of inactivity. Cause: Heartbeats are not being sent. Solution: Implement the heartbeat sender that sends\n every 10 seconds:
Connection Drops Intermittently
Symptoms: Connection works for a while then drops unpredictably. Possible Causes:- Network instability
- Server-side maintenance
- Load balancer timeout
- Implement automatic reconnection with backoff:
- Log disconnection reasons to identify patterns
- Monitor heartbeat receipt to detect dead connections proactively
High Memory Usage Over Time
Symptoms: Application memory grows steadily while connected. Possible Causes:- Events accumulating in an unbounded queue
- Not processing messages fast enough
- Use bounded message buffers:
- Process events asynchronously to prevent backpressure
- Drop or log events if the processing queue is full
Event Processing Issues
Missing Events
Symptoms: Some events that appear in the Rhombus console don’t appear in the WebSocket stream. Possible Causes:- Event filtering is too aggressive
- Brief disconnection caused missed events
- Event occurred before subscription was established
- Temporarily enable all events to verify the stream:
- WebSocket events are real-time only. For historical events, use the REST API
- Ensure SUBSCRIBE is sent before expecting events
Malformed JSON in Event Body
Symptoms:json.loads() fails on MESSAGE body.
Possible Causes:
- Frame parser not correctly separating body from headers
- Null bytes or extra whitespace in the body
- Strip null bytes before parsing:
- Verify your frame parser splits on
\n\ncorrectly (first occurrence only)
Debugging Tools
Enable Raw Frame Logging
Add logging to see exactly what’s being sent and received:Test with websocat
Usewscat to manually interact with the WebSocket endpoint:
^@ represents the null byte (\x00). In most terminals, type Ctrl+@ or Ctrl+Shift+2 to produce it.Rhombus CLI Monitor
Use the Rhombus CLI to verify your account and WebSocket endpoint work:Getting Help
If you’ve tried the steps above and are still experiencing issues:- Check the Rhombus API documentation for updates
- Verify your Rhombus organization has WebSocket access enabled
- Contact Rhombus support with:
- Your organization UUID
- The error message or HTTP status code
- The timestamp of the failed connection attempt
- Your client language and WebSocket library version