Hello,

Recently I was trying to integrate Guacamole into my Spring application, but I encountered a Guacamole Exception just like in the description.

I create tunnel just like in guide:

protected GuacamoleTunnel doConnect(HttpServletRequest request)
        throws GuacamoleException {

        // Create our configuration
        GuacamoleConfiguration config = new GuacamoleConfiguration();
        config.setProtocol("vnc");
        config.setParameter("hostname", "localhost");
        config.setParameter("port", "5901");
        config.setParameter("password", "potato");

        // Connect to guacd - everything is hard-coded here.
        GuacamoleSocket socket = new ConfiguredGuacamoleSocket(
                new InetGuacamoleSocket("localhost", 4822),
                config
        );

        // Return a new tunnel which uses the connected socket
        return new SimpleGuacamoleTunnel(socket);;


Except in socket creation I mention my docker image of guacamole client instead 
of localhost and 4822 as arguments. When I use this address in web browser the 
guacamole
user interface pops out and it works just fine - I can connect to remote 
desktops via VNC.

I think the address I put in there isn't the one. I tried putting there the 
guacamole API address from the same docker image but with no use too.

There may be a problem as well with me invoking the connect method:

        public String VNC(HttpServletRequest request, String IP)
        {
                GuacamoleConnector guacConnect = new GuacamoleConnector();

                GuacamoleTunnel tunnel = guacConnect.doConnect(request,IP);
                request.setAttribute("tunnel", tunnel);
        }

But this exception really doesn't tell me what is going on, so I'd appreciate 
some clue on the case.

Kind regards,
Michael

Reply via email to