Re: Error 404 with Guacamole 1.4.0 / Tomcat 9 / Ubuntu 21.10

2022-03-02 Thread Adam Cherrett
Thanks all for the pointers. I have not yet solved the problem, but it is
narrowed down. I have checked all the environment variables are set as they
should be. Guacd appears to be running fine. Tomcat (I'm actually using
version 10.0.16 - sorry for the earlier error) appears to work fine. I can
deploy other .war files in exactly the same way as the guacamole client,
and they start and work as expected. I have tested with both symlinks and
copies of guacamole.war, and with prebuilt clients as well as one I have
built myself on this machine - all have the same error. Tomcat also
correctly unpacks the guacamole.war file in the webapps directory, as with
other apps. The error message when trying to start guacamole ('application
at context path /guacamole could not be started') also indicates that the
files have been found in the correct place (an attempt to start a
non-existent app of a different name produces a different error).

Despite turning on all the debug logging that I can find documentation for,
the only indication I get that there is a problem is in catalina.out:

01-Mar-2022 22:25:20.271 INFO [Catalina-utility-1]
org.apache.catalina.startup.HostConfig.deployWAR Deploying web application
archive [/opt/tomcat/tomcatapp/webapps/guacamole.war]
01-Mar-2022 22:25:20.667 INFO [Catalina-utility-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.
01-Mar-2022 22:25:20.668 SEVERE [Catalina-utility-1]
org.apache.catalina.core.StandardContext.startInternal One or more
listeners failed to start. Full details will be found in the appropriate
container log file
01-Mar-2022 22:25:20.668 SEVERE [Catalina-utility-1]
org.apache.catalina.core.StandardContext.startInternal Context [/guacamole]
startup failed due to previous errors

It appears that there are no TLDs in the guacamole client. Could this be
the cause of my problems? Despite the message that 'full details will be
found in the appropriate container log file', they are not.

Cheers,

Adam

On Tue, 1 Mar 2022 at 18:07, Alessandro Sironi 
wrote:

> I’ve checked the tutorial you had followed and seems the errori s in this
> line:
>
>
>
> sudo ln -s /etc/guacamole/guacamole.war /opt/tomcat/tomcatapp/webapps
>
>
>
> that will be dor properly work:
>
>
>
> sudo ln -s /etc/guacamole/guacamole.war
> /opt/tomcat/tomcatapp/webapps/guacamole
>
>
>
> Tomcat works with symlinks (also mine are setted up with symlinks), but
> you need to put it in the right place.
>
>
>
> Alessandro
>
>
>
> *Da:* Antoine Besnier 
> *Inviato:* martedì 1 marzo 2022 17:48
> *A:* user@guacamole.apache.org
> *Oggetto:* Re: Error 404 with Guacamole 1.4.0 / Tomcat 9 / Ubuntu 21.10
>
>
>
> This line in the tutorial you followed may be the culprit:
>
>
>
> sudo ln -s /etc/guacamole/guacamole.war /opt/tomcat/tomcatapp/webapps
>
>
>
> check the value of $CATALINA_HOME, and confirm your guacamole.war is
> present in the directory $CATALINA_HOME/webapps. Don't know if tomcat can
> work with links? safer to just copy guacamole.war directly.
>
>
>
> See the doc:
> https://guacamole.apache.org/doc/gug/installing-guacamole.html#deploying-guacamole
>
>
>
> Cheers
>
>
>
>
>
>
>
> Le mardi 1 mars 2022, 12:59:32 UTC+1, Adam Cherrett <
> adamcherr...@gmail.com> a écrit :
>
>
>
>
>
> I need some help troubleshooting my attempt to get 1.4.0 running (for use
> on my local network). I am working with a clean installation of Ubuntu
> 21.10, and have been following the steps in
> https://computingforgeeks.com/install-and-use-guacamole-on-ubuntu/
>
>
>
> Tomcat 9 appears to be running fine (and I can access the manager app
> through the browser):
>
>
>
> > systemctl status tomcat
>
> ● tomcat.service - Tomcat 9 servlet container
>  Loaded: loaded (/etc/systemd/system/tomcat.service; enabled; vendor
> prese
> t: enabled)
>  Active: active (running) since Mon 2022-02-28 13:28:23 CET; 23h ago
> Process: 13902 ExecStart=/opt/tomcat/tomcatapp/bin/startup.sh
> (code=exited
> , status=0/SUCCESS)
>Main PID: 13909 (java)
>   Tasks: 39 (limit: 38299)
>  Memory: 340.4M
> CPU: 1min 44.670s
>  CGroup: /system.slice/tomcat.service
>  └─13909 /usr/lib/jvm/java-11-openjdk-amd64/bin/java
> -Djava.util.l
> ogging.config.file=/opt/tomcat/tomcatapp/conf/logging.properties
> -Djava.util.l
> ogging.manager=org.apache.juli.ClassLoaderLogManager
> -Djava.security.egd=file:
> ///dev/urandom -Djava.awt.headless=true -Djdk.tls.eph

Error 404 with Guacamole 1.4.0 / Tomcat 9 / Ubuntu 21.10

2022-03-01 Thread Adam Cherrett
I need some help troubleshooting my attempt to get 1.4.0 running (for use
on my local network). I am working with a clean installation of Ubuntu
21.10, and have been following the steps in
https://computingforgeeks.com/install-and-use-guacamole-on-ubuntu/

Tomcat 9 appears to be running fine (and I can access the manager app
through the browser):

> systemctl status tomcat
● tomcat.service - Tomcat 9 servlet container
 Loaded: loaded (/etc/systemd/system/tomcat.service; enabled; vendor
prese
t: enabled)
 Active: active (running) since Mon 2022-02-28 13:28:23 CET; 23h ago
Process: 13902 ExecStart=/opt/tomcat/tomcatapp/bin/startup.sh
(code=exited
, status=0/SUCCESS)
   Main PID: 13909 (java)
  Tasks: 39 (limit: 38299)
 Memory: 340.4M
CPU: 1min 44.670s
 CGroup: /system.slice/tomcat.service
 └─13909 /usr/lib/jvm/java-11-openjdk-amd64/bin/java
-Djava.util.l
ogging.config.file=/opt/tomcat/tomcatapp/conf/logging.properties
-Djava.util.l
ogging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.security.egd=file:
///dev/urandom -Djava.awt.headless=true -Djdk.tls.ephemeralDHKeySize=2048
-Dja
va.protocol.handler.pkgs=org.apache.catalina.webresources
-Dorg.apache.catalin
a.security.SecurityListener.UMASK=0027 -Xms512M -Xmx1024M -server
-XX:+UsePara
llelGC -Dignore.endorsed.dirs= -classpath
/opt/tomcat/tomcatapp/bin/bootstrap.
jar:/opt/tomcat/tomcatapp/bin/tomcat-juli.jar
-Dcatalina.base=/opt/tomcat/tomc
atapp -Dcatalina.home=/opt/tomcat/tomcatapp
-Djava.io.tmpdir=/opt/tomcat/tomca
tapp/temp org.apache.catalina.startup.Bootstrap start

Feb 28 13:28:23 blackbox systemd[1]: Starting Tomcat 9 servlet container...
Feb 28 13:28:23 blackbox startup.sh[13902]: Tomcat started.
Feb 28 13:28:23 blackbox systemd[1]: Started Tomcat 9 servlet container.

guacd appears to be fine:
● guacd.service - LSB: Guacamole proxy daemon
 Loaded: loaded (/etc/init.d/guacd; generated)
 Active: active (running) since Mon 2022-02-28 13:28:41 CET; 23h ago
   Docs: man:systemd-sysv-generator(8)
Process: 13992 ExecStart=/etc/init.d/guacd start (code=exited,
status=0/SU
CCESS)
  Tasks: 1 (limit: 38299)
 Memory: 9.4M
CPU: 15ms
 CGroup: /system.slice/guacd.service
 └─13996 /usr/local/sbin/guacd -p /var/run/guacd.pid

Feb 28 13:28:41 blackbox systemd[1]: Starting LSB: Guacamole proxy daemon...
Feb 28 13:28:41 blackbox guacd[13994]: Guacamole proxy daemon (guacd)
version
1.4.0 started
Feb 28 13:28:41 blackbox guacd[13992]: Starting guacd:
Feb 28 13:28:41 blackbox guacd[13994]: guacd[13994]: INFO:Guacamole
pr
oxy daemon (guacd) version 1.4.0 started
Feb 28 13:28:41 blackbox guacd[13992]: SUCCESS
Feb 28 13:28:41 blackbox guacd[13996]: Listening on host 127.0.0.1, port
4822
Feb 28 13:28:41 blackbox systemd[1]: Started LSB: Guacamole proxy daemon.

I can restart both tomcat and guacd without problems. I suspect the problem
lies with the guacamole client. I have tried prerolled versions and
compiling my own - neither of them works. Browsing to
http://127.0.0.1:8080/guacamole gives a 404 error. The Tomcat manager shows
a number of applications running, and shows guacamole is not. Trying to
start it from the browser gives the error "FAIL - Application at context
path [/guacamole] could not be started".

Here are some log entries:

in catalina.-MM-DD.log (duplicated in catalina.out):
01-Mar-2022 12:27:33.610 INFO [http-nio-8080-exec-18]
org.apache.jasper.servle
t.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained
no T
LDs. Enable debug logging for this logger for a complete list of JARs that
wer
e scanned but no TLDs were found in them. Skipping unneeded JARs during
scanni
ng can improve startup time and JSP compilation time.
01-Mar-2022 12:27:33.611 SEVERE [http-nio-8080-exec-18]
org.apache.catalina.co
re.StandardContext.startInternal One or more listeners failed to start.
Full d
etails will be found in the appropriate container log file
01-Mar-2022 12:27:33.612 SEVERE [http-nio-8080-exec-18]
org.apache.catalina.co
re.StandardContext.startInternal Context [/guacamole] startup failed due to
pr
evious errors

in localhost_access_log.-MM-DD.txt:
192.168.0.50 - - [01/Mar/2022:12:26:54 +0100] "GET /guacamole HTTP/1.1" 404
76
1
192.168.0.50 - - [01/Mar/2022:12:26:54 +0100] "GET /favicon.ico HTTP/1.1"
200
8192
192.168.0.50 - - [01/Mar/2022:12:27:01 +0100] "GET / HTTP/1.1" 200 11165
192.168.0.50 - - [01/Mar/2022:12:27:01 +0100] "GET /tomcat.css HTTP/1.1"
200 5
542
192.168.0.50 - - [01/Mar/2022:12:27:01 +0100] "GET /tomcat.svg HTTP/1.1"
200 6
7795
192.168.0.50 - - [01/Mar/2022:12:27:01 +0100] "GET /bg-nav.png HTTP/1.1"
200 1
401
192.168.0.50 - - [01/Mar/2022:12:27:01 +0100] "GET /asf-logo-wide.svg
HTTP/1.1
" 200 27235
192.168.0.50 - - [01/Mar/2022:12:27:01 +0100] "GET /bg-button.png HTTP/1.1"
20
0 713
192.168.0.50 - - [01/Mar/2022:12:27:01 +0100] "GET /bg-upper.png HTTP/1.1"
200
 3103
192.168.0.50 - - [01/Mar/2022:12:27:01 +0100] "GET