Apache Guacamole does not work after Nethserver / Nextcloud update

NethServer Version: NethServer 7.9.2009
Module: nethserver-guacamole 0.0.1-3.ns7
Hello!
After Nethserver and Nextcloud update the Apache guacamole does not work.
The error I got is:

Message The requested resource [/guacamole/] is not available

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

and

01-Jul-2021 17:25:34.290 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
01-Jul-2021 17:25:34.290 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.56
01-Jul-2021 17:25:34.353 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/opt/tomcat8/webapps/guacamole.war]
01-Jul-2021 17:25:37.644 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.
01-Jul-2021 17:25:37.982 SEVERE [localhost-startStop-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-Jul-2021 17:25:37.992 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/guacamole] startup failed due to previous errors

Please help to troubleshoot this.
Thanks.

Try if it works after running:

signal-event nethserver-guacamole-update

If it doesn’t check if the related services are running and report any error:

systemctl status -l guacd tomcat8

just run signal-event without any output.
Servcestatus reports no error, too. There isa notificeation that:
Guacamole proxy daemon (guacd) version 1.3.0 started

Can you share your guacamole config? (mainly to check if a virtualHost is configured)

config show guacd

Here’s output.

guacd=service
Encryption=
VirtualHost=gw.domain.com
jailStatus=enabled
ldapPort=
status=enabled
usernameAttribute=

Can you access guacamole just with the virtual host name (without the trailing /guacamole)?

Not, the same error (404) is generated.

So you are redirected from the VirtualHost https://gw.domain.com to https://gw.domain.com/guacamole (this address path does not exist)?
Same with another web browser?

Care to share the contents of the virtualhost files?
cat /etc/httpd/conf.d/default-virtualhost.inc
cat /etc/httpd/conf.d/zz_guacamole.conf

cat /etc/httpd/conf.d/default-virtualhost.inc
# ================= DO NOT MODIFY THIS FILE =================
# 
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at NethServer official site: https://www.nethserver.org
#
# 
#
# 10server-manager permanent redirect
#
RewriteEngine On
RewriteRule ^/server-manager(/.*)?$  https://%{HTTP_HOST}:980$1  [L,R=301]



#
# 15 user_settings
#

#
# 40nextcloud
#
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/nextcloud(/.*)?$  https://%{HTTP_HOST}/nextcloud$1  [L,R=301]
Redirect 301 /ocm-provider /nextcloud/ocm-provider
Redirect 301 /ocs-provider /nextcloud/ocs-provider
#
# 50guacamole
#

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/guacamole(/.*)?$  https://%{HTTP_HOST}/guacamole$1  [L,R=301]
#
# 50phpmyadmin
#
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/phpmyadmin(/.*)?$ https://%{HTTP_HOST}/phpmyadmin$1 [L,R=301]
RewriteRule ^/phpMyAdmin(/.*)?$ https://%{HTTP_HOST}/phpMyAdmin$1 [L,R=301]
#
# 80vhost_default -- include template httpd/vhost-default
#                    for backward compatibility
#
cat /etc/httpd/conf.d/zz_guacamole.conf
# ================= DO NOT MODIFY THIS FILE =================
# 
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at NethServer official site: https://www.nethserver.org
#
# 
<VirtualHost *:80>
   IncludeOptional conf.d/default-virtualhost.inc
</VirtualHost>

<VirtualHost *:80>
   ServerName gw.domain.com
   RedirectMatch 301 ^(?!/\.well-known/acme-challenge/).* https://gw.domain.com
</VirtualHost>

<VirtualHost *:443>
   Servername gw.domain.com
   SSLProxyEngine on
   SSLEngine on

   ProxyPass / http://localhost:8080/guacamole/  flushpackets=on
   ProxyPassReverse / http://localhost:8080/guacamole/

   <Location />
      SSLRequireSSL
   </Location>

  <Location /websocket-tunnel>
      Order allow,deny
      Allow from all
      ProxyPass ws://localhost:8080/guacamole/websocket-tunnel
      ProxyPassReverse ws://localhost:8080/guacamole/websocket-tunnel
  </Location>
</VirtualHost>

This behavior is browser independent.

vhost looks good to me.
On the web browser address bar, the final URL contains /guacamole or just the vhost? If the latter, maybe you can get more info from the logs in /opt/tomcat8/logs

On the web browser address bar, the final URL contains /guacamole or just the vhost?
vhost without /guacamole

/opt/tomcat8/logs cotnains the following errors

2-Jul-2021 15:52:52.782 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Skipped installing application listeners due to previous error(s)
02-Jul-2021 17:19:07.168 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [org.apache.guacamole.GuacamoleServletContextListener]
> java.lang.UnsupportedClassVersionError: org/apache/guacamole/GuacamoleServletContextListener : Unsupported major.minor version 52.0 (unable to load class [org.apache.guacamole.GuacamoleServletContextListener])
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2397)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:855)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1327)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1180)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:545)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:526)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4613)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5155)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:970)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1840)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:473)

Unsupported major.minor version 52.0

Unsupported major.minor version 52.0 comes when you are trying to run a class compiled using Java 1.8 compiler into a lower JRE version

Fixing Unsupported major.minor version 52.0 Error in Java
java - Unsupported major.minor version 52.0 - Stack Overflow

Can you list the installed java versions (and also guacamole version)?

rpm -qa java\* guac\* |sort
1 Like

Here’s output:

rpm -qa java* guac* |sort
guacd-1.3.0-1.el7.x86_64
java-1.7.0-openjdk-1.7.0.261-2.6.22.2.el7_8.x86_64
java-1.7.0-openjdk-devel-1.7.0.261-2.6.22.2.el7_8.x86_64
java-1.7.0-openjdk-headless-1.7.0.261-2.6.22.2.el7_8.x86_64
java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.x86_64
java-1.8.0-openjdk-devel-1.8.0.292.b10-1.el7_9.x86_64
java-1.8.0-openjdk-headless-1.8.0.292.b10-1.el7_9.x86_64
javamail-1.4.6-8.el7.noarch
javapackages-tools-3.4.1-11.el7.noarch
javassist-3.16.1-10.el7.noarch

The first output I copied was incomplete. This is updated one.

Most probably guacamole is running under the old java version.
To check the default java version being used by the system:

java -version

To get extra details:

alternatives --display java

To change the default java version you can use alternatives command:

alternatives --config java

If you change the java version, you might need to restart the guacamole service:

systemctl restart guacd

Guacamole requires java 1.8 at least. If you no longer need java-1.7.0 for something else, you could remove it (but before confirming the removal check the list of packages that will be removed, in case it tries to remove something you wanna keep):

yum remove java-1.7.0\*
1 Like

Thanks, this help to restore guacamole (uninstall of java 1.7 and make default Java 1.8)
The server has Nextcloud installed.
Now it shows Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

Was it working just before? When it started failing?

It was working until Java 1.7 uninstallation. One note: I had 2 Tomcat versions before tomcat and tomcat8. Now works only Tomcat8.

Can you list the packages that where uninstalled, please? Either from yum history or from the log.

cat /var/log/yum.log

Jul 05 16:58:59 Erased: 1:java-1.7.0-openjdk-devel-1.7.0.261-2.6.22.2.el7_8.x86_64
Jul 05 16:59:02 Erased: nethserver-tomcat-1.1.0-1.ns7.noarch
Jul 05 16:59:02 Erased: 1:java-1.7.0-openjdk-1.7.0.261-2.6.22.2.el7_8.x86_64
Jul 05 16:59:03 Erased: 1:java-1.7.0-openjdk-headless-1.7.0.261-2.6.22.2.el7_8.x86_64

I do not see anything that relates to (or is required by) nextcloud.
Can you check the status of the services related to Nextcloud?

systemctl -l status rh-php73-php-fpm rh-mariadb105-mariadb@nextcloud.service httpd

EDIT: lets continue in another topic.