Skip to contentSkip to navigationSkip to topbar
Page toolsOn this pageProducts used
Looking for more inspiration?Visit the

31904: Stream - WebSocket - Host Unreachable


ERROR: 31904

error-31904 page anchor
VOICE
ERROR

Twilio returns this error when it cannot create the Media Streams WebSocket connection because the host in your Stream url is unreachable. Twilio connects to Media Streams over wss, and your WebSocket endpoint must be reachable from the public internet.

Possible causes

possible-causes page anchor
  • The Stream url points to the wrong hostname or IP address.
  • The hostname resolves to a private or otherwise non-routable IP address.
  • Your WebSocket server is down or no longer connected to the internet.
  • A firewall rule blocks secure WebSocket traffic on TCP port 443 between Twilio and your WebSocket server.
  • Confirm that the Stream url is correct and uses wss. Update the hostname or IP address if it does not resolve to the server that should receive the stream.
  • Replace private, internal, or non-routable addresses with a publicly reachable endpoint.
  • Verify that your WebSocket server is running and reachable from the public internet.
  • Update your firewall rules to allow secure WebSocket connections on TCP port 443 from Twilio to your WebSocket server.

Additional resources

additional-resources page anchor