You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by zhangbin <zh...@iat.one> on 2018/02/03 04:19:14 UTC

答复: guacamole behind haproxy

Here's my ajax request method:

         

 

var gua;

 

function getGuacamole(){

    var ajaxURL = "http://10.128.0.211:8080/apis/api/tokens";

         var userparams = {

                   "username":"guacadmin",

                   "password":"guacadmin"

         };

         

    $.ajax({

        type:"POST",

        url:ajaxURL,

        headers:{

                            "Access-Control-Allow-Headers":"X-Requested-With",

                            "Access-Control-Allow-Methods":"GET,POST,OPTIONS",

                            "Access-Control-Allow-Origin":"*",

                            "ACCEPT":"application/json, text/plain, */*",

           "Content-Type":"application/x-www-form-urlencoded"

        },

        data:JSON.stringify(userparams),

        dataType:"JSON",

        success: function(data){

            //console.log(data);

           

        },

        error: function(data){

            

        }

    })

 

}

 

发件人: Nick Couchman [mailto:vnick@apache.org] 
发送时间: 当前系统时间为:2018年2月3日 12:14
收件人: user@guacamole.apache.org
主题: Re: guacamole behind haproxy

 

On Fri, Feb 2, 2018 at 3:42 AM, StephenDart <stephen.dart@gmail.com <ma...@gmail.com> > wrote:

Will post the config when i am back home, but actually there is only one
backend so sticky sessions arent a problem, there is only one possible in
the config to go to.
Any traffic for /guacamole will go to a single server.

I think there must be something regarding how haproxy maybe waits for a
session to complete, I had hoped that the http-server-close may have helped
but it doesnt appear to.

 

This really shouldn't impact the API at all - at least, you shouldn't see any 404 errors or anything like that.  I'm not sure about the actual connection stream, though.

 

Two things come to mind:

- Some sort of incompatibility in how HAProxy handles WebSocket traffic, particularly if it is trying to establish it and then dropping it.  I'm not sure off the top of my head if HAProxy supports, doesn't support, or is ignorant of the use of WebSocket.

- A parameter is being dropped from one of the API or tunnel calls, like the token, somewhere along the way - perhaps in HAProxy somewhere.

 

-Nick