Hi,
Ok I did a bit of a cleanup and those errors are now gone. But I still cannot authenticate.. this is what I get: [root@mfa-guacamole guacamole]# find /etc/guacamole/ /etc/guacamole/ /etc/guacamole/guacamole-1.3.0.war /etc/guacamole/lib /etc/guacamole/extensions /etc/guacamole/guacd.conf /etc/guacamole/logback.xml /etc/guacamole/guacamole.properties [root@mfa-guacamole guacamole]# ls -lah /usr/share/tomcat/.guacamole lrwxrwxrwx. 1 root root 14 Mar 25 10:13 /usr/share/tomcat/.guacamole -> /etc/guacamole [root@mfa-guacamole guacamole]# ls -lah /var/lib/tomcat/webapps/guacamole-1.3.0.war lrwxrwxrwx. 1 root root 34 Mar 25 14:56 /var/lib/tomcat/webapps/guacamole-1.3.0.war -> /etc/guacamole/guacamole-1.3.0.war # this might not be the conventional location for these.. but it seem to work? [root@mfa-guacamole guacamole]# ls -lah /var/lib/tomcat/webapps/guacamole-1.3.0/WEB-INF/lib/guacamole-auth-jdbc-postgresql-1.3.0.jar -rw-r--r--. 1 tomcat tomcat 5.5M Mar 26 08:14 /var/lib/tomcat/webapps/guacamole-1.3.0/WEB-INF/lib/guacamole-auth-jdbc-postgresql-1.3.0.jar [root@mfa-guacamole guacamole]# ls -lah /var/lib/tomcat/webapps/guacamole-1.3.0/WEB-INF/lib/postgresql-42.2.19.jar -rw-r--r--. 1 tomcat tomcat 982K Mar 25 15:23 /var/lib/tomcat/webapps/guacamole-1.3.0/WEB-INF/lib/postgresql-42.2.19.jar -bash-4.2$ createdb guacamole_db -bash-4.2$ psql -d guacamole_db psql (9.2.24) Type "help" for help. guacamole_db=# CREATE USER guacamole_user WITH PASSWORD '****'; CREATE ROLE guacamole_db=# GRANT SELECT,INSERT,UPDATE,DELETE ON ALL TABLES IN SCHEMA public TO guacamole_user; GRANT guacamole_db=# GRANT SELECT,USAGE ON ALL SEQUENCES IN SCHEMA public TO guacamole_user; GRANT guacamole_db=# \q cat /tmp/guacamole-auth-jdbc-1.3.0/postgresql/schema/*.sql | psql -d guacamole_db -f - [root@mfa-guacamole guacamole]# cat /etc/guacamole/guacamole.properties # Hostname and port of guacamole proxy guacd-hostname: 127.0.0.1 guacd-port: 4822 # PostgreSQL properties postgresql-hostname: 127.0.0.1 postgresql-port: 5432 postgresql-database: guacamole_db postgresql-username: guacamole_user postgresql-password: **** guacamole_db=# select * from guacamole_entity; -[ RECORD 1 ]-------- entity_id | 1 name | guacadmin type | USER guacamole_db=# select * from guacamole_user; -[ RECORD 1 ]-------+------------------------------------------------------------------- user_id | 1 entity_id | 1 password_hash | \x********** password_salt | \x********** password_date | 2021-03-25 15:37:14.792576+01 disabled | f expired | f access_window_start | access_window_end | valid_from | valid_until | timezone | full_name | email_address | organization | organizational_role | Mar 26 08:47:36 mfa-guacamole server: 08:47:36.962 [http-bio-8080-exec-7] DEBUG o.a.g.a.f.FileAuthenticationProvider - User mapping file "/usr/share/tomcat/.guacamole/user-mapping.xml" does not exist and will not be read. Mar 26 08:47:36 mfa-guacamole server: 08:47:36.964 [http-bio-8080-exec-7] DEBUG o.a.g.r.auth.AuthenticationService - Anonymous authentication attempt from 148.187.134.75 failed. Mar 26 08:47:36 mfa-guacamole server: 08:47:36.964 [http-bio-8080-exec-7] DEBUG o.a.g.rest.RESTExceptionMapper - Client request rejected: Permission Denied. Mar 26 08:47:41 mfa-guacamole server: 08:47:41.456 [http-bio-8080-exec-1] DEBUG o.a.g.a.f.FileAuthenticationProvider - User mapping file "/usr/share/tomcat/.guacamole/user-mapping.xml" does not exist and will not be read. Mar 26 08:47:41 mfa-guacamole server: 08:47:41.472 [http-bio-8080-exec-1] WARN o.a.g.r.auth.AuthenticationService - Authentication attempt from 148.187.134.75 for user "guacadmin" failed. Mar 26 08:47:41 mfa-guacamole server: 08:47:41.472 [http-bio-8080-exec-1] DEBUG o.a.g.rest.RESTExceptionMapper - Client request rejected: Permission Denied. Regards Marco Passerini ________________________________ From: Mike Jumper <[email protected]> Sent: Thursday, March 25, 2021 6:30:28 PM To: [email protected] Subject: Re: Problems with Postgres DB authentication On Thu, Mar 25, 2021 at 8:14 AM Passerini Marco <[email protected]<mailto:[email protected]>> wrote: Hi, ... Mar 25 16:09:03 mfa-guacamole server: 16:09:03.007 [http-bio-8080-exec-6] ERROR o.a.g.rest.RESTExceptionMapper - Unexpected internal error: org.apache.guacamole.auth.jdbc.user.UserModel cannot be cast to org.apache.guacamole.auth.jdbc.user.UserModel There is only one implementation of UserModel, and Java should definitely not have any issue with a class being cast to itself. The only way I can imagine the above error occurring is if multiple copies of the database extension are present in the classpath. Where have each of the .jar files for any extensions, the PostgreSQL JDBC driver, etc. been placed? Michael Jumper CEO, Lead Developer Glyptodon Inc<https://enterprise.glyptodon.com/>.
