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

tunnel.uuid not initialized if tunnel becomes UNSTABLE

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0
    • 1.2.0
    • guacamole-common-js
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment