Uploaded image for project: 'Guacamole'
  1. Guacamole
  2. GUACAMOLE-846

tunnel.uuid not initialized if tunnel becomes UNSTABLE

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.2.0
    • Component/s: guacamole-common-js
    • Labels:
      None

      Description

      We are operating a distributed system with a single MySQL server running in one geographical region and multiple Guacamole nodes running in many locations worldwide. We noticed that some Guacamole instances were not able to use the file upload feature. The POST request for the upload would always return a 404 error and after further inspection, we noticed that the tunnel id used in the post request was null (e.g. https://myguacamole.com/api/session/tunnels/null/streams/1/filename.png?token=...)

      After digging into the guacamole-common-js code some more, we noticed that the tunnel uuid is only set if the tunnel is in the CONNECTING state (https://github.com/apache/guacamole-client/blob/master/guacamole-common-js/src/main/webapp/modules/Tunnel.js#L1018). In our case, the round-trip to the MySQL server adds a significant latency to the tunnel opening and the tunnel switches into the UNSTABLE state before the tunnel UUID is transferred. Therefore, the tunnel UUID is never set and any file upload fails.

      I'm proposing to change the previously linked to condition to the following:

      if (tunnel.state === Guacamole.Tunnel.State.CONNECTING || tunnel.uuid === null) {
      

       
      I'm happy to provide a PR if this sounds reasonable.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              avwx avwx
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: