You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@guacamole.apache.org by "Mike Jumper (Jira)" <ji...@apache.org> on 2020/10/01 23:51:00 UTC
[jira] [Reopened] (GUACAMOLE-1188) Docker uses HTTP Tunnel(Not
WebSocket)
[ https://issues.apache.org/jira/browse/GUACAMOLE-1188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mike Jumper reopened GUACAMOLE-1188:
------------------------------------
> Docker uses HTTP Tunnel(Not WebSocket)
> --------------------------------------
>
> Key: GUACAMOLE-1188
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-1188
> Project: Guacamole
> Issue Type: Bug
> Affects Versions: 1.2.0
> Reporter: Adrian Sandu
> Priority: Minor
> Fix For: 1.2.0
>
>
> I have the following docker-compose file.
> {code:java}
> version: "3.8"
> services:
> postgres12:
> image: 'postgres:12.3'
> restart: always
> hostname: 'postgres12'
> volumes:
> - './volumes/postgres12/pgdata:/var/lib/postgresql/data'
> - './volumes/postgres12/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d'
> environment:
> POSTGRES_DB: guacamole
> POSTGRES_USER: guacamole
> POSTGRES_PASSWORD: password
> PGDATA: /var/lib/postgresql/data/pgdata guacamole:
> depends_on:
> - guacd
> - postgres12
> links:
> - guacd
> image: 'guacamole/guacamole:1.2.0'
> restart: always
> hostname: 'guacamole'
> ports:
> - '127.0.0.1:8084:8080'
> environment:
> GUACD_HOSTNAME: guacd
> POSTGRES_HOSTNAME: postgres12
> POSTGRES_USER: guacamole
> POSTGRES_PASSWORD: password
> POSTGRES_DATABASE: guacamole
> guacd:
> image: 'guacamole/guacd:1.2.0'
> restart: always
> hostname: 'guacd' adminer:
> image: adminer
> restart: always
> hostname: 'adminer'
> ports:
> - 7588:8080
> {code}
> And the startup logs
> {code:java}
> Starting docker-guacamole_guacd_1 ... done
> Starting docker-guacamole_adminer_1 ... done
> Starting docker-guacamole_postgres12_1 ... done
> Recreating docker-guacamole_guacamole_1 ... done
> Attaching to docker-guacamole_guacd_1, docker-guacamole_adminer_1, docker-guacamole_postgres12_1, docker-guacamole_guacamole_1
> adminer_1 | [Thu Oct 1 07:20:14 2020] PHP 7.4.10 Development Server (http://[::]:8080) started
> guacd_1 | guacd[6]: INFO: Guacamole proxy daemon (guacd) version 1.2.0 started
> guacd_1 | guacd[6]: INFO: Listening on host 0.0.0.0, port 4822
> postgres12_1 |
> postgres12_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
> postgres12_1 |
> postgres12_1 | 2020-10-01 07:20:14.694 UTC [1] LOG: starting PostgreSQL 12.3 (Debian 12.3-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
> postgres12_1 | 2020-10-01 07:20:14.694 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
> postgres12_1 | 2020-10-01 07:20:14.694 UTC [1] LOG: listening on IPv6 address "::", port 5432
> postgres12_1 | 2020-10-01 07:20:14.702 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
> postgres12_1 | 2020-10-01 07:20:14.819 UTC [25] LOG: database system was shut down at 2020-10-01 07:18:23 UTC
> postgres12_1 | 2020-10-01 07:20:14.846 UTC [1] LOG: database system is ready to accept connections
> guacamole_1 | 01-Oct-2020 07:20:15.700 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.41
> guacamole_1 | 01-Oct-2020 07:20:15.701 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: May 4 2019 09:17:16 UTC
> guacamole_1 | 01-Oct-2020 07:20:15.701 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.5.41.0
> guacamole_1 | 01-Oct-2020 07:20:15.701 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
> guacamole_1 | 01-Oct-2020 07:20:15.701 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.19.80-aufs
> guacamole_1 | 01-Oct-2020 07:20:15.702 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
> guacamole_1 | 01-Oct-2020 07:20:15.702 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-8-openjdk-amd64/jre
> guacamole_1 | 01-Oct-2020 07:20:15.702 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_212-8u212-b01-1~deb9u1-b01
> guacamole_1 | 01-Oct-2020 07:20:15.702 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
> guacamole_1 | 01-Oct-2020 07:20:15.702 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/tomcat
> guacamole_1 | 01-Oct-2020 07:20:15.702 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/tomcat
> guacamole_1 | 01-Oct-2020 07:20:15.702 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
> guacamole_1 | 01-Oct-2020 07:20:15.702 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> guacamole_1 | 01-Oct-2020 07:20:15.702 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
> guacamole_1 | 01-Oct-2020 07:20:15.702 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
> guacamole_1 | 01-Oct-2020 07:20:15.703 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
> guacamole_1 | 01-Oct-2020 07:20:15.703 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
> guacamole_1 | 01-Oct-2020 07:20:15.703 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
> guacamole_1 | 01-Oct-2020 07:20:15.703 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
> guacamole_1 | 01-Oct-2020 07:20:15.703 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
> guacamole_1 | 01-Oct-2020 07:20:15.703 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.21] using APR version [1.5.2].
> guacamole_1 | 01-Oct-2020 07:20:15.703 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
> guacamole_1 | 01-Oct-2020 07:20:15.703 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
> guacamole_1 | 01-Oct-2020 07:20:15.707 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.0j 20 Nov 2018]
> guacamole_1 | 01-Oct-2020 07:20:15.780 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
> guacamole_1 | 01-Oct-2020 07:20:15.790 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
> guacamole_1 | 01-Oct-2020 07:20:15.802 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
> guacamole_1 | 01-Oct-2020 07:20:15.803 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
> guacamole_1 | 01-Oct-2020 07:20:15.803 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 393 ms
> guacamole_1 | 01-Oct-2020 07:20:15.820 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
> guacamole_1 | 01-Oct-2020 07:20:15.820 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.41
> guacamole_1 | 01-Oct-2020 07:20:15.837 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/usr/local/tomcat/webapps/guacamole.war]
> guacamole_1 | 01-Oct-2020 07:20:16.833 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.
> guacamole_1 | 07:20:16.933 [localhost-startStop-1] INFO o.a.g.environment.LocalEnvironment - GUACAMOLE_HOME is "/root/.guacamole".
> guacamole_1 | 07:20:16.992 [localhost-startStop-1] INFO o.a.g.rest.auth.HashTokenSessionMap - Sessions will expire after 60 minutes of inactivity.
> guacamole_1 | 07:20:17.092 [localhost-startStop-1] INFO o.a.g.environment.LocalEnvironment - GUACAMOLE_HOME is "/root/.guacamole".
> guacamole_1 | 07:20:17.919 [localhost-startStop-1] INFO o.a.g.extension.ExtensionModule - Extension "PostgreSQL Authentication" loaded.
> guacamole_1 | 07:20:17.921 [localhost-startStop-1] INFO o.a.g.environment.LocalEnvironment - GUACAMOLE_HOME is "/root/.guacamole".
> guacamole_1 | 07:20:17.988 [localhost-startStop-1] INFO o.a.g.t.w.WebSocketTunnelModule - Loading JSR-356 WebSocket support...
> guacamole_1 | 01-Oct-2020 07:20:18.222 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.register Registering org.apache.guacamole.rest.RESTExceptionMapper as a provider class
> guacamole_1 | 01-Oct-2020 07:20:18.222 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.register Registering org.apache.guacamole.rest.extension.ExtensionRESTService as a root resource class
> guacamole_1 | 01-Oct-2020 07:20:18.223 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.register Registering org.apache.guacamole.rest.language.LanguageRESTService as a root resource class
> guacamole_1 | 01-Oct-2020 07:20:18.223 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.register Registering org.apache.guacamole.rest.patch.PatchRESTService as a root resource class
> guacamole_1 | 01-Oct-2020 07:20:18.223 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.register Registering org.apache.guacamole.rest.auth.TokenRESTService as a root resource class
> guacamole_1 | 01-Oct-2020 07:20:18.223 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.register Registering org.apache.guacamole.rest.session.SessionRESTService as a root resource class
> guacamole_1 | 01-Oct-2020 07:20:18.223 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.register Registering org.codehaus.jackson.jaxrs.JacksonJsonProvider as a provider class
> guacamole_1 | 01-Oct-2020 07:20:18.225 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'
> guacamole_1 | 01-Oct-2020 07:20:18.279 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.getComponentProvider Binding org.apache.guacamole.rest.RESTExceptionMapper to GuiceManagedComponentProvider with the scope "Singleton"
> guacamole_1 | 01-Oct-2020 07:20:18.281 INFO [localhost-startStop-1] com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory.getComponentProvider Binding org.codehaus.jackson.jaxrs.JacksonJsonProvider to GuiceManagedComponentProvider with the scope "Singleton"
> guacamole_1 | 01-Oct-2020 07:20:18.585 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"
> guacamole_1 | 01-Oct-2020 07:20:18.589 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"
> guacamole_1 | 01-Oct-2020 07:20:18.589 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"
> guacamole_1 | 01-Oct-2020 07:20:18.591 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"
> guacamole_1 | 01-Oct-2020 07:20:18.592 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"
> guacamole_1 | 01-Oct-2020 07:20:18.603 INFO [localhost-startStop-1] org.webjars.servlet.WebjarsServlet.init WebjarsServlet initialization completed
> guacamole_1 | 01-Oct-2020 07:20:18.646 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/usr/local/tomcat/webapps/guacamole.war] has finished in [2,809] ms
> guacamole_1 | 01-Oct-2020 07:20:18.647 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/ROOT]
> guacamole_1 | 01-Oct-2020 07:20:18.663 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/ROOT] has finished in [16] ms
> guacamole_1 | 01-Oct-2020 07:20:18.664 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/docs]
> guacamole_1 | 01-Oct-2020 07:20:18.679 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/docs] has finished in [16] ms
> guacamole_1 | 01-Oct-2020 07:20:18.679 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/host-manager]
> guacamole_1 | 01-Oct-2020 07:20:18.705 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/host-manager] has finished in [26] ms
> guacamole_1 | 01-Oct-2020 07:20:18.705 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/manager]
> guacamole_1 | 01-Oct-2020 07:20:18.727 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/manager] has finished in [22] ms
> guacamole_1 | 01-Oct-2020 07:20:18.727 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/examples]
> guacamole_1 | 01-Oct-2020 07:20:18.832 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/examples] has finished in [105] ms
> guacamole_1 | 01-Oct-2020 07:20:18.834 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
> guacamole_1 | 01-Oct-2020 07:20:18.844 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
> guacamole_1 | 01-Oct-2020 07:20:18.854 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 3050 ms
> {code}
> And while trying to connect to a vnc, I get the following error in the logs, altough the connection works.
> {code:java}
> guacamole_1 | 07:22:46.982 [http-nio-8080-exec-13] INFO o.a.g.environment.LocalEnvironment - GUACAMOLE_HOME is "/root/.guacamole".
> guacamole_1 | 01-Oct-2020 07:22:46.981 INFO [http-nio-8080-exec-12] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header
> guacamole_1 | Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
> guacamole_1 | java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
> guacamole_1 | at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:430)
> guacamole_1 | at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:684)
> guacamole_1 | at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
> guacamole_1 | at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808)
> guacamole_1 | at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
> guacamole_1 | at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
> guacamole_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> guacamole_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> guacamole_1 | at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> guacamole_1 | at java.lang.Thread.run(Thread.java:748)
> guacd_1 | guacd[6]: INFO: Creating new client for protocol "vnc"
> guacd_1 | guacd[6]: INFO: Connection ID is "$47c41f61-353b-43bd-99a9-238148d8500f"
> guacd_1 | guacd[8]: INFO: Cursor rendering: local
> guacd_1 | guacd[8]: INFO: User "@7122a89f-4be4-4fb0-b3ca-94baf3699021" joined connection "$47c41f61-353b-43bd-99a9-238148d8500f" (1 users now present)
> guacamole_1 | 07:22:47.128 [http-nio-8080-exec-4] INFO o.a.g.tunnel.TunnelRequestService - User "dexter" connected to connection "1".
> guacamole_1 | 07:22:47.130 [http-nio-8080-exec-4] INFO o.a.g.t.h.RestrictedGuacamoleHTTPTunnelServlet - Using HTTP tunnel (not WebSocket). Performance may be sub-optimal.{code}
> In the network inspect tab of the browser I see the request receiving a 500 response code.
> The web interface is behind a reverse proxy ( apache httpd ).
> {code:java}
> <Location /guacamole/>
> ProxyPass http://127.0.0.1:8084/guacamole/ flushpackets=on
> ProxyPassReverse http://127.0.0.1:8084/guacamole/
> ModPagespeed off
> </Location>
> <Location /guacamole/websocket-tunnel>
> ProxyPass wss://127.0.0.1:8084/guacamole/websocket-tunnel
> ProxyPassReverse wss://127.0.0.1:8084/guacamole/websocket-tunnel
> ModPagespeed off
> </Location> {code}
>
> Also, I noticed that just linking to the guacd container without the GUACD_HOSTNAME env doesn't work. The error message suggests it should work:
> {code:java}
> guacamole_1 | Every Guacamole instance needs a corresponding copy of guacd running. To
> guacamole_1 | provide this, you must either:
> guacamole_1 |
> guacamole_1 | (a) Explicitly link that container with the link named "guacd".
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)