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

For websocket connections, backend url generated is incorrect - has an extra '/' in path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0, 1.1.0, 1.2.0, 1.3.0
    • 1.4.0
    • Server
    • None
    • HDP 3.1.0

    Description

      For websocket connections, while generating backend url in org.apache.knox.gateway.websockets.GatewayWebsocketHandler (getMatchedBackendURL() API), Knox appends 'pathservice[1]' to 'backend' StringBuffer if Service url doesn't end with '/ws'. As a result, URI generated had an extra '/' eg: ws://rafd001-mst-01.cloud.in.guavus.com:11011//_sock/411/anq2kfzp/websocket and my UI backend which uses SockJS lib was not responding for 2 minutes and eventually closing connection.

      Correct Url which should have been generated is: ws://rafd001-mst-01.cloud.in.guavus.com:11011/_sock/411/anq2kfzp/websocket

      Attachments

        1. KNOX-1996.patch
          20 kB
          Rajat Goel

        Issue Links

          Activity

            People

              rajatg Rajat Goel
              rajatg Rajat Goel
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 5h
                  5h