guacamole-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "McRoy, Jeffrey (GE Healthcare)" <>
Subject Re: Protocol plugin error messages at the Javascript client level
Date Tue, 07 Aug 2018 13:10:45 GMT
For testing the response to different kinds of connection issues I implemented the FailoverGuacamoleSocket
class to intercept errors. I have come across a scenario where a telnet socket is being made,
but the telnet server stalls and never prompts for a login. In that case the connection times
out, but there doesn’t seem to be an exception thrown on the guac side.







GuacamoleSocket socket = new ConfiguredGuacamoleSocket(

new InetGuacamoleSocket(tunnelRequest.getGateWayHost(), tunnelRequest.getGateWayPort()), guacConfig);


FailoverGuacamoleSocket failoverGuacamoleSocket = new FailoverGuacamoleSocket(socket);


tunnel = new SimpleGuacamoleTunnel(failoverGuacamoleSocket);


} catch (GuacamoleUpstreamException ex) {

LOGGER.error("GuacamoleUpstreamException", ex);

LOGGER.error("Error occurred while establishing Guacamole connection", ex);

} catch (GuacamoleException ex) {

LOGGER.error("GuacamoleException", ex);

LOGGER.error("Error occurred while establishing Guacamole connection", ex);

throw RemoteConnectException.createUnableToConnectToGuacamoleException(ex);

} catch (Exception ex) {

LOGGER.error("Exception", ex);

throw RemoteConnectException.createUnableToConnectToGuacamoleException(ex);



LOGGER.debug("Is Tunnel Open: " + tunnel.isOpen());

LOGGER.debug("Successfully created gaucamole tunnel");



From: Mike Jumper <>
Reply-To: "" <>
Date: Thursday, August 2, 2018 at 9:14 PM
To: "" <>
Subject: EXT: Re: Protocol plugin error messages at the Javascript client level


On Thu, Aug 2, 2018, 13:18 McRoy, Jeffrey (GE Healthcare) <> wrote:

Hi Everyone,


At the Javascript client level, is it possible to get error messages from the protocol plugins?
GuacamoleSocket will return errors about making the connection to the server, but can you
programmatically determine if the server was able to connect to the remote system and login
successfully at the Javascript level?


Yes. Errors are communicated via the Guacamole protocol using the "error" instruction which
results in the Guacamole.Client onerror function being invoked:


You would need to provide a handler for onerror to handle such failures within JavaScript.


If you need to handle these failures on the server side (to failover to an alternative connection,
for example), the FailoverGuacamoleSocket class can be used to transparently intercept errors
that occur early in the connection and switch over to a different connection:


- Mike


View raw message