guacamole-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Jumper <mjum...@apache.org>
Subject Re: Protocol plugin error messages at the Javascript client level
Date Thu, 09 Aug 2018 18:01:28 GMT
I think this may be due to the way Guacamole currently handles SSH and
telnet. Unlike VNC and RDP, where no display is given to the client until
the connection is established, both SSH and telnet provide a display with a
terminal while waiting for the connection to happen. From the perspective
of the failover socket, the connection has succeeded.

- Mike


On Tue, Aug 7, 2018 at 6:10 AM, McRoy, Jeffrey (GE Healthcare) <
Jeffrey.McRoy@ge.com> wrote:

> 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.
>
>
>
> -Jeff
>
>
>
>
>
> try{
>
> …
>
> 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.createUnableToConnectToGuacamoleExcep
> tion(ex);
>
> } catch (Exception ex) {
>
> LOGGER.error("Exception", ex);
>
> throw RemoteConnectException.createUnableToConnectToGuacamoleExcep
> tion(ex);
>
> }
>
>
>
> LOGGER.debug("Is Tunnel Open: " + tunnel.isOpen());
>
> LOGGER.debug("Successfully created gaucamole tunnel");
>
>
>
>
>
> *From: *Mike Jumper <mjumper@apache.org>
> *Reply-To: *"user@guacamole.apache.org" <user@guacamole.apache.org>
> *Date: *Thursday, August 2, 2018 at 9:14 PM
> *To: *"user@guacamole.apache.org" <user@guacamole.apache.org>
> *Subject: *EXT: Re: Protocol plugin error messages at the Javascript
> client level
>
>
>
> On Thu, Aug 2, 2018, 13:18 McRoy, Jeffrey (GE Healthcare) <
> Jeffrey.McRoy@ge.com> 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:
>
>
>
> http://guacamole.apache.org/doc/gug/protocol-reference.html#
> error-instruction
>
>
>
> http://guacamole.apache.org/doc/guacamole-common-js/Guacamol
> e.Client.html#event:onerror
>
>
>
> 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:
>
>
>
> http://guacamole.apache.org/doc/guacamole-common/org/apache/
> guacamole/protocol/FailoverGuacamoleSocket.html
>
>
>
> - Mike
>
>
>

Mime
View raw message