Start a Conversation

Unsolved

1 Rookie

 • 

5 Posts

139

February 29th, 2024 07:28

Could not Update WMS 4.0 to 4.1 (or later)

Hi,

we have problems with our update from WMS 4.0 to 4.1 (or later). The update runs without any problems.

After login to the new version of WMS 4.1, we only get the error message that there are internal errors or misconfigurations.

Looking into the stratus.log shows following errors like:

2024-02-29 07:28:49,398 [ERROR] https-openssl-nio-8080-exec-4 <com.wyse.stratus.server.web.advice.ExceptionAdvice::handleException,78> Exception occurred:org.springframework.dao.IncorrectResultSizeDataAccessException: Query { "$java" : Query: { "tenantId" : 2, "isActive" : true}, Fields: {}, Sort: {} } returned non unique result.at org.springframework.data.mongodb.core.ExecutableFindOperationSupport2$ExecutableFindSupport.oneValue(ExecutableFindOperationSupport2.java:139) ~[stratus-server-4.8.1-SNAPSHOT.jar:3.4.11]at org.springframework.data.mongodb.repository.query.AbstractMongoQuery.lambda$getExecution$6(AbstractMongoQuery.java:188) ~[spring-data-mongodb-3.4.11.jar:3.4.11]at org.springframework.data.mongodb.repository.query.AbstractMongoQuery.doExecute(AbstractMongoQuery.java:152) ~[spring-data-mongodb-3.4.11.jar:3.4.11]at org.springframework.data.mongodb.repository.query.AbstractMongoQuery.execute(AbstractMongoQuery.java:127) ~[spring-data-mongodb-3.4.11.jar:3.4.11]at org.springframework.data.repository.core.support.RepositoryMethodInvoker.doInvoke(RepositoryMethodInvoker.java:137) ~[spring-data-commons-2.7.11.jar:2.7.11]at org.springframework.data.repository.core.support.RepositoryMethodInvoker.invoke(RepositoryMethodInvoker.java:121) ~[spring-data-commons-2.7.11.jar:2.7.11]at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.doInvoke(QueryExecutorMethodInterceptor.java:160) ~[spring-data-commons-2.7.11.jar:2.7.11]at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.invoke(QueryExecutorMethodInterceptor.java:139) ~[spring-data-commons-2.7.11.jar:2.7.11]at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.27.jar:5.3.27]at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:81) ~[spring-data-commons-2.7.11.jar:2.7.11]at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.27.jar:5.3.27]at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) ~[spring-aop-5.3.27.jar:5.3.27]at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.27.jar:5.3.27]at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:220) ~[spring-aop-5.3.27.jar:5.3.27]at jdk.proxy3.$Proxy389.getTenantKeyConfig(Unknown Source) ~[?:?]at com.wyse.stratus.server.web.interceptor.AdminRequestInterceptor.replaceSessionInfo(AdminRequestInterceptor.java:613) ~[classes/:?]at com.wyse.stratus.server.web.interceptor.AdminRequestInterceptor.preHandle(AdminRequestInterceptor.java:463) ~[classes/:?]at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.3.27.jar:5.3.27]at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.3.27.jar:5.3.27]at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.27.jar:5.3.27]at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) ~[spring-tx-5.3.27.jar:5.3.27]at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) ~[spring-tx-5.3.27.jar:5.3.27]at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) ~[spring-tx-5.3.27.jar:5.3.27]at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.27.jar:5.3.27]at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:220) ~[spring-aop-5.3.27.jar:5.3.27]at jdk.proxy3.$Proxy656.preHandle(Unknown Source) ~[?:?]at org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:148) ~[spring-webmvc-5.3.27.jar:5.3.27]at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067) [spring-webmvc-5.3.27.jar:5.3.27]at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:965) [spring-webmvc-5.3.27.jar:5.3.27]at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) [spring-webmvc-5.3.27.jar:5.3.27]at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) [spring-webmvc-5.3.27.jar:5.3.27]at javax.servlet.http.HttpServlet.service(HttpServlet.java:529) [servlet-api.jar:4.0.FR]at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) [spring-webmvc-5.3.27.jar:5.3.27]at javax.servlet.http.HttpServlet.service(HttpServlet.java:623) [servlet-api.jar:4.0.FR]at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209) [catalina.jar:9.0.75]at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) [catalina.jar:9.0.75]at org.springframework.web.servlet.resource.ResourceUrlEncodingFilter.doFilter(ResourceUrlEncodingFilter.java:67) [spring-webmvc-5.3.27.jar:5.3.27]at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) [catalina.jar:9.0.75]at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) [catalina.jar:9.0.75]at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) [tomcat-websocket.jar:9.0.75]at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) [catalina.jar:9.0.75]at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) [catalina.jar:9.0.75]at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:126) [catalina.jar:9.0.75]at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) [catalina.jar:9.0.75]at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) [catalina.jar:9.0.75]at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:352) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:117) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:131) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:85) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100) [spring-security-web-5.8.3.jar:?]at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:164) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:227) [spring-security-web-5.8.3.jar:?]at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:221) [spring-security-web-5.8.3.jar:?]at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.3.jar:5.8.3]at com.wyse.stratus.server.security.LocaleContextFilter.doFilterInternal(LocaleContextFilter.java:79) [stratus-server-4.8.1-SNAPSHOT.jar:?]at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.27.jar:5.3.27]at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter.doFilter(AbstractPreAuthenticatedProcessingFilter.java:150) [spring-security-web-5.8.3.jar:5.8.3]at com.wyse.stratus.server.security.StratusPreAuthenticatedProcessingFilter.doFilter(StratusPreAuthenticatedProcessingFilter.java:267) [stratus-server-4.8.1-SNAPSHOT.jar:?]at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93) [spring-security-web-5.8.3.jar:5.8.3]at com.wyse.stratus.server.security.StratusLogoutFilter.doFilter(StratusLogoutFilter.java:100) [stratus-server-4.8.1-SNAPSHOT.jar:?]at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:117) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:225) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:190) [spring-security-web-5.8.3.jar:5.8.3]at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354) [spring-web-5.3.27.jar:5.3.27]at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267) [spring-web-5.3.27.jar:5.3.27]at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) [catalina.jar:9.0.75]at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) [catalina.jar:9.0.75]at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) [spring-web-5.3.27.jar:5.3.27]at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) [spring-web-5.3.27.jar:5.3.27]at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) [catalina.jar:9.0.75]at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) [catalina.jar:9.0.75]at org.apache.catalina.filters.RestCsrfPreventionFilter.doFilter(RestCsrfPreventionFilter.java:125) [catalina.jar:9.0.75]at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178) [catalina.jar:9.0.75]at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153) [catalina.jar:9.0.75]at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) [catalina.jar:9.0.75]at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) [catalina.jar:9.0.75]at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:596) [catalina.jar:9.0.75]at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130) [catalina.jar:9.0.75]at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) [catalina.jar:9.0.75]at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:673) [catalina.jar:9.0.75]at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [catalina.jar:9.0.75]at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [catalina.jar:9.0.75]at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390) [tomcat-coyote.jar:9.0.75]at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) [tomcat-coyote.jar:9.0.75]at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926) [tomcat-coyote.jar:9.0.75]at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791) [tomcat-coyote.jar:9.0.75]at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) [tomcat-coyote.jar:9.0.75]at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) [tomcat-util.jar:9.0.75]at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [tomcat-util.jar:9.0.75]at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:9.0.75]at java.lang.Thread.run(Thread.java:833) [?:?]

It seems that there is a problem with the repository configuration in the mongoDB.

Try to investigate following error in the mongoDB but without any success.

...
Query { "$java" : Query: { "tenantId" : 2, "isActive" : true}, Fields: {}, Sort: {} } returned non unique result.
...

Could someone please help us to solve this problem.

Thanks in advance.

1 Rookie

 • 

5 Posts

March 6th, 2024 09:05

We solved the problem just now.

The problem was that there are multiple entries in following database tables.

  • tenantKeyConfig
  • tenantOnPremInfo

We set these duplicate entries to "inactive".

After this step the login to wms worked again.

1 Rookie

 • 

2 Posts

September 23rd, 2024 13:18

Hi, we are having a very similar issue, how do you connect to the DB to edit the entries?

Br

Mela

1 Rookie

 • 

6 Posts

December 28th, 2024 14:15

@topstar1 Man, I love you for that comment. We also set all the old entries on these two tables to "is active : false" and it worked immediately.

@Mela84 I know I'm late, but maybe you've been working with snapshots and still have this problem. The easiest way with a GUI is to install MongoDB Compass on the WMS server. In MongoDB Compass you can connect to Mongo DB, just select local host and enter the credentials in the advanced field. You will need the Stratus credentials that were set up when you first installed WMS. The username should be Stratus and your own password. You can then search for the two tables mentioned above. There will be several entries in this table, edit them all except the one with the latest timestamp and change the 'isActive' field from 'true' to 'false'. Make sure you click 'Update' below the changed entries. If there is only one active entry left in each table, you can try logging in again.

As I found this by accident, below are some keywords:

WMS Server was unable to complete your request due to internal error or misconfiguration

Der WMS-Server konnte die Anfrage aufgrund eines internen Fehlers oder einer Fehlkonfiguration nicht abschließen.

org.springframework.dao.IncorrectResultSizeDataAccessException

{ "$java" : Query: { "tenantId" : 2, "isActive" : true}, Fields: {}, Sort: {} } returned non unique result.

jdk.proxy3.$Proxy394.getTenantKeyConfig(Unknown Source)

1 Rookie

 • 

6 Posts

December 28th, 2024 19:36

Just to continue with the problems:


Starting with version 4.2 you need a free licence (in exchange for your data of course), but the licence key doesn't work with 4.2.

Tried to upgrade to 4.4.1 without a licence, which failed (rollback was possible).

Upgraded to 4.3 successfully and now the key works.

Upgrade to 4.4.1 failed again (rollback possible)

Noticed the same error at the top of the Portal Management page when trying to list repositories (Could not complete your request due to internal error or misconfiguration)

Checked the Stratus log again and found "IncorrectResultSizeDataAccessException: Query { "$java" : Request: { "deviceId" : 1, "tenantId" : 2}, Fields: {}, Sort: {} } returned non-unique result".

It seems that they stopped filtering on the "isactive" field, so I completely deleted the old entries in tenantKeyConfig and tenantOnPremInfo (exported them before).

Installed 4.3 hotfix

Upgraded to 4.4.0 (needed to increase disk size as 14Gb free space is required) successful

Upgraded to 4.4.1 successful

This takes me almost a day, thank you DELL, maybe IGEL next time....

No Events found!

Top