Ontotext database throws
NotEnoughMemoryForDistinctGroupBy: Insufficient free Heap Memory ... , threshold:250Mb
although parameter defaut.min.distinct.threshold=1074000000
set.
It seems that setting the parameter is not taken into account by the Ontotext engine und thus we are still getting the error.
We are using Ontotext 8.10.1-Free in Docker.
Running the container we provide as much memory to the container as is set for the Xmx parameter
We tried different memory settings Xms, Xmx and the aforementioned threshold parameter. But in the logs it states that the threshold's default value of 250m is being used.
This is how our process info looks at runtime:
> ps auxw|grep java
root 1 85.4 47.1 5729308 964184 ? Ssl 09:24 0:46 /docker-java-home/bin/java -XX:MaxDirectMemorySize=128G -Xms2g -Xmx2g -Ddefaut.min.distinct.threshold=1074000000
-Djava.net.preferIPv4Stack=true -XX:+UseParallelGC -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/graphdb/dist/heapdump.hprof -XX:OnOutOfMemoryError=kill -9 %p
-Djava.awt.headless=true -Dfile.encoding=UTF-8 -Dgraphdb.foreground=yes -Dgraphdb.dist=/opt/graphdb/dist -cp /opt/graphdb/dist/lib/* -Dgraphdb.home=/opt/graphdb/home com.ontotext.graphdb.server.GraphDBWorkbench
However, when we look into the logs (main-... .log) we see statements like these (mind the line where I added 2 stars at the beginning):
[INFO ] 2019-08-08 09:33:22,793 [repositories/kg-test-graph-import | c.o.c.AbstractParameter] Configured parameter 'FSIPC' to default value '2'
[INFO ] 2019-08-08 09:33:23,138 [repositories/kg-test-graph-import | c.o.g.s.StatementsController] POST SPARQL update request to repository
[INFO ] 2019-08-08 09:33:23,244 [repositories/kg-test-graph-import | c.o.g.s.StatementsController] POST SPARQL update request to repository
[INFO ] 2019-08-08 09:33:23,299 [repositories/kg-test-graph-import | c.o.f.s.RepositoryController] GET query -1149340244
[INFO ] 2019-08-08 09:33:23,334 [repositories/kg-test-graph-import | c.o.c.AbstractParameter] Configured parameter 'order.construct' to default value 'false'
**[INFO ] 2019-08-08 09:33:23,345 [repositories/kg-test-graph-import | c.o.c.AbstractParameter] Configured parameter 'default.min.distinct.threshold' to default value '250.0M'
[INFO ] 2019-08-08 09:33:23,357 [repositories/kg-test-graph-import | c.o.g.s.GraphQueryResultView] Request for query -1149340244 is finished
[INFO ] 2019-08-08 09:33:23,367 [repositories/kg-test-graph-import | c.o.g.s.StatementsController] POST SPARQL update request to repository
[INFO ] 2019-08-08 09:33:23,415 [repositories/kg-test-graph-import | c.o.g.s.StatementsController] POST SPARQL update request to repository
[INFO ] 2019-08-08 09:33:23,487 [repositories/kg-test-graph-import | c.o.g.s.StatementsController] POST SPARQL update request to repository
[INFO ] 2019-08-08 09:33:23,704 [repositories/kg-test-graph-import | c.o.f.s.RepositoryController] GET query 1759975767
Moreover the ontotext logs show the exceptions that can also be witnessed in the client running our tests and Sparql request against the DB:
[WARN ] 2019-08-08 09:41:10,442 [repositories/kg-test-graph-import | c.o.t.u.DistinctMemoryMonitor] Insufficient free Heap Memory 238Mb for group by and distinct, threshold 250Mb, reached 0Mb
[ERROR] 2019-08-08 09:41:10,469 [repositories/kg-test-graph-import | c.o.t.SailConnectionImpl] Memory limit for GroupBy/Distinct reached
com.ontotext.trree.util.NotEnoughMemoryForDistinctGroupBy: Insufficient free Heap Memory 238Mb for group by and distinct, threshold:250Mb, reached 0Mb
at com.ontotext.trree.util.DistinctMemoryMonitor.updateGroupByMemory(DistinctMemoryMonitor.java:73)
at com.ontotext.trree.util.LongKeyBase.<init>(LongKeyBase.java:38)
at com.ontotext.trree.util.LongKeySet.<init>(LongKeySet.java:26)
at com.ontotext.trree.query.OwlimDistinctIteration.<init>(OwlimDistinctIteration.java:20)
at com.ontotext.trree.query.OwlimEvaluationStrategyImpl.evaluate(OwlimEvaluationStrategyImpl.java:1086)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:639)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:228)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.TupleFunctionEvaluationStrategy.evaluate(TupleFunctionEvaluationStrategy.java:65)
at com.ontotext.trree.query.OwlimEvaluationStrategyImpl.evaluate(OwlimEvaluationStrategyImpl.java:135)
at org.eclipse.rdf4j.query.algebra.evaluation.iterator.JoinIterator.<init>(JoinIterator.java:42)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:824)
at com.ontotext.trree.query.OwlimEvaluationStrategyImpl.evaluate(OwlimEvaluationStrategyImpl.java:237)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:796)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:230)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.TupleFunctionEvaluationStrategy.evaluate(TupleFunctionEvaluationStrategy.java:65)
at com.ontotext.trree.query.OwlimEvaluationStrategyImpl.evaluate(OwlimEvaluationStrategyImpl.java:135)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:650)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:228)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.TupleFunctionEvaluationStrategy.evaluate(TupleFunctionEvaluationStrategy.java:65)
at com.ontotext.trree.query.OwlimEvaluationStrategyImpl.evaluate(OwlimEvaluationStrategyImpl.java:135)
at com.ontotext.trree.SailConnectionImpl.evaluateWithRepoConnectionInternal(SailConnectionImpl.java:1786)
at com.ontotext.trree.SailConnectionImpl.evaluateWithRepoConnection(SailConnectionImpl.java:1679)
at com.ontotext.trree.SailConnectionImpl.evaluateInternal(SailConnectionImpl.java:249)
at com.ontotext.trree.SailConnectionImpl.evaluate(SailConnectionImpl.java:2316)
at org.eclipse.rdf4j.repository.sail.helpers.SailUpdateExecutor.evaluateWhereClause(SailUpdateExecutor.java:487)
at org.eclipse.rdf4j.repository.sail.helpers.SailUpdateExecutor.executeModify(SailUpdateExecutor.java:450)
at org.eclipse.rdf4j.repository.sail.helpers.SailUpdateExecutor.executeUpdate(SailUpdateExecutor.java:121)
at org.eclipse.rdf4j.repository.sail.SailUpdate.execute(SailUpdate.java:64)
at com.ontotext.trree.monitorRepository.MonitorRepositoryConnection$1.execute(MonitorRepositoryConnection.java:382)
at org.eclipse.rdf4j.http.server.repository.statements.StatementsController.getSparqlUpdateResult(StatementsController.java:254)
at org.eclipse.rdf4j.http.server.repository.statements.StatementsController.handleRequestInternal(StatementsController.java:114)
at com.ontotext.graphdb.sesame.StatementsController.handleRequestInternal(StatementsController.java:41)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:177)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:52)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:908)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.ontotext.forest.core.request.RequestFilter.doFilterInternal(RequestFilter.java:45)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.github.ziplet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:263)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.ontotext.forest.security.AdminDelegatingFilterProxy.doFilter(AdminDelegatingFilterProxy.java:38)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
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)
[ERROR] 2019-08-08 09:41:10,549 [repositories/kg-test-graph-import | c.o.f.s.GraphDBProtocolExceptionResolver] Error while handling request (500)
org.eclipse.rdf4j.http.server.ServerHTTPException: org.eclipse.rdf4j.query.UpdateExecutionException: org.eclipse.rdf4j.sail.SailException: com.ontotext.trree.util.NotEnoughMemoryForDistinctGroupBy: Insufficient free Heap Memory 238Mb for group by and distinct, threshold:250Mb, reached 0Mb
at org.eclipse.rdf4j.http.server.repository.statements.StatementsController.getSparqlUpdateResult(StatementsController.java:266)
at org.eclipse.rdf4j.http.server.repository.statements.StatementsController.handleRequestInternal(StatementsController.java:114)
at com.ontotext.graphdb.sesame.StatementsController.handleRequestInternal(StatementsController.java:41)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:177)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:52)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:908)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.ontotext.forest.core.request.RequestFilter.doFilterInternal(RequestFilter.java:45)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.github.ziplet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:263)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.ontotext.forest.security.AdminDelegatingFilterProxy.doFilter(AdminDelegatingFilterProxy.java:38)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
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: org.eclipse.rdf4j.query.UpdateExecutionException: org.eclipse.rdf4j.sail.SailException: com.ontotext.trree.util.NotEnoughMemoryForDistinctGroupBy: Insufficient free Heap Memory 238Mb for group by and distinct, threshold:250Mb, reached 0Mb
at org.eclipse.rdf4j.repository.sail.SailUpdate.execute(SailUpdate.java:69)
at com.ontotext.trree.monitorRepository.MonitorRepositoryConnection$1.execute(MonitorRepositoryConnection.java:382)
at org.eclipse.rdf4j.http.server.repository.statements.StatementsController.getSparqlUpdateResult(StatementsController.java:254)
... 45 common frames omitted
Caused by: org.eclipse.rdf4j.sail.SailException: com.ontotext.trree.util.NotEnoughMemoryForDistinctGroupBy: Insufficient free Heap Memory 238Mb for group by and distinct, threshold:250Mb, reached 0Mb
at com.ontotext.trree.SailConnectionImpl.evaluateWithRepoConnectionInternal(SailConnectionImpl.java:1815)
at com.ontotext.trree.SailConnectionImpl.evaluateWithRepoConnection(SailConnectionImpl.java:1679)
at com.ontotext.trree.SailConnectionImpl.evaluateInternal(SailConnectionImpl.java:249)
at com.ontotext.trree.SailConnectionImpl.evaluate(SailConnectionImpl.java:2316)
at org.eclipse.rdf4j.repository.sail.helpers.SailUpdateExecutor.evaluateWhereClause(SailUpdateExecutor.java:487)
at org.eclipse.rdf4j.repository.sail.helpers.SailUpdateExecutor.executeModify(SailUpdateExecutor.java:450)
at org.eclipse.rdf4j.repository.sail.helpers.SailUpdateExecutor.executeUpdate(SailUpdateExecutor.java:121)
at org.eclipse.rdf4j.repository.sail.SailUpdate.execute(SailUpdate.java:64)
... 47 common frames omitted
Caused by: com.ontotext.trree.util.NotEnoughMemoryForDistinctGroupBy: Insufficient free Heap Memory 238Mb for group by and distinct, threshold:250Mb, reached 0Mb
at com.ontotext.trree.util.DistinctMemoryMonitor.updateGroupByMemory(DistinctMemoryMonitor.java:73)
at com.ontotext.trree.util.LongKeyBase.<init>(LongKeyBase.java:38)
at com.ontotext.trree.util.LongKeySet.<init>(LongKeySet.java:26)
at com.ontotext.trree.query.OwlimDistinctIteration.<init>(OwlimDistinctIteration.java:20)
at com.ontotext.trree.query.OwlimEvaluationStrategyImpl.evaluate(OwlimEvaluationStrategyImpl.java:1086)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:639)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:228)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.TupleFunctionEvaluationStrategy.evaluate(TupleFunctionEvaluationStrategy.java:65)
at com.ontotext.trree.query.OwlimEvaluationStrategyImpl.evaluate(OwlimEvaluationStrategyImpl.java:135)
at org.eclipse.rdf4j.query.algebra.evaluation.iterator.JoinIterator.<init>(JoinIterator.java:42)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:824)
at com.ontotext.trree.query.OwlimEvaluationStrategyImpl.evaluate(OwlimEvaluationStrategyImpl.java:237)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:796)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:230)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.TupleFunctionEvaluationStrategy.evaluate(TupleFunctionEvaluationStrategy.java:65)
at com.ontotext.trree.query.OwlimEvaluationStrategyImpl.evaluate(OwlimEvaluationStrategyImpl.java:135)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:650)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:228)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.TupleFunctionEvaluationStrategy.evaluate(TupleFunctionEvaluationStrategy.java:65)
at com.ontotext.trree.query.OwlimEvaluationStrategyImpl.evaluate(OwlimEvaluationStrategyImpl.java:135)
at com.ontotext.trree.SailConnectionImpl.evaluateWithRepoConnectionInternal(SailConnectionImpl.java:1786)
... 54 common frames omitted
[INFO ] 2019-08-08 09:41:10,666 [repositories/kg-test-graph-import | c.o.g.s.StatementsController] POST SPARQL update request to repository
What are our options to mitigate the situation?
Currently I am not able to proceed with our software to get it up and running again due to the failing tests.
Backround here is that we are evaluating to switch to Ontotext from another triple store.
Lots of thanks and
best regards
Tom
Got it working for now.
It seems to be a Docker Mac specific problem. By default, only 2GB of memory gets allocated to the docker engine. Raising that and giving the onto process enough memory (Xmx) solved the problem for me now.
See below screenshot for the settings.
Got there by DockerIcon -> Preferences -> Advanced
Docker memory preferences
Related
I really need your advise regarding error handling in Spring Integration when using its DefaultResponseErrorHandler class for outbound gateway.
At the moment everything works fine for xml-config defined below except returning actual error code. For example, when I call ${http.url}/profiles?pid={pid} with non-existing parameter pid instead of correct call ${http.url}/profiles?vin={vin} with existing parameter vin, I always get 500-error (Internal Server Error) instead of expected 400-error (Bad Request).
Any ideas would be appreciated!
<int-http:inbound-gateway id="service.rest.profiles"
request-channel="service.rest.profilesChannel"
path="/profiles"
payload-expression="#requestParams.vin"
message-converters="service.rest.jsonMessageConverter"
header-mapper="service.rest.headerMapper"
error-channel="service.rest.httpErrorInputChannel"
reply-channel="service.rest.httpResponseChannel"
supported-methods="GET"/>
<int:channel id="service.rest.profilesChannel"/>
<int:service-activator input-channel="service.rest.profilesChannel"
ref="service.rest.profileRestService" method="getProfiles"/>
-----------------------------------------------------------------------------------
<bean id="api.rest.errorHandler"
class="org.springframework.web.client.DefaultResponseErrorHandler"/>
..........
<int:channel id="api.json.rest.profilesChannel"/>
<int-http:outbound-gateway
url="${http.url}/profiles?vin={vin}"
request-channel="api.json.rest.profilesChannel"
http-method="GET"
message-converters="api.rest.jsonMessageConverter"
header-mapper="api.rest.headerMapper"
error-handler="api.rest.errorHandler"
expected-response-type="com.example.ProfilesResponse">
<int-http:uri-variable name="vin" expression="payload"/>
</int-http:outbound-gateway>
For mentioned above 500-error I'm getting the following record in the log file:
19-May-2020 15:12:37.665 SEVERE [http-nio-8080-exec-8] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [dispatcherServlet] in context with path [/service-rest] threw exception
org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'pid' cannot be found on object of type 'org.springframework.util.LinkedMultiValueMap' - maybe not public or not valid?
at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:217)
at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:104)
at org.springframework.expression.spel.ast.PropertyOrFieldReference.access$000(PropertyOrFieldReference.java:51)
at org.springframework.expression.spel.ast.PropertyOrFieldReference$AccessorLValue.getValue(PropertyOrFieldReference.java:406)
at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:90)
at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:109)
at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:265)
at org.springframework.integration.http.inbound.HttpRequestHandlingEndpointSupport.actualDoHandleRequest(HttpRequestHandlingEndpointSupport.java:309)
at org.springframework.integration.http.inbound.HttpRequestHandlingEndpointSupport.doHandleRequest(HttpRequestHandlingEndpointSupport.java:253)
at org.springframework.integration.http.inbound.HttpRequestHandlingMessagingGateway.handleRequest(HttpRequestHandlingMessagingGateway.java:112)
at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:53)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:128)
at org.springframework.boot.web.servlet.support.ErrorPageFilter.access$000(ErrorPageFilter.java:66)
at org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:103)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:121)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
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)
5xx errors represent a server error; 4xx errors are returned by the server due to some problem with the request from the client.
If you are getting a 500 error when you expect a 4xx error then it means the servers is not properly handling the condition and returning the wrong status code.
Recently one of our Spotfire environments got down out of a sudden (not sure what happened). When I try to open the server's web interface (i.e. access "Notes & Services") I get that:
When I SSHed to it and ran ps -ef | grep tomcat it listed only one process:
user 27247 26393 0 11:33 pts/1 00:00:00 grep --color=auto tomcat
When I did the same in a working Spotfire server environment it showed 2 processes (including the one above):
root 1623 1 1 Nov02 ? 03:15:21 /home/ec2-user/tss/jdk/jre/bin/java -Djava.util.logging.config.file=/home/ec2-user/tss/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -server -XX:+AlwaysPreTouch -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:+DisableExplicitGC -Xms512M -Xmx4096M -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dcom.sun.management.jmxremote -Dorg.apache.catalina.session.StandardSession.ACTIVITY_CHECK=true -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dignore.endorsed.dirs= -classpath /home/ec2-user/tss/tomcat/bin/bootstrap.jar:/home/ec2-user/tss/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/home/ec2-user/tss/tomcat -Dcatalina.home=/home/ec2-user/tss/tomcat -Djava.io.tmpdir=/home/ec2-user/tss/tomcat/temp org.apache.catalina.startup.Bootstrap start
user 17726 17677 0 13:38 pts/2 00:00:00 grep --color=auto tomcat
So what I did is I copied the command (from the working ENV) that was missing and executed it in the broken ENVĀ as root:
sudo /home/user/tss/jdk/jre/bin/java -Djava.util.logging.config.file=/home/user/tss/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -server -XX:+AlwaysPreTouch -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:+DisableExplicitGC -Xms512M -Xmx4096M -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dcom.sun.management.jmxremote -Dorg.apache.catalina.session.StandardSession.ACTIVITY_CHECK=true -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dignore.endorsed.dirs= -classpath /home/user/tss/tomcat/bin/bootstrap.jar:/home/user/tss/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/home/user/tss/tomcat -Dcatalina.home=/home/user/tss/tomcat -Djava.io.tmpdir=/home/user/tss/tomcat/temp org.apache.catalina.startup.Bootstrap start
After that, I tried to access the web interface I saw this error:
When I checked the console output after I saw the above error on the Web interface I saw that:
14-Nov-2019 13:46:39.443 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 52682 ms
14-Nov-2019 13:47:49.187 SEVERE [http-nio-80-exec-6] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [default] in context with path [/spotfire] threw exception [Filter execution threw an exception] with root cause
java.lang.IllegalArgumentException: Could not resolve placeholder 'SPOTFIRE_AUTH_CONFIG' in value "file:${SPOTFIRE_AUTH_CONFIG}/spotfire-auth.properties"
at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:172)
at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:124)
at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:237)
at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:211)
at org.springframework.core.env.AbstractEnvironment.resolveRequiredPlaceholders(AbstractEnvironment.java:571)
at org.springframework.context.annotation.ConfigurationClassParser.processPropertySource(ConfigurationClassParser.java:451)
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:272)
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:245)
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:202)
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:170)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:316)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:233)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:271)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:91)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:692)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:530)
at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:99)
at com.ihsenergy.spotifre.SpringContext.<clinit>(SpringContext.java:14)
at com.ihsenergy.spotifre.IHSMarkitCustomAuthenticator.authenticate(IHSMarkitCustomAuthenticator.java:19)
at com.spotfire.server.security.ExternalAuthenticator.authenticateUsingCustomAuthenticator(ExternalAuthenticator.java:213)
at com.spotfire.server.security.ExternalAuthenticator.authenticate(ExternalAuthenticator.java:195)
at com.spotfire.server.security.ExternalAuthenticator.authenticate(ExternalAuthenticator.java:187)
at com.spotfire.server.security.AuthenticationManager.doAuthenticate(AuthenticationManager.java:401)
at com.spotfire.server.security.AuthenticationManager.authenticateNonAnonymously(AuthenticationManager.java:344)
at com.spotfire.server.security.AuthenticationManager.authenticateFrontend(AuthenticationManager.java:214)
at com.spotfire.server.security.AuthenticationManager.authenticate(AuthenticationManager.java:198)
at com.spotfire.server.security.SecurityFilter$AuthenticationFilter.attemptAuthentication(SecurityFilter.java:445)
at com.spotfire.server.security.SecurityFilter$AuthenticationFilter.doFilter(SecurityFilter.java:242)
at com.spotfire.server.security.SecurityFilter$InternalFilter.doFilter(SecurityFilter.java:980)
at com.spotfire.server.security.SecurityFilter$InternalFilterChain.doFilter(SecurityFilter.java:1009)
at com.spotfire.server.security.SecurityFilter$UserDataConstraintFilter.doFilter(SecurityFilter.java:853)
at com.spotfire.server.security.SecurityFilter$InternalFilter.doFilter(SecurityFilter.java:980)
at com.spotfire.server.security.SecurityFilter$InternalFilterChain.doFilter(SecurityFilter.java:1009)
at com.spotfire.server.security.SecurityFilter$ConnectorFilter.doFilter(SecurityFilter.java:813)
at com.spotfire.server.security.SecurityFilter$InternalFilter.doFilter(SecurityFilter.java:980)
at com.spotfire.server.security.SecurityFilter$InternalFilterChain.doFilter(SecurityFilter.java:1009)
at com.spotfire.server.security.SecurityFilter.doFilter(SecurityFilter.java:160)
at com.spotfire.server.security.AbstractFilter.doFilter(AbstractFilter.java:124)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.spotfire.server.security.CustomAuthFilterWrapper.doFilter(CustomAuthFilterWrapper.java:89)
at com.spotfire.server.security.AbstractFilter.doFilter(AbstractFilter.java:124)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.spotfire.server.security.CsrfFilter.doFilter(CsrfFilter.java:74)
at com.spotfire.server.security.AbstractFilter.doFilter(AbstractFilter.java:124)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.spotfire.server.security.HttpMethodsFilter.doFilter(HttpMethodsFilter.java:179)
at com.spotfire.server.security.AbstractFilter.doFilter(AbstractFilter.java:124)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.spotfire.server.security.headers.HeadersFilter.doFilter(HeadersFilter.java:213)
at com.spotfire.server.security.AbstractFilter.doFilter(AbstractFilter.java:124)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.spotfire.server.security.AccessLogFilter.doFilter(AccessLogFilter.java:73)
at com.spotfire.server.security.AbstractFilter.doFilter(AbstractFilter.java:124)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.spotfire.server.security.RequestContextFilter.doFilter(RequestContextFilter.java:120)
at com.spotfire.server.security.RequestContextFilter.doFilter(RequestContextFilter.java:85)
at com.spotfire.server.security.AbstractFilter.doFilter(AbstractFilter.java:124)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:791)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
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)
I am not sure what what has caused that error, perhaps this is what is preventing the broken environment from running normally.
It turned out that somebody has started the tomcat server without root. That's why our environment variable "SPOTFIRE_AUTH_CONFIG" was not "recognised". As soon as I executed:
/etc/init.d/tss-10.0.1 stop|start
Everything worked fine.
We're using GraphDB Free in our research project and I've recently come across an issue with responsiveness when inserting data into contexts.
When I use RDF4J API to insert statements into a new context, GraphDB fails to respond to subsequent requests/queries. No exceptions are reported in the logs. I assume it has something to do with the restriction to two concurrent queries.
Interestingly enough, when I create a context via a SPARQL INSERT in workbench, subsequent work with new contexts seems to be without issues. But if the new contexts are created by insertion of statements via an RDF4J connection, GraphDB often gets stuck. No such problem appears when I insert into the default context.
Here's the stacktrace I got from running jstack on the GraphDB process:
"repositories/termit" #16 daemon prio=5 os_prio=0 tid=0x00007f6481ca0000 nid=0x3c17 waiting on condition [0x00007f645ae9a000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006c8e90748> (a java.util.concurrent.Semaphore$NonfairSync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
at java.util.concurrent.Semaphore.acquire(Semaphore.java:312)
at com.ontotext.trree.GraphdbFreeConnection.<init>(GraphdbFreeConnection.java:15)
at com.ontotext.trree.OwlimSchemaRepository.getOwlimConnection(OwlimSchemaRepository.java:517)
at com.ontotext.trree.SailConnectionImpl.getStatementsInternal(SailConnectionImpl.java:316)
at com.ontotext.trree.SailConnectionImpl.getStatements(SailConnectionImpl.java:2346)
at org.eclipse.rdf4j.repository.sail.SailRepositoryConnection.getStatements(SailRepositoryConnection.java:296)
at org.eclipse.rdf4j.repository.sail.SailRepositoryConnection.exportStatements(SailRepositoryConnection.java:331)
at org.eclipse.rdf4j.http.server.repository.statements.ExportStatementsView.render(ExportStatementsView.java:108)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1325)
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1069)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1008)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:870)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:855)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.ontotext.forest.core.request.RequestFilter.doFilterInternal(RequestFilter.java:41)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.github.ziplet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:263)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.ontotext.forest.security.AdminDelegatingFilterProxy.doFilter(AdminDelegatingFilterProxy.java:38)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:417)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:754)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1376)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
- locked <0x00000007b8102798> (a org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper)
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)
Tried it on GraphDB 8.6 and also on the latest 8.8.1.
Any help/hint would be greatly appreciated.
Can you give more details how did you insert the statements? I tried a simple test with GraphDB 8.8.1 and I couldn't reproduce the problem. This is what I do:
curl -X POST -d #wines.ttl -H "Content-Type: application/x-turtle" http://localhost:7200/repositories/test/rdf-graphs/service?graph=http://example.com
I did multiple inserts with different files and I cannot get to the problematic behavior
I am trying to use the latest redis 5.0.2 for my java code which uses jedis client 3.0.0 library (jedis-git-repo). It doesn't work.
Same code works with redis 4.x.
My query is - git page of jedis says
Jedis is fully compatible with redis 2.8.x and 3.x.x.
but I can see it works fine with redis 4.x (at-least for my use-case), so has someone tried jedis 3.0.0 with redis 5.x?
----- update --------------
this is snippet of the actual code, below code is in different classes, for explanation purpose I have clubbed it together.
JedisCluster jedisCluster = new JedisCluster(jedisClusterNodes,initPoolConfiguration());
Map<String, String> mapContentFolder = new HashMap<String, String>();
mapContentFolder.put(INDEX_COLLECTION, /* json object */);
jedisCluster.hmset(id, mapContentFolder);
the last line from code snippet is line no.220 in saveCache() method.
So I get below exception(while saving to redis) when I run this code with jedis client jar as 3.0.0 and redis as 5.0.2 -
2018-12-13 10:42:32.568 INFO 14420 --- [nio-9097-exec-2] o.s.w.s.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization completed in 30 ms
redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
at redis.clients.util.Pool.getResource(Pool.java:53)
at redis.clients.jedis.JedisPool.getResource(JedisPool.java:226)
at redis.clients.jedis.JedisSlotBasedConnectionHandler.getConnectionFromSlot(JedisSlotBasedConnectionHandler.java:66)
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:116)
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:141)
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:141)
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:141)
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:141)
at redis.clients.jedis.JedisClusterCommand.run(JedisClusterCommand.java:31)
at redis.clients.jedis.JedisCluster.hmset(JedisCluster.java:424)
at com.abc.om.repository.redis.AbstractCRUDRepository.saveCache(AbstractCRUDRepository.java:220)
at com.abc.om.mle.engine.DefaultCatalogProcessor.processPlanFragments(DefaultCatalogProcessor.java:27)
at com.abc.om.mle.v1.restapi.MleApiController.planFragmentModel(MleApiController.java:50)
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.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:849)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:760)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.ConnectException: Connection refused: connect
at redis.clients.jedis.Connection.connect(Connection.java:207)
at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:93)
at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1767)
at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:106)
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:888)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:432)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:361)
at redis.clients.util.Pool.getResource(Pool.java:49)
... 66 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at redis.clients.jedis.Connection.connect(Connection.java:184)
... 73 more
and the same code works fine with jedis client library as 3.0.0 and redis 4.x
Thanks,
Saurabh.
I use SonarQube and i upgraded in v7.3.
I am able to run SonarQube but I can't log in with Default Credential (admin/admin). I get this error message in logs (web.log) :
2018.09.14 14:46:23 ERROR web[][o.s.s.p.w.RootFilter] Processing of request /api/authentication/login failed
javax.servlet.ServletException: Filter execution threw an exception
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at
org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:87)
at
org.sonar.server.user.UserSessionFilter.doFilter(UserSessionFilter.java:71)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at
org.sonar.server.platform.web.CacheControlFilter.doFilter(CacheControlFilter.java:76)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at
org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:76)
at
org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at
org.sonar.server.platform.web.RedirectFilter.doFilter(RedirectFilter.java:61)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at
org.sonar.server.platform.web.requestid.RequestIdFilter.doFilter(RequestIdFilter.java:63)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at
org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at
org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at
ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
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.NoSuchMethodError:
com.fasterxml.jackson.core.JsonGenerator.writeStartObject(Ljava/lang/Object;)V
at
com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:626)
at
com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:33)
at
com.fasterxml.jackson.databind.ser.DefaultSerializerProvider._serialize(DefaultSerializerProvider.java:480)
at
com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:319)
at
com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:3893)
at
com.fasterxml.jackson.databind.ObjectMapper.writeValueAsBytes(ObjectMapper.java:3231)
at
io.jsonwebtoken.impl.DefaultJwtBuilder.toJson(DefaultJwtBuilder.java:354)
at
io.jsonwebtoken.impl.DefaultJwtBuilder.base64UrlEncode(DefaultJwtBuilder.java:344)
at
io.jsonwebtoken.impl.DefaultJwtBuilder.compact(DefaultJwtBuilder.java:295)
at
org.sonar.server.authentication.JwtSerializer.encode(JwtSerializer.java:97)
at
org.sonar.server.authentication.JwtHttpHandler.generateToken(JwtHttpHandler.java:84)
at
org.sonar.server.authentication.JwtHttpHandler.generateToken(JwtHttpHandler.java:96)
at
org.sonar.server.authentication.ws.LoginAction.doFilter(LoginAction.java:103)
at
org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:126)
at
org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:95)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
... 40 common frames omitted
I'm using the jdk 1.8.0 u181.
What's the problem ?
I finded out what was the issue (i think).
It was the French plugin which is not compatible with the 7.3 version. So when i runned SonarQube v7.3 with this plugin, it used the wrong version of many plugins in Sonar Server (i have seen plugins in version 6.7, not 7.3).
So I maked an installation again without any plugin and it works.
Thank you for your help.