You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@guacamole.apache.org by "Mike Jumper (Jira)" <ji...@apache.org> on 2020/02/11 02:36:00 UTC

[jira] [Updated] (GUACAMOLE-846) tunnel.uuid not initialized if tunnel becomes UNSTABLE

     [ https://issues.apache.org/jira/browse/GUACAMOLE-846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Jumper updated GUACAMOLE-846:
----------------------------------
    Fix Version/s: 1.2.0

> tunnel.uuid not initialized if tunnel becomes UNSTABLE
> ------------------------------------------------------
>
>                 Key: GUACAMOLE-846
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-846
>             Project: Guacamole
>          Issue Type: Bug
>          Components: guacamole-common-js
>    Affects Versions: 1.0.0
>            Reporter: avwx
>            Priority: Major
>             Fix For: 1.2.0
>
>
> 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:
> {code:javascript}
> if (tunnel.state === Guacamole.Tunnel.State.CONNECTING || tunnel.uuid === null) {
> {code}
>  
>  I'm happy to provide a PR if this sounds reasonable.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)