Cannot access Users setting page

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Cannot access Users setting page

johnseekins
After a re-install of 0.9.14 (to address some problems with the way our
system was set up) we currently see the following error every time we try to
access the Users setting page:

Jun 22, 2018 3:36:31 PM com.sun.jersey.spi.container.ContainerResponse
mapMappableContainerException
SEVERE: The RuntimeException could not be mapped to a response, re-throwing
to the HTTP container
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: java.lang.IllegalArgumentException: No
enum constant
org.apache.guacamole.net.auth.permission.SystemPermission.Type.
### The error may exist in
org/apache/guacamole/auth/jdbc/permission/SystemPermissionMapper.xml
### The error may involve
org.apache.guacamole.auth.jdbc.permission.SystemPermissionMapper.select
### The error occurred while handling results
### SQL: SELECT             guacamole_system_permission.user_id,            
username,             permission         FROM guacamole_system_permission        
JOIN guacamole_user ON guacamole_system_permission.user_id =
guacamole_user.user_id         WHERE guacamole_system_permission.user_id = ?
### Cause: java.lang.IllegalArgumentException: No enum constant
org.apache.guacamole.net.auth.permission.SystemPermission.Type.
        at
org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
        at
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:111)
        at
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at
org.apache.ibatis.session.SqlSessionManager$SqlSessionInterceptor.invoke(SqlSessionManager.java:285)
        at com.sun.proxy.$Proxy29.selectList(Unknown Source)
        at
org.apache.ibatis.session.SqlSessionManager.selectList(SqlSessionManager.java:174)
        at
org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:119)
        at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:63)
        at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)
        at com.sun.proxy.$Proxy103.select(Unknown Source)
        at
org.apache.guacamole.auth.jdbc.permission.ModeledPermissionService.retrievePermissions(ModeledPermissionService.java:147)
        at
org.apache.guacamole.auth.jdbc.permission.SystemPermissionSet.getPermissions(SystemPermissionSet.java:77)
        at
org.apache.guacamole.rest.permission.APIPermissionSet.addSystemPermissions(APIPermissionSet.java:106)
        at
org.apache.guacamole.rest.permission.APIPermissionSet.<init>(APIPermissionSet.java:161)
        at
org.apache.guacamole.rest.permission.PermissionSetResource.getPermissions(PermissionSetResource.java:109)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at
com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
        at
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
        at
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
        at
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
        at
com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
        at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
        at
com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
        at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
        at
com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
        at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
        at
com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
        at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
        at
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
        at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
        at
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
        at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
        at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)
        at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
        at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
        at
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
        at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
        at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
        at
com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
        at
com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)
        at
com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
        at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)
        at
com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:221)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
        at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
        at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
        at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: No enum constant
org.apache.guacamole.net.auth.permission.SystemPermission.Type.
        at java.lang.Enum.valueOf(Enum.java:238)
        at
org.apache.ibatis.type.EnumTypeHandler.getNullableResult(EnumTypeHandler.java:47)
        at
org.apache.ibatis.type.EnumTypeHandler.getNullableResult(EnumTypeHandler.java:26)
        at
org.apache.ibatis.type.BaseTypeHandler.getResult(BaseTypeHandler.java:55)
        at
org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getPropertyMappingValue(DefaultResultSetHandler.java:393)
        at
org.apache.ibatis.executor.resultset.DefaultResultSetHandler.applyPropertyMappings(DefaultResultSetHandler.java:367)
        at
org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getRowValue(DefaultResultSetHandler.java:341)
        at
org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValuesForSimpleResultMap(DefaultResultSetHandler.java:294)
        at
org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValues(DefaultResultSetHandler.java:269)
        at
org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSet(DefaultResultSetHandler.java:239)
        at
org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSets(DefaultResultSetHandler.java:153)
        at
org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:60)
        at
org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:73)
        at
org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:60)
        at
org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267)
        at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137)
        at
org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96)
        at
org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:77)
        at
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)
        ... 67 more

15:36:31.007 [http-bio-8080-exec-4] DEBUG o.a.g.a.j.p.S.selectOne - ==>
Parameters: 2(Integer), ADMINISTER(String)
15:36:31.009 [http-bio-8080-exec-4] DEBUG o.a.g.a.j.p.S.selectOne - <==    
Total: 1
15:36:31.010 [http-bio-8080-exec-4] DEBUG o.a.i.t.jdbc.JdbcTransaction -
Resetting autocommit to true on JDBC Connection
[com.mysql.jdbc.JDBC4Connection@56595b07]
15:36:31.010 [http-bio-8080-exec-4] DEBUG o.a.i.t.jdbc.JdbcTransaction -
Closing JDBC Connection [com.mysql.jdbc.JDBC4Connection@56595b07]
15:36:31.010 [http-bio-8080-exec-4] DEBUG o.a.i.d.pooled.PooledDataSource -
Testing connection 1448696583 ...
15:36:31.011 [http-bio-8080-exec-4] DEBUG o.a.i.d.pooled.PooledDataSource -
Connection 1448696583 is GOOD!

I also cannot see the "Settings" Link under the user drop-down pane.
If I browse directly to /settings/history or other pages, they do
successfully load.

Enabling Debug logging hasn't indicated anything obvious. Any suggestions on
what to do?



--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Cannot access Users setting page

vnick
On Fri, Jun 22, 2018 at 15:42 johnseekins <[hidden email]> wrote:
After a re-install of 0.9.14 (to address some problems with the way our
system was set up) we currently see the following error every time we try to
access the Users setting page:

Jun 22, 2018 3:36:31 PM com.sun.jersey.spi.container.ContainerResponse
mapMappableContainerException
SEVERE: The RuntimeException could not be mapped to a response, re-throwing
to the HTTP container
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: java.lang.IllegalArgumentException: No
enum constant
org.apache.guacamole.net.auth.permission.SystemPermission.Type.

This type of error usually indicates a mismatch between guacamole components - that is, you have version 0.9.13-incubating of guacamole.war and 0.9.14 of the JDBC extension, or something similar.  Please verify that your components are all exactly the same version and from the same source - of you compiled the JDBC module from the git repo, also use that guacamole.war version.  If your downloaded a version from the web site, make sure all of the components are from that same version from the site.

Also try restarting Tomcat to make sure everything is loaded from scratch.

-Nick
Reply | Threaded
Open this post in threaded view
|

Re: Cannot access Users setting page

Mike Jumper
On Fri, Jun 22, 2018, 13:45 Nick Couchman <[hidden email]> wrote:
On Fri, Jun 22, 2018 at 15:42 johnseekins <[hidden email]> wrote:
After a re-install of 0.9.14 (to address some problems with the way our
system was set up) we currently see the following error every time we try to
access the Users setting page:

Jun 22, 2018 3:36:31 PM com.sun.jersey.spi.container.ContainerResponse
mapMappableContainerException
SEVERE: The RuntimeException could not be mapped to a response, re-throwing
to the HTTP container
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: java.lang.IllegalArgumentException: No
enum constant
org.apache.guacamole.net.auth.permission.SystemPermission.Type.

This type of error usually indicates a mismatch between guacamole components - that is, you have version 0.9.13-incubating of guacamole.war and 0.9.14 of the JDBC extension, or something similar.  Please verify that your components are all exactly the same version and from the same source - of you compiled the JDBC module from the git repo, also use that guacamole.war version.  If your downloaded a version from the web site, make sure all of the components are from that same version from the site.

Please also check that the database is for 0.9.14 and has not been upgraded for a newer version (the unreleased, in-progress 1.0.0 release). The error looks like your database contains system permission constants that don't exist in Guacamole 0.9.14, which shouldn't be the case.

- Mike

Reply | Threaded
Open this post in threaded view
|

Re: Cannot access Users setting page

johnseekins
In reply to this post by vnick
I'm downloading all three packages (guacamole-server, guacamole.war, and
guacamole-auth-jdbc) from http://apache.claz.org/guacamole/0.9.14/
(obviously this is an example host, I /am/ using the CDN) so they /should/
be the same version.



--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Cannot access Users setting page

johnseekins
In reply to this post by Mike Jumper
I have applied update schemas, but only those available in the
guacamole-0.9.14 tarball, so I would *assume* I've avoided 1.0 schemas...



--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Cannot access Users setting page

Mike Jumper
On Fri, Jun 22, 2018, 15:20 johnseekins <[hidden email]> wrote:
I have applied update schemas, but only those available in the
guacamole-0.9.14 tarball, so I would *assume* I've avoided 1.0 schemas...

Can you provide the output of the following query:

    SELECT DISTINCT permission FROM guacamole_system_permission;

- Mike

Reply | Threaded
Open this post in threaded view
|

Re: Cannot access Users setting page

johnseekins
mysql> SELECT DISTINCT permission FROM guacamole_system_permission;
+-------------------------+
| permission              |
+-------------------------+
|                         |
| CREATE_CONNECTION       |
| CREATE_CONNECTION_GROUP |
| CREATE_USER             |
| ADMINISTER              |
+-------------------------+
5 rows in set (0.00 sec)




--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Cannot access Users setting page

johnseekins
Any additional thoughts on this problem? It isn't world-ending, but it does
make maintenance more difficult.



--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Cannot access Users setting page

vnick
On Thu, Jul 5, 2018 at 2:52 PM johnseekins <[hidden email]> wrote:
Any additional thoughts on this problem? It isn't world-ending, but it does
make maintenance more difficult.



John,
My only suggestion is to completely blow away every part of your install - DROP the database and re-create it from the schema files, remove all extensions and the WAR file, and redeploy everything.  If you do not want to lose your current environment you could at least do this in a parallel test environment to see if it resolves the issue.  When you re-install, make sure that all your components match versions and come from the same source - that is, do not try to use a WAR file that you built from some version of source while using a JAR downloaded from the web site.  Make sure everything is either downloaded or built, including the DB schema files you use to create the database.  It really seems like at some point some component got rev'd a version while the rest of them stayed back, and you're hitting a problem with the mis-match between those versions.

-Nick