<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Knox + Zeppelin websocket problems in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Knox-Zeppelin-websocket-problems/m-p/240058#M201864</link>
    <description>&lt;P&gt;You were exactly correct, thanks again!&lt;/P&gt;&lt;P&gt;For others who might be using an NGINX proxy in front of Knox, the bolded below is what I had to add to me NGINX cfg for the proxy URL:&lt;/P&gt;&lt;P&gt;server {&lt;/P&gt;&lt;P&gt;    listen                   443 ssl;&lt;/P&gt;&lt;P&gt;    server_name              PROXIED_URL;&lt;/P&gt;&lt;P&gt;    ssl                      on;&lt;/P&gt;&lt;P&gt;    ssl_protocols            TLSv1.1 TLSv1.2;&lt;/P&gt;&lt;P&gt;    ssl_certificate          /etc/ssl/private/CORPORATE_CERT.crt;&lt;/P&gt;&lt;P&gt;    ssl_certificate_key      /etc/ssl/private/CORPORATE_CERT.key;&lt;/P&gt;&lt;P&gt;    location / {&lt;/P&gt;&lt;P&gt;       proxy_pass           &lt;A href="https://KNOX_HOST:8443" target="_blank"&gt;https://KNOX_HOST:8443&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;       &lt;STRONG&gt;proxy_http_version   1.1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;       proxy_set_header     Upgrade $http_upgrade;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;       proxy_set_header     Connection "upgrade";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;       proxy_read_timeout   86400;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;
}&lt;/P&gt;</description>
    <pubDate>Fri, 11 Jan 2019 14:06:21 GMT</pubDate>
    <dc:creator>douglasharley</dc:creator>
    <dc:date>2019-01-11T14:06:21Z</dc:date>
    <item>
      <title>Knox + Zeppelin websocket problems</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Knox-Zeppelin-websocket-problems/m-p/240055#M201861</link>
      <description>&lt;P&gt;I am attempting to configure Zeppelin behind Knox gateway running within an HDP 3.1.0 cluster with HDF 3.3.1 installed, all administered by Ambari 2.7.3. I am following the docs here: &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP3/HDP-3.1.0/configuring-proxy-knox/sec_configuring_proxy_knox.pdf" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP3/HDP-3.1.0/configuring-proxy-knox/sec_configuring_proxy_knox.pdf&lt;/A&gt;. As per the docs, I have set gateway.websocket.feature.enabled=true in Ambari's Knox configs, and when I access Zeppelin at the proxied URL I get the UI, saying the websocket is disconnected, and in the knox logs I see this:&lt;/P&gt;&lt;PRE&gt;2019-01-08 20:26:46,217 DEBUG knox.gateway (GatewayFilter.java:doFilter(119)) - Received request: GET /zeppelin/ws
2019-01-08 20:26:46,217 DEBUG knox.gateway (UrlRewriteProcessor.java:rewrite(163)) - Rewrote URL: &lt;A href="https://KNOXHOST:8443/gateway/CLUSTERNAME/zeppelin/ws" target="_blank"&gt;https://KNOXHOST:8443/gateway/CLUSTERNAME/zeppelin/ws&lt;/A&gt;, direction: IN via explicit rule: ZEPPELINWS/zeppelin/ws/inbound to URL: ws://ZEPPELINHOST:9995/ws/ws
2019-01-08 20:26:46,218 DEBUG knox.gateway (DefaultDispatch.java:executeOutboundRequest(121)) - Dispatch request: GET ws://ZEPPELINHOST:9995/ws/ws
2019-01-08 20:26:46,219 WARN  knox.gateway (DefaultDispatch.java:executeOutboundRequest(147)) - Connection exception dispatching request: ws://ZEPPELINHOST:9995/ws/ws org.apache.http.conn.UnsupportedSchemeException: ws protocol is not supported&lt;/PRE&gt;&lt;P&gt;Seeing the extra "ws" appended to the redirect URL, I add a pre-shortened URL to empty ZEPPELINWS service definition in the knox descriptor, to override the bad one:&lt;/P&gt;&lt;PRE&gt;ws://ZEPPELINHOST:9995&lt;/PRE&gt;&lt;P&gt;Then save descriptor/redeploy the topology and also restart knox, then I see essentially the same error, but with the correct URL now in the knox logs:&lt;/P&gt;&lt;PRE&gt;2019-01-08 20:41:12,796 DEBUG knox.gateway (GatewayFilter.java:doFilter(119)) - Received request: GET /zeppelin/ws
2019-01-08 20:41:12,798 DEBUG knox.gateway (UrlRewriteProcessor.java:rewrite(163)) - Rewrote URL: &lt;A href="https://KNOXHOST:8443/gateway/CLUSTERNAME/zeppelin/ws" target="_blank"&gt;https://KNOXHOST:8443/gateway/CLUSTERNAME/zeppelin/ws&lt;/A&gt;, direction: IN via explicit rule: ZEPPELINWS/zeppelin/ws/inbound to URL: ws://ZEPPELINHOST:9995/ws
2019-01-08 20:41:12,800 DEBUG knox.gateway (DefaultDispatch.java:executeOutboundRequest(121)) - Dispatch request: GET ws://ZEPPELINHOST:9995/ws
2019-01-08 20:41:12,802 WARN  knox.gateway (DefaultDispatch.java:executeOutboundRequest(147)) - Connection exception dispatching request: ws://ZEPPELINHOST:9995/ws org.apache.http.conn.UnsupportedSchemeException: ws protocol is not supported&lt;/PRE&gt;&lt;P&gt;Any ideas what my problem might be? I have been banging my head on this for almost a full day and not making any progress, so thanks in advance for any assistance...&lt;/P&gt;&lt;P&gt;-Doug&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 07:01:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Knox-Zeppelin-websocket-problems/m-p/240055#M201861</guid>
      <dc:creator>douglasharley</dc:creator>
      <dc:date>2019-01-09T07:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Knox + Zeppelin websocket problems</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Knox-Zeppelin-websocket-problems/m-p/240056#M201862</link>
      <description>&lt;DIV&gt;&lt;P&gt;Are you accessing Knox via a load balancer? I've seen something similar where there was a load balancer in front of Knox that didn't support websockets.&lt;/P&gt;&lt;P&gt;The documentation you are following might be incorrect too. The role name I think should be ZEPPELINWS based on &lt;A href="https://knox.apache.org/books/knox-1-2-0/user-guide.html#Zeppelin+UI" target="_blank"&gt;https://knox.apache.org/books/knox-1-2-0/user-guide.html#Zeppelin+UI&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 10 Jan 2019 02:17:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Knox-Zeppelin-websocket-problems/m-p/240056#M201862</guid>
      <dc:creator>risdenk</dc:creator>
      <dc:date>2019-01-10T02:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Knox + Zeppelin websocket problems</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Knox-Zeppelin-websocket-problems/m-p/240057#M201863</link>
      <description>&lt;P&gt;Aha, that might just be it... I do have NGINX in front of Knox, but just proxying it, not load-balancing. I bet you are right, and if I configure NGINX for web sockets it will work. I just got thrown-off my those Knox errors and didn't even think to check NGINX logs, herpderp! Yes, the role is ZEPPELINWS. I am in the middle of swapping-out the self-signed certs for corporate ones, but once I get that taken care of will do the NGINX cfg changes and if works will accept your answer. THANKS for the excellent reply!!!&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Doug&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 02:38:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Knox-Zeppelin-websocket-problems/m-p/240057#M201863</guid>
      <dc:creator>douglasharley</dc:creator>
      <dc:date>2019-01-10T02:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Knox + Zeppelin websocket problems</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Knox-Zeppelin-websocket-problems/m-p/240058#M201864</link>
      <description>&lt;P&gt;You were exactly correct, thanks again!&lt;/P&gt;&lt;P&gt;For others who might be using an NGINX proxy in front of Knox, the bolded below is what I had to add to me NGINX cfg for the proxy URL:&lt;/P&gt;&lt;P&gt;server {&lt;/P&gt;&lt;P&gt;    listen                   443 ssl;&lt;/P&gt;&lt;P&gt;    server_name              PROXIED_URL;&lt;/P&gt;&lt;P&gt;    ssl                      on;&lt;/P&gt;&lt;P&gt;    ssl_protocols            TLSv1.1 TLSv1.2;&lt;/P&gt;&lt;P&gt;    ssl_certificate          /etc/ssl/private/CORPORATE_CERT.crt;&lt;/P&gt;&lt;P&gt;    ssl_certificate_key      /etc/ssl/private/CORPORATE_CERT.key;&lt;/P&gt;&lt;P&gt;    location / {&lt;/P&gt;&lt;P&gt;       proxy_pass           &lt;A href="https://KNOX_HOST:8443" target="_blank"&gt;https://KNOX_HOST:8443&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;       &lt;STRONG&gt;proxy_http_version   1.1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;       proxy_set_header     Upgrade $http_upgrade;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;       proxy_set_header     Connection "upgrade";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;       proxy_read_timeout   86400;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;
}&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2019 14:06:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Knox-Zeppelin-websocket-problems/m-p/240058#M201864</guid>
      <dc:creator>douglasharley</dc:creator>
      <dc:date>2019-01-11T14:06:21Z</dc:date>
    </item>
  </channel>
</rss>

