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 2022/07/17 18:38:00 UTC

[jira] [Commented] (GUACAMOLE-1639) After activating MySQL authentication, I get an error screen

    [ https://issues.apache.org/jira/browse/GUACAMOLE-1639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17567710#comment-17567710 ] 

Mike Jumper commented on GUACAMOLE-1639:
----------------------------------------

The application is failing to work correctly because:

{code:none}
java.lang.NoSuchMethodError: 'javax.servlet.http.HttpServletRequest org.apache.guacamole.net.auth.Credentials.getRequest()'
{code}

which is because Tomcat 10 is being used, and Tomcat 10 uses a newer, incompatible Java servlet API. In the newer API, everything has been renamed from {{javax.\*}} to {{jakarta.\*}}.

You will need to use Tomcat 9 instead of 10.

See: GUACAMOLE-1325

> After activating MySQL authentication, I get an error screen
> ------------------------------------------------------------
>
>                 Key: GUACAMOLE-1639
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-1639
>             Project: Guacamole
>          Issue Type: Bug
>          Components: guacamole
>    Affects Versions: 1.4.0
>         Environment: Gentoo
> Tomcat 10.0.22
> # java --version
> openjdk 11.0.15 2022-04-19
> OpenJDK Runtime Environment Temurin-11.0.15+10 (build 11.0.15+10)
> OpenJDK 64-Bit Server VM Temurin-11.0.15+10 (build 11.0.15+10, mixed mode)
>            Reporter: Mickaël Bucas
>            Priority: Major
>         Attachments: guacamole.logback.log
>
>
> I was using user-mapping.xml and it worked fine, I could connect to remote hosts.
> I tried to activate MySQL authentication, and deactivate user-mapping.xml (which I renamed to user-mapping.xml.old to be sure)
> My guacamole.properties is now :
> {noformat}
> guacd-hostname: localhost
> guacd-port: 4822
> #basic-user-mapping: /etc/guacamole/user-mapping.xml
> mysql-hostname: localhost
> mysql-port: 3306
> mysql-database: guacamole
> mysql-username: guacamole
> mysql-password: xxx
> skip-if-unavailable: mysql-shared
> #ldap-hostname: localhost
> #ldap-port: 389
> #ldap-user-base-dn: ou=people,dc=example,dc=net
> #ldap-username-attribute: uid
> #ldap-config-base-dn: ou=groups,dc=example,dc=net{noformat}
> Now I get the login screen, I enter guacadmin as user and password. Then I get this in browser :
> {code:java}
> Error : An error has occurred and this action cannot be completed. If
> the problem persists, please notify your system administrator or check
> your system logs.{code}
> I didn't see any relevant message in Catalina log files.
> I configured Logback like this and finally got information in the target file:
>  
> {code:java}
> <configuration>
>     <!-- Appender for debugging -->
>     <appender name="GUAC-DEBUG" class="ch.qos.logback.core.FileAppender">
>         <file>/var/log/tomcat-10-guacamole/guacamole.logback.log</file>
>         <encoder>
>             <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
>         </encoder>
>     </appender>
>     <!-- Log at DEBUG level -->
>     <root level="debug">
>         <appender-ref ref="GUAC-DEBUG"/>
>     </root>
> </configuration>
> {code}
> In guacamole.logback.log, I get the following messages (full log attached):
>  
> {noformat}
> ...
> 19:03:10.848 [http-nio-8080-exec-10] DEBUG o.a.g.a.f.FileAuthenticationProvider - User mapping file "/etc/guacamole/user-mapping.xml" does not exist and will not be read.
> 19:03:10.862 [http-nio-8080-exec-10] DEBUG o.a.g.r.auth.AuthenticationService - Login was successful for user "guacadmin".
> 19:03:10.909 [http-nio-8080-exec-6] DEBUG o.a.g.rest.RESTExceptionMapper - Client request rejected: Permission Denied.
> 19:03:10.948 [http-nio-8080-exec-3] ERROR o.a.g.rest.RESTExceptionMapper - Unexpected internal error: 'javax.servlet.http.HttpServletRequest org.apache.guacamole.net.auth.Credentials.getRequest()'
> 19:03:10.948 [http-nio-8080-exec-3] DEBUG o.a.g.rest.RESTExceptionMapper - Unexpected error in REST endpoint.
> java.lang.NoSuchMethodError: 'javax.servlet.http.HttpServletRequest org.apache.guacamole.net.auth.Credentials.getRequest()'
>     at org.apache.guacamole.auth.jdbc.sharing.ConnectionSharingService.getShareKey(ConnectionSharingService.java:179)
>     at org.apache.guacamole.auth.jdbc.sharing.SharedAuthenticationProviderService.updateUserContext(SharedAuthenticationProviderService.java:102)
>     at org.apache.guacamole.auth.jdbc.InjectedAuthenticationProvider.updateUserContext(InjectedAuthenticationProvider.java:89)
> ...
> {noformat}
> As you can see, 'Login was successful for user "guacadmin"' and I've checked the database, and there is a line in guacamole_user_history
> Just after, there is this message that I don't understand :
>  
> {noformat}
> DEBUG o.a.g.rest.RESTExceptionMapper - Client request rejected: Permission Denied. 
> {noformat}
> Is this a program error or configuration error ?
> What information would you need to understand what's happening ?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)