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. WebSocket functionality must
be enabled for Zeppelin UI (<role>ZEPPELINUI</role>
) service
definition to work.
Task
In
/conf/gateway-site.xml
, changegateway.websocket.feature.enabled
totrue
:<property> <name>gateway.websocket.feature.enabled</name> <value>true</value> <description>Enable/Disable websocket feature.</description> </property>
In
/conf/{topology}.xml
, change the topology rule:<service> <role>WEBSOCKET</role> <url>ws://
myhost:9999
/ws</url> </service>Restart the gateway:
cd $gateway bin/gateway.sh stop bin/gateway.sh start