Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REST test fail when the scaling extesion is included #143

Open
aaime opened this issue Dec 31, 2024 · 1 comment
Open

REST test fail when the scaling extesion is included #143

aaime opened this issue Dec 31, 2024 · 1 comment
Assignees

Comments

@aaime
Copy link

aaime commented Dec 31, 2024

Describe the bug
While a test run using the Web UI works fine, I find that asking to run a test with the scaling extension fails with an internal exception. However, leaving the scaling extension out, completes successfully.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy the ets-wcs20 tests, built from this docker image:
    docker run -p 8004:8080 --rm ogccite/ets-wcs20:latest
  2. Execute a test run with scaling enabled:
     curl -u ogctest:ogctest "http://localhost:8004/teamengine/rest/suites/wcs/run?url=http%3A%2F%2F172.17.0.1%3A8080%2Fgeoserver%2Fows%3Fservice=WCS%26request%3DGetCapabilities&core=core&ext_post=post&ext_crs=crs&ext_scal=scaling&ext_int=interpolation"
    
    The result is:
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML Basic 1.1//EN' 'http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd'>
    <html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>
    <head><title>Status Code 500</title></head>
    <body><p>Error executing test suite (wcs): Error message: java.lang.RuntimeException: Unable to create report log directory /root/te_base/users/ogctest/rest/s0001</p></body>
  3. However, run the following, without scaling:
    curl -u ogctest:ogctest "http://localhost:8004/teamengine/rest/suites/wcs/run?url=http%3A%2F%2F172.17.0.1%3A8080%2Fgeoserver%2Fows%3Fservice=WCS%26request%3DGetCapabilities&core=core&ext_post=post&ext_crs=crs"
    
    and the test runs successfully, creating the directory it failed to add no the first run
  4. From this point on, running with scaling works, as the "rest" directory has been created at point 3.
  5. Looking at the logs inside the docker container, I find:
WARNING: java.lang.RuntimeException: Unable to create report log directory /root/te_base/users/ogctest/rest/s0001
java.lang.RuntimeException: java.lang.RuntimeException: Unable to create report log directory /root/te_base/users/ogctest/rest/s0001
	at com.occamlab.te.spi.ctl.CtlExecutor.execute(CtlExecutor.java:122)
	at org.opengis.cite.wcs20.CtlController.doTestRun(CtlController.java:93)
	at com.occamlab.te.spi.jaxrs.resources.TestRunResource.executeTestRun(TestRunResource.java:401)
	at com.occamlab.te.spi.jaxrs.resources.TestRunResource.handleGet(TestRunResource.java:312)
	at com.occamlab.te.spi.jaxrs.resources.TestRunResource.handleGetRdf(TestRunResource.java:91)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
	at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
	at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
	at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
	at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
	at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
	at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at com.occamlab.te.realm.RestAuthenticationFilter.doFilter(RestAuthenticationFilter.java:72)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:1025)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1137)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
	at org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2512)
	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.RuntimeException: Unable to create report log directory /root/te_base/users/ogctest/rest/s0001
	at com.occamlab.te.util.LogUtils.createFullReportLog(LogUtils.java:550)
	at com.occamlab.te.TECore.execute(TECore.java:339)
	at com.occamlab.te.spi.ctl.CtlExecutor.execute(CtlExecutor.java:118)
	... 46 more

Expected behavior
I expected the test run to succeed directly, without having to do a "warm up" test run with less parameters

@dstenger
Copy link
Contributor

dstenger commented Jan 2, 2025

Thank you for reporting.
We will do further investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To do
Development

No branches or pull requests

3 participants