Security
Also available as:
PDF
loading table of contents...

Enable WebSockets

Enabling WebSockets for Knox allows you to proxy applications that use WebSocket connections (e.g., Zeppelin.)

About This Task

WebSocket is a communication protocol that allows full duplex communication over single TCP connection. Knox provides out-of-the-box support for WebSocket protocol, but currently, only text-based messages are supported.

By default, WebSocket functionality is disabled.

Task

  1. In /conf/gateway-site.xml, change gateway.websocket.feature.enabled to true:

    <property>
          <name>gateway.websocket.feature.enabled</name>
          <value>true</value>
          <description>Enable/Disable websocket feature.</description>
      </property>
  2. In /conf/{topology}.xml, change the topology rule:

     <service>
          <role>WEBSOCKET</role>
          <url>ws://myhost:9999/ws</url>
      </service>
  3. Restart the gateway:

    cd $gateway bin/gateway.sh stop bin/gateway.sh start