share-extras / js-console

Administration Console component for Alfresco Share, that enables the execution of arbitrary JavaScript code against the repository
Other
74 stars 53 forks source link

Web script /de/fme/jsconsole/serverInfo fails when search subsystem is not available #21

Closed AFaust closed 9 years ago

AFaust commented 10 years ago

The web script /de/fme/jsconsole/serverInfo fails when the search subsystem is not available, i.e. SOLR is not running. This is due to the fact that serverInfo.get.js uses search to retrieve the counts of sites, groups, people, tags, deployed workflows, folders, contents and checked out nodes. The entire set of data is only used to pre-populate the scriptOutput

element. Is this operation even relevant (any more)?

"callstack" : [ "" ,"org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 11230056 Request failed 503 \/solr\/alfresco\/alfresco?wt=json&fl=DBID%2Cscore&rows=1000&df=TEXT&start=0&locale=de&alternativeDic=DEFAULT_DICTIONARY&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON" ,"org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.executeQuery(SolrQueryHTTPClient.java:459)" ,"org.alfresco.repo.search.impl.solr.SolrQueryLanguage.executeQuery(SolrQueryLanguage.java:49)" ,"org.alfresco.repo.search.impl.solr.SolrSearchService.query(SolrSearchService.java:348)" ,"org.alfresco.repo.search.impl.solr.SolrSearchService.query(SolrSearchService.java:152)" ,"org.alfresco.repo.search.impl.lucene.LuceneCategoryServiceImpl.getClassificationNodes(LuceneCategoryServiceImpl.java:311)" ,"org.alfresco.repo.search.impl.lucene.LuceneCategoryServiceImpl.getRootCategories(LuceneCategoryServiceImpl.java:423)" ,"sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)" ,"sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)" ,"sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)" ,"java.lang.reflect.Method.invoke(Method.java:606)" ,"org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:215)" ,"com.sun.proxy.$Proxy288.getRootCategories(Unknown Source)" ,"sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)" ,"sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)" ,"sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)" ,"java.lang.reflect.Method.invoke(Method.java:606)" ,"org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:72)" ,"org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)" ,"org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)" ,"com.sun.proxy.$Proxy82.getRootCategories(Unknown Source)" ,"sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)" ,"sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)" ,"sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)" ,"java.lang.reflect.Method.invoke(Method.java:606)" ,"org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)" ,"org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)" ,"org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)" ,"net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)" ,"org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)" ,"org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)" ,"org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)" ,"org.alfresco.repo.audit.AuditMethodInterceptor.proceedWithAudit(AuditMethodInterceptor.java:247)" ,"org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:213)" ,"org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:166)" ,"org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)" ,"org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)" ,"org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)" ,"org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)" ,"com.sun.proxy.$Proxy82.getRootCategories(Unknown Source)" ,"org.alfresco.repo.tagging.TaggingServiceImpl.getTags(TaggingServiceImpl.java:512)" ,"sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)" ,"sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)" ,"sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)" ,"java.lang.reflect.Method.invoke(Method.java:606)" ,"org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)" ,"org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)" ,"org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)" ,"org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)" ,"org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)" ,"org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)" ,"org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)" ,"org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:196)" ,"org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:166)" ,"org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)" ,"org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)" ,"org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)" ,"org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)" ,"com.sun.proxy.$Proxy99.getTags(Unknown Source)" ,"org.alfresco.repo.tagging.script.ScriptTaggingService.getTags(ScriptTaggingService.java:59)" ,"sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)" ,"sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)" ,"sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)" ,"java.lang.reflect.Method.invoke(Method.java:606)" ,"org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155)" ,"org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243)" ,"org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3237)" ,"org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2394)" ,"org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)" ,"org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)" ,"org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)" ,"org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:173)" ,"org.nabucco.alfresco.enhScriptEnv.repo.script.EnhancedRhinoScriptProcessor.executeScriptInScopeImpl(EnhancedRhinoScriptProcessor.java:1115)" ,"org.nabucco.alfresco.enhScriptEnv.repo.script.EnhancedRhinoScriptProcessor.executeScriptImpl(EnhancedRhinoScriptProcessor.java:1057)" ,"org.nabucco.alfresco.enhScriptEnv.repo.script.EnhancedRhinoScriptProcessor.execute(EnhancedRhinoScriptProcessor.java:219)" ,"org.alfresco.repo.processor.ScriptServiceImpl.execute(ScriptServiceImpl.java:212)" ,"org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:174)" ,"org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:102)" ,"com.prodyna.alfresco.modules.compatibility.common.webscripts.CustomizationFixedDeclarativeWebScript.executeScript(CustomizationFixedDeclarativeWebScript.java:50)" ,"org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:86)" ,"sun.reflect.GeneratedMethodAccessor623.invoke(Unknown Source)" ,"sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)" ,"java.lang.reflect.Method.invoke(Method.java:606)" ,"org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)" ,"org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)" ,"org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)" ,"com.prodyna.alfresco.modules.compatibility.common.webscripts.VersionAwareWebScriptPathMappingInterceptor.invoke(VersionAwareWebScriptPathMappingInterceptor.java:74)" ,"org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)" ,"org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)" ,"com.sun.proxy.$Proxy176.execute(Unknown Source)" ,"org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:429)" ,"org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:452)" ,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:491)" ,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:529)" ,"org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:341)" ,"com.prodyna.alfresco.modules.compatibility.repo.adapter.alf42.web.scripts.ExtensibilityTenantContainer.executeScript(ExtensibilityTenantContainer.java:67)" ,"org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:378)" ,"org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)" ,"org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)" ,"javax.servlet.http.HttpServlet.service(HttpServlet.java:722)" ,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)" ,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)" ,"org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)" ,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)" ,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)" ,"com.prodyna.alfresco.modules.utility.repo.web.filter.ClearSecurityContextFilter.doFilter(ClearSecurityContextFilter.java:50)" ,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)" ,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)" ,"org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)" ,"org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)" ,"org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)" ,"org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)" ,"org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)" ,"org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)" ,"org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)" ,"org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)" ,"org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)" ,"org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)" ,"java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)" ,"java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)" ,"java.lang.Thread.run(Thread.java:724)" ,"org.alfresco.scripts.ScriptException: 11230057 Wrapped org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 11230056 Request failed 503 \/solr\/alfresco\/alfresco?wt=json&fl=DBID%2Cscore&rows=1000&df=TEXT&start=0&locale=de&alternativeDic=DEFAULT_DICTIONARY&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON (file:\/srv\/alfresco\/webapps\/repo\/alfresco\/WEB-INF\/classes\/alfresco\/extension\/templates\/webscripts\/de\/fme\/jsconsole\/serverInfo.get.js#30)" ,"org.nabucco.alfresco.enhScriptEnv.repo.script.EnhancedRhinoScriptProcessor.executeScriptImpl(EnhancedRhinoScriptProcessor.java:1069)" ,"org.springframework.extensions.webscripts.WebScriptException: 11230006 Wrapped Exception (with status template): 11230057 Wrapped org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 11230056 Request failed 503 \/solr\/alfresco\/alfresco?wt=json&fl=DBID%2Cscore&rows=1000&df=TEXT&start=0&locale=de&alternativeDic=DEFAULT_DICTIONARY&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON (file:\/srv\/alfresco\/webapps\/repo\/alfresco\/WEB-INF\/classes\/alfresco\/extension\/templates\/webscripts\/de\/fme\/jsconsole\/serverInfo.get.js#30)" ,"org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1067)"

]

AFaust commented 10 years ago

Addendum: I have been running JS Console on a system used for bulk load testing. Once I have a substantial amount of nodes in my system (more than 500k), the serverinfo.get web script is practically guaranteed to time out on the Share Alfresco Proxy, while the backend web script continues to waste CPU cycles going through up to 1000000 content, folders and checked out items each.

jgoldhammer commented 10 years ago

Yes, the serverinfo are provided now in a separate tab and are only loaded when the user wants to fetch the infos. Nevertheless, SOLR should be able to search for all documents and return the number of nodes in a reasonable time. Any idea why the processing takes so long?