You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by "McRoy, Jeffrey (GE Healthcare)" <Je...@ge.com> on 2018/08/02 20:17:54 UTC

Protocol plugin error messages at the Javascript client level

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?

 

Thanks,

Jeff

 


Re: Protocol plugin error messages at the Javascript client level

Posted by Mike Jumper <mj...@apache.org>.
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/Guacamole.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