Hi,

I'm having a hard time setting up database authentification with postgresql.
I'm having this error /var/log/tomcat9/catalina.out .
<code>

[2024-06-05 15:12:11] [info] 15:12:11.344 [http-nio-8080-exec-6] DEBUG 
o.a.i.t.jdbc.JdbcTransaction - Opening JDBC Connection[2024-06-05 15:12:11] 
[info] 15:12:11.350 [http-nio-8080-exec-6] DEBUG 
o.a.g.a.j.DynamicallyAuthenticatedDataSource - Creating new database connection 
for pool.
[2024-06-05 15:12:11] [info] 15:12:11.353 [http-nio-8080-exec-6] WARN 
o.a.g.e.AuthenticationProviderFacade - The "postgresql" authentication provider 
has encoun
tered an internal error which will halt the authentication process. If this is 
unexpected or you are the developer of this authentication provider, you may 
wish
to enable debug-level logging. If this is expected and you wish to ignore such 
failures in the future, please set "skip-if-unavailable: postgresql" within 
your g
uacamole.properties.
[2024-06-05 15:12:11] [info] 15:12:11.357 [http-nio-8080-exec-6] ERROR 
o.a.g.rest.RESTExceptionMapper - Unexpected internal error:
[2024-06-05 15:12:11] [info] ### Error querying database. Cause: 
java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: 
java.lang.ClassNotFou
ndException: org.postgresql.Driver
[2024-06-05 15:12:11] [info] ### The error may exist in 
org/apache/guacamole/auth/jdbc/user/UserMapper.xml
[2024-06-05 15:12:11] [info] ### The error may involve 
org.apache.guacamole.auth.jdbc.user.UserMapper.selectOne
[2024-06-05 15:12:11] [info] ### The error occurred while executing a query
[2024-06-05 15:12:11] [info] ### Cause: java.sql.SQLException: Error setting 
driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: 
org.postgresq
l.Driver
[2024-06-05 15:12:11] [info] 15:12:11.357 [http-nio-8080-exec-6] DEBUG 
o.a.g.rest.RESTExceptionMapper - Unexpected error in REST endpoint.
[2024-06-05 15:12:11] [info] org.apache.ibatis.exceptions.PersistenceException:
[2024-06-05 15:12:11] [info] ### Error querying database. Cause: 
java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: 
java.lang.ClassNotFou
ndException: org.postgresql.Driver
[2024-06-05 15:12:11] [info] ### The error may exist in 
org/apache/guacamole/auth/jdbc/user/UserMapper.xml
[2024-06-05 15:12:11] [info] ### The error may involve 
org.apache.guacamole.auth.jdbc.user.UserMapper.selectOne
[2024-06-05 15:12:11] [info] ### The error occurred while executing a query
[2024-06-05 15:12:11] [info] ### Cause: java.sql.SQLException: Error setting 
driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: 
org.postgresq
l.Driver
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:156)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:142)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:75)
[2024-06-05 15:12:11] [info] #011at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2024-06-05 15:12:11] [info] #011at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[2024-06-05 15:12:11] [info] #011at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2024-06-05 15:12:11] [info] #011at 
java.base/java.lang.reflect.Method.invoke(Method.java:568)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.session.SqlSessionManager$SqlSessionInterceptor.invoke(SqlSessionManager.java:355)
[2024-06-05 15:12:11] [info] #011at 
jdk.proxy4/jdk.proxy4.$Proxy40.selectOne(Unknown Source)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.session.SqlSessionManager.selectOne(SqlSessionManager.java:164)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:87)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:141)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86)
[2024-06-05 15:12:11] [info] #011at 
jdk.proxy4/jdk.proxy4.$Proxy43.selectOne(Unknown Source)
[2024-06-05 15:12:11] [info] #011at 
org.apache.guacamole.auth.jdbc.user.UserService.retrieveAuthenticatedUser(UserService.java:378)
[2024-06-05 15:12:11] [info] #011at 
org.apache.guacamole.auth.jdbc.JDBCAuthenticationProviderService.authenticateUser(JDBCAuthenticationProviderService.java:76)
[2024-06-05 15:12:11] [info] #011at 
org.apache.guacamole.auth.jdbc.InjectedAuthenticationProvider.authenticateUser(InjectedAuthenticationProvider.java:76)
[2024-06-05 15:12:11] [info] #011at 
org.apache.guacamole.extension.AuthenticationProviderFacade.authenticateUser(AuthenticationProviderFacade.java:190)
[2024-06-05 15:12:11] [info] #011at 
org.apache.guacamole.rest.auth.AuthenticationService.authenticateUser(AuthenticationService.java:187)
[2024-06-05 15:12:11] [info] #011at 
org.apache.guacamole.rest.auth.AuthenticationService.getAuthenticatedUser(AuthenticationService.java:313)
[2024-06-05 15:12:11] [info] #011at 
org.apache.guacamole.rest.auth.AuthenticationService.authenticate(AuthenticationService.java:466)
[2024-06-05 15:12:11] [info] #011at 
org.apache.guacamole.rest.auth.TokenRESTService.createToken(TokenRESTService.java:174)
[2024-06-05 15:12:11] [info] #011at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2024-06-05 15:12:11] [info] #011at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[2024-06-05 15:12:11] [info] #011at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2024-06-05 15:12:11] [info] #011at 
java.base/java.lang.reflect.Method.invoke(Method.java:568)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHan
dlerFactory.java:52)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.ja
va:146)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.j
ava:189)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodD
ispatcherProvider.java:219)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher
.java:93)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:478)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:400)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:81)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:256)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.internal.Errors.process(Errors.java:292)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.internal.Errors.process(Errors.java:274)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.internal.Errors.process(Errors.java:244)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:235)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:684)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:394)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:359)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:312)
[2024-06-05 15:12:11] [info] #011at 
org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205)
[2024-06-05 15:12:11] [info] #011at 
com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:290)
[2024-06-05 15:12:11] [info] #011at 
com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:280)
[2024-06-05 15:12:11] [info] #011at 
com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:184)
[2024-06-05 15:12:11] [info] #011at 
com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:89)
[2024-06-05 15:12:11] [info] #011at 
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
[2024-06-05 15:12:11] [info] #011at 
com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:121)
[2024-06-05 15:12:11] [info] #011at 
com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:133)
[2024-06-05 15:12:11] [info] #011at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
[2024-06-05 15:12:11] [info] #011at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
[2024-06-05 15:12:11] [info] #011at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:177)
[2024-06-05 15:12:11] [info] #011at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
[2024-06-05 15:12:11] [info] #011at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
[2024-06-05 15:12:11] [info] #011at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
[2024-06-05 15:12:11] [info] #011at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
[2024-06-05 15:12:11] [info] #011at 
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
[2024-06-05 15:12:11] [info] #011at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
[2024-06-05 15:12:11] [info] #011at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
[2024-06-05 15:12:11] [info] #011at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
[2024-06-05 15:12:11] [info] #011at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
[2024-06-05 15:12:11] [info] #011at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891)
[2024-06-05 15:12:11] [info] #011at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1784)
[2024-06-05 15:12:11] [info] #011at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
[2024-06-05 15:12:11] [info] #011at 
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
[2024-06-05 15:12:11] [info] #011at 
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
[2024-06-05 15:12:11] [info] #011at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
[2024-06-05 15:12:11] [info] #011at 
java.base/java.lang.Thread.run(Thread.java:840)
[2024-06-05 15:12:11] [info] Caused by: java.sql.SQLException: Error setting 
driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: 
org.postgresq
l.Driver
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.datasource.unpooled.UnpooledDataSource.initializeDriver(UnpooledDataSource.java:248)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:227)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.datasource.unpooled.UnpooledDataSource.doGetConnection(UnpooledDataSource.java:223)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:101)
[2024-06-05 15:12:11] [info] #011at 
org.apache.guacamole.auth.jdbc.DynamicallyAuthenticatedDataSource$1.getConnection(DynamicallyAuthenticatedDataSource.java:74)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:452)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:100)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.transaction.jdbc.JdbcTransaction.openConnection(JdbcTransaction.java:145)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:67)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:348)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:89)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:64)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:336)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:158)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:110)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:90)
[2024-06-05 15:12:11] [info] #011at 
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:154)
[2024-06-05 15:12:11] [info] #011... 74 common frames omitted

</code>

The setup I have :

- Debian 12
- postgresql 15
- guacamole 1.5.5 + jdbc - ldap - totp

- tomcat9

I think there's a communication problem between the jdbc module and postgresql.

For postgresql I only edited postgresql.conf to add listen_addresses = 
'localhost' .
For guacamole.properties :
<code>
# PostgreSQL propertiespostgresql-hostname: localhost
postgresql-database: guacamoledb
postgresql-username: guacamoleuser
postgresql-password: password
postgresql-user-password-min-length: 16
postgresql-user-password-require-multiple-case: true
postgresql-user-password-require-symbol: false
postgresql-user-password-require-digit: true
postgresql-user-password-prohibit-username: true
postgresql-user-password-min-age: 7
postgresql-user-password-max-age: 180
postgresql-user-password-history-size: 12
postgresql-default-max-connections: 0
postgresql-default-max-group-connections: 0
postgresql-default-max-connections-per-user: 0
postgresql-default-max-group-connections-per-user: 0
postgresql-absolute-max-connections: 0
postgresql-user-required: true
postgresql-auto-create-accounts: true
</code>

Any ideas ?

Note: if I skip postgres module the ldap login works no problem.

Thanks you,
Regards,

Alexis

Reply via email to