You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Martin Krellmann <ma...@krellmann.net.INVALID> on 2021/06/21 10:04:50 UTC

Websocket Endpoint missing

Hello Guacamole community.

 
I have a strange problem regarding WebSocket Support: While the log claims it is loaded there is simply no “/guacamole/websocket-tunnel” endpoint available.
I have checked this several times directly from the CLI of the docker container. It returns a 404.

Since if have installed guacamole via the Univention appcenter in the first place, I have updated it now to the latest docker images available. The problem remains.

However, the configuration still uses the LDAP Backend of univention. Which works fine for the HTTP tunnel, but as no websocket-tunnel endpoint is provided in Tomcat it couldn’t use it. To clarify again… This is not a reverse proxy issue. The endpoint is already not available in tomcat (checked from the CLI).

 
As I am stuck at this point I ask you for some hint. 

 
I have created a startup log in DEBUG mode, not sure if anyone can see a related issue here.

 
Any help is appreciated.

 
Thanks,

Martin.

 
Log:

 
Archive:  /opt/guacamole/guacamole.war

  inflating: /root/.guacamole/logback.xml  

20-Jun-2021 13:31:21.959 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name:   Apache Tomcat/8.5.68

20-Jun-2021 13:31:21.963 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jun 11 2021 13:32:01 UTC

20-Jun-2021 13:31:21.963 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 8.5.68.0

20-Jun-2021 13:31:21.964 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux

20-Jun-2021 13:31:21.964 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            4.9.0-13-amd64

20-Jun-2021 13:31:21.965 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64

20-Jun-2021 13:31:21.965 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/local/openjdk-8/jre

20-Jun-2021 13:31:21.966 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_292-b10

20-Jun-2021 13:31:21.966 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation

20-Jun-2021 13:31:21.966 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /usr/local/tomcat

20-Jun-2021 13:31:21.967 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/local/tomcat

20-Jun-2021 13:31:21.969 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties

20-Jun-2021 13:31:21.969 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

20-Jun-2021 13:31:21.969 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048

20-Jun-2021 13:31:21.970 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources

20-Jun-2021 13:31:21.970 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027

20-Jun-2021 13:31:21.970 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=

20-Jun-2021 13:31:21.970 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat

20-Jun-2021 13:31:21.970 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat

20-Jun-2021 13:31:21.970 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp

20-Jun-2021 13:31:21.970 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.30] using APR version [1.6.5].

20-Jun-2021 13:31:21.971 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].

20-Jun-2021 13:31:21.972 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]

20-Jun-2021 13:31:21.976 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1d  10 Sep 2019]

20-Jun-2021 13:31:22.092 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]

20-Jun-2021 13:31:22.110 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read

20-Jun-2021 13:31:22.132 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 917 ms

20-Jun-2021 13:31:22.184 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]

20-Jun-2021 13:31:22.185 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/8.5.68]

20-Jun-2021 13:31:22.218 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/usr/local/tomcat/webapps/guacamole.war]

20-Jun-2021 13:31:23.879 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

13:31:24.214 [localhost-startStop-1] INFO  o.a.g.environment.LocalEnvironment - GUACAMOLE_HOME is "/root/.guacamole".

13:31:24.359 [localhost-startStop-1] INFO  o.a.g.rest.auth.HashTokenSessionMap - Sessions will expire after 60 minutes of inactivity.

13:31:24.451 [localhost-startStop-1] INFO  org.apache.guacamole.log.LogModule - Loading logback configuration from "/root/.guacamole/logback.xml".

13:31:24.520 [localhost-startStop-1] DEBUG o.a.g.e.LanguageResourceService - Added language: "nl"

13:31:24.520 [localhost-startStop-1] DEBUG o.a.g.e.LanguageResourceService - Added language: "cs"

13:31:24.521 [localhost-startStop-1] DEBUG o.a.g.e.LanguageResourceService - Added language: "en"

13:31:24.521 [localhost-startStop-1] DEBUG o.a.g.e.LanguageResourceService - Added language: "zh"

13:31:24.521 [localhost-startStop-1] DEBUG o.a.g.e.LanguageResourceService - Added language: "fr"

13:31:24.522 [localhost-startStop-1] DEBUG o.a.g.e.LanguageResourceService - Added language: "ca"

13:31:24.522 [localhost-startStop-1] DEBUG o.a.g.e.LanguageResourceService - Added language: "ru"

13:31:24.522 [localhost-startStop-1] DEBUG o.a.g.e.LanguageResourceService - Added language: "de"

13:31:24.523 [localhost-startStop-1] DEBUG o.a.g.e.LanguageResourceService - Added language: "ja"

13:31:24.523 [localhost-startStop-1] DEBUG o.a.g.e.LanguageResourceService - Added language: "no"

13:31:24.523 [localhost-startStop-1] DEBUG o.a.g.e.LanguageResourceService - Added language: "es"

13:31:24.523 [localhost-startStop-1] DEBUG o.a.g.e.LanguageResourceService - Added language: "it"

13:31:24.525 [localhost-startStop-1] DEBUG o.a.g.extension.ExtensionModule - Loading extension: "guacamole-auth-ldap-1.3.0.jar"

13:31:24.567 [localhost-startStop-1] DEBUG o.a.g.extension.ExtensionModule - [0] Binding AuthenticationProvider "org.apache.guacamole.auth.ldap.LDAPAuthenticationProvider".

13:31:24.575 [localhost-startStop-1] INFO  o.a.g.environment.LocalEnvironment - GUACAMOLE_HOME is "/root/.guacamole".

13:31:24.975 [localhost-startStop-1] WARN  o.a.g.e.LanguageResourceService - Overlay language resource "de" does not exist.

13:31:25.032 [localhost-startStop-1] DEBUG o.a.g.e.LanguageResourceService - Merged strings with existing language: "zh"

13:31:25.043 [localhost-startStop-1] DEBUG o.a.g.e.LanguageResourceService - Merged strings with existing language: "en"

13:31:25.043 [localhost-startStop-1] INFO  o.a.g.extension.ExtensionModule - Extension "LDAP Authentication" loaded.

13:31:25.045 [localhost-startStop-1] DEBUG o.a.g.extension.ExtensionModule - [1] Binding AuthenticationProvider "org.apache.guacamole.auth.file.FileAuthenticationProvider".

13:31:25.046 [localhost-startStop-1] INFO  o.a.g.environment.LocalEnvironment - GUACAMOLE_HOME is "/root/.guacamole".

13:31:25.275 [localhost-startStop-1] INFO  o.a.g.t.w.WebSocketTunnelModule - Loading JSR-356 WebSocket support...

13:31:25.304 [localhost-startStop-1] DEBUG o.a.guacamole.tunnel.TunnelModule - WebSocket module loaded: org.apache.guacamole.tunnel.websocket.WebSocketTunnelModule

20-Jun-2021 13:31:25.861 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.register Registering org.apache.guacamole.rest.RESTExceptionMapper as a provider class

20-Jun-2021 13:31:25.862 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.register Registering org.apache.guacamole.rest.extension.ExtensionRESTService as a root resource class

20-Jun-2021 13:31:25.862 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.register Registering org.apache.guacamole.rest.language.LanguageRESTService as a root resource class

20-Jun-2021 13:31:25.862 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.register Registering org.apache.guacamole.rest.patch.PatchRESTService as a root resource class

20-Jun-2021 13:31:25.862 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.register Registering org.apache.guacamole.rest.auth.TokenRESTService as a root resource class

20-Jun-2021 13:31:25.862 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.register Registering org.apache.guacamole.rest.session.SessionRESTService as a root resource class

20-Jun-2021 13:31:25.862 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.register Registering org.codehaus.jackson.jaxrs.JacksonJsonProvider as a provider class

20-Jun-2021 13:31:25.869 INFO [localhost-startStop-1] com.sun.jersey.server.impl.application.WebApplicationImpl._initiate Initiating Jersey application, version 'Jersey: 1.17.1 02/28/2013 12:47 PM'

20-Jun-2021 13:31:25.989 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.getComponentProvider Binding org.apache.guacamole.rest.RESTExceptionMapper to GuiceManagedComponentProvider with the scope "Singleton"

20-Jun-2021 13:31:25.993 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.getComponentProvider Binding org.codehaus.jackson.jaxrs.JacksonJsonProvider to GuiceManagedComponentProvider with the scope "Singleton"

[1]

021 13:31:26.686 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.getComponentProvider Binding org.apache.guacamole.rest.extension.ExtensionRESTService to GuiceManagedComponentProvider with the scope "PerRequest"

20-Jun-2021 13:31:26.693 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.getComponentProvider Binding org.apache.guacamole.rest.language.LanguageRESTService to GuiceManagedComponentProvider with the scope "PerRequest"

20-Jun-2021 13:31:26.698 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.getComponentProvider Binding org.apache.guacamole.rest.patch.PatchRESTService to GuiceManagedComponentProvider with the scope "PerRequest"

20-Jun-2021 13:31:26.707 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.getComponentProvider Binding org.apache.guacamole.rest.auth.TokenRESTService to GuiceManagedComponentProvider with the scope "PerRequest"

20-Jun-2021 13:31:26.711 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.getComponentProvider Binding org.apache.guacamole.rest.session.SessionRESTService to GuiceManagedComponentProvider with the scope "PerRequest"

20-Jun-2021 13:31:26.735 INFO [localhost-startStop-1] org.webjars.servlet.WebjarsServlet.init WebjarsServlet initialization completed

20-Jun-2021 13:31:26.766 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/usr/local/tomcat/webapps/guacamole.war] has finished in [4,548] ms

20-Jun-2021 13:31:26.769 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]

20-Jun-2021 13:31:26.781 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 4647 ms

Re: Websocket Endpoint missing

Posted by Nick Couchman <vn...@apache.org>.
On Thu, Jun 24, 2021 at 5:30 AM Martin Krellmann
<ma...@krellmann.net.invalid> wrote:

> Hello Mike,
>
>
>
> thanks for your reply.
>
>
>
>    - The endpoint is definitely available. You are seeing a 404 because
>    it is a WebSocket endpoint, not an HTTP endpoint, and Tomcat is refusing to
>    continue routing the request without the correct headers.
>
>
>
> Okay you are right, I’ve checked the situation from the internal network
> with direct access to the docker container running guacamole. It uses the
> websocket tunnel then…
>
> However, I must say that the error message returned at a direct access to
> the uri (/guacamole/websocket-tunnel) is misleading. A 404 means “the
> resource does not exist or was not found” by definition. Because WebSocket
> connections are simply an upgrade of the http connect, it should instead
> return 400 “bad request” as the http endpoint (/guacamole/tunnel) indeed
> does!
>
> I have actually searched in the wrong place because of this 404 return
> code for a couple of days now.
>
>
>

This you'd need to take up with the Tomcat developers, as the 404 error
isn't generated by Guacamole, it's generated by Tomcat. I assume that they
have a good reason for doing things this way, but, as I've no familiarity
with Tomcat internals/development, I don't know.


> I’ll check what might be the problem with the ReverseProxy. As I have
> actually configured it like the doc states, I’m a bit curious what the
> problem could be. But let’s see…
>
>
>

Are you actually seeing that WebSockets is not used by the connections? Are
you seeing warnings that it is falling back to HTTP because WebSockets is
not available??

-Nick

AW: Websocket Endpoint missing

Posted by Martin Krellmann <ma...@krellmann.net.INVALID>.
Hello Mike,

 
thanks for your reply.

 
*	The endpoint is definitely available. You are seeing a 404 because it is a WebSocket endpoint, not an HTTP endpoint, and Tomcat is refusing to continue routing the request without the correct headers.

 
Okay you are right, I’ve checked the situation from the internal network with direct access to the docker container running guacamole. It uses the websocket tunnel then…

However, I must say that the error message returned at a direct access to the uri (/guacamole/websocket-tunnel) is misleading. A 404 means “the resource does not exist or was not found” by definition. Because WebSocket connections are simply an upgrade of the http connect, it should instead return 400 “bad request” as the http endpoint (/guacamole/tunnel) indeed does!

I have actually searched in the wrong place because of this 404 return code for a couple of days now.

 
I’ll check what might be the problem with the ReverseProxy. As I have actually configured it like the doc states, I’m a bit curious what the problem could be. But let’s see…

 
Best regards,

Martin.

 
 
Von: Mike Jumper <mi...@glyptodon.com> 
Gesendet: Montag, 21. Juni 2021 18:46
An: martin@krellmann.net.invalid
Cc: user@guacamole.apache.org
Betreff: Re: Websocket Endpoint missing

 
On Mon, Jun 21, 2021 at 3:05 AM Martin Krellmann <martin@krellmann.net.invalid <ma...@krellmann.net.invalid> > wrote:

Hello Guacamole community.

 
I have a strange problem regarding WebSocket Support: While the log claims it is loaded there is simply no “/guacamole/websocket-tunnel” endpoint available. I have checked this several times directly from the CLI of the docker container. It returns a 404.

 
The endpoint is definitely available. You are seeing a 404 because it is a WebSocket endpoint, not an HTTP endpoint, and Tomcat is refusing to continue routing the request without the correct headers.

 
You would need to use a WebSocket client to attempt to connect to the WebSocket tunnel endpoint.

 
Since if have installed guacamole via the Univention appcenter in the first place, I have updated it now to the latest docker images available. The problem remains.

 
Can you share what problem you're referring to?

 
However, the configuration still uses the LDAP Backend of univention. Which works fine for the HTTP tunnel, but as no websocket-tunnel endpoint is provided in Tomcat it couldn’t use it. To clarify again… This is not a reverse proxy issue. The endpoint is already not available in tomcat (checked from the CLI).

 
If the HTTP tunnel works fine but WebSocket fails, that definitely sounds like a reverse proxy issue.

 
You can confirm this further by connecting directly to Tomcat with a browser rather than through the reverse proxy, but really the WebSocket tunnel is there.

 
- Mike

 

Re: Websocket Endpoint missing

Posted by Mike Jumper <mi...@glyptodon.com>.
On Mon, Jun 21, 2021 at 3:05 AM Martin Krellmann
<ma...@krellmann.net.invalid> wrote:

> Hello Guacamole community.
>
>
>
> I have a strange problem regarding WebSocket Support: While the log claims
> it is loaded there is simply no “/guacamole/websocket-tunnel” endpoint
> available. I have checked this several times directly from the CLI of the
> docker container. It returns a 404.
>

The endpoint is definitely available. You are seeing a 404 because it is a
WebSocket endpoint, not an HTTP endpoint, and Tomcat is refusing to
continue routing the request without the correct headers.

You would need to use a WebSocket client to attempt to connect to the
WebSocket tunnel endpoint.

Since if have installed guacamole via the Univention appcenter in the first
> place, I have updated it now to the latest docker images available. The
> problem remains.
>

Can you share what problem you're referring to?

However, the configuration still uses the LDAP Backend of univention. Which
> works fine for the HTTP tunnel, but as no websocket-tunnel endpoint is
> provided in Tomcat it couldn’t use it. To clarify again… This is not a
> reverse proxy issue. The endpoint is already not available in tomcat
> (checked from the CLI).
>

If the HTTP tunnel works fine but WebSocket fails, that definitely sounds
like a reverse proxy issue.

You can confirm this further by connecting directly to Tomcat with a
browser rather than through the reverse proxy, but really the WebSocket
tunnel is there.

- Mike