Uploaded image for project: 'Apache Knox'
  1. Apache Knox
  2. KNOX-950

wss:// in service causes "Bad or malformed url" exception - Websockets

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.13.0
    • None
    • None

    Description

      When wss:// protocol is used for websocket then the following error is thrown

      (GatewayWebsocketHandler.java:getMatchedBackendURL(202)) - Bad or malformed url: java.net.MalformedURLException: unknown protocol: wss
      java.net.MalformedURLException: unknown protocol: wss
      	at java.net.URL.<init>(URL.java:600)
      	at java.net.URL.<init>(URL.java:490)
      	at java.net.URL.<init>(URL.java:439)
      	at org.apache.hadoop.gateway.websockets.GatewayWebsocketHandler.getMatchedBackendURL(GatewayWebsocketHandler.java:185)
      	at org.apache.hadoop.gateway.websockets.GatewayWebsocketHandler.createWebSocket(GatewayWebsocketHandler.java:135)
      	at org.eclipse.jetty.websocket.server.WebSocketServerFactory.acceptWebSocket(WebSocketServerFactory.java:166)
      	at org.eclipse.jetty.websocket.server.WebSocketServerFactory.acceptWebSocket(WebSocketServerFactory.java:153)
      	at org.eclipse.jetty.websocket.server.WebSocketHandler.handle(WebSocketHandler.java:97)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:499)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
      	at java.lang.Thread.run(Thread.java:748)
      

      ws:// works as expected.

      Attachments

        1. KNOX-950.001.patch
          1 kB
          Sandeep More

        Activity

          People

            smore Sandeep More
            smore Sandeep More
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: