Page 2 of 2

Re: Issues running behind nginx reverse proxy

Posted: Thu Jun 11, 2020 4:59 pm
by tslytsly
ccummings-coeur wrote:
Thu Jun 11, 2020 3:47 pm

Code: Select all

        add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
Thanks! that did it!

Re: [Solved] Issues running behind nginx reverse proxy

Posted: Wed Aug 18, 2021 7:12 am
by tslytsly
Hi guys,

This has been working fine until I upgraded to the latest version this morning, 2.1.0.

Now I get this error when accessing the server through our nginx RP:

Code: Select all

{
timestamp: 1629270520398,
code: 404,
error: "Not Found",
message: "URL is not supported by the API"
}
This is present in the unimus log:

Code: Select all

2021-08-18 08:08:40.397  WARN 675 --- [http-nio-8085-exec-3] net.unimus.rest.ExceptionResolver        : Handling exception thrown by REST API call, endpoint = '/configs/' method = 'GET', from '<NGINX_IP>'

org.springframework.web.servlet.NoHandlerFoundException: No handler found for GET /configs/
        at org.springframework.web.servlet.DispatcherServlet.noHandlerFound(DispatcherServlet.java:1275)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962)
        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:626)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1707)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.base/java.lang.Thread.run(Thread.java:829)
I still have

Code: Select all

-Dserver.contextPath=/configs
in the /etc/default/unimus settings file.

Any ideas what changed to break this?

Thanks guys

Re: [Solved] Issues running behind nginx reverse proxy

Posted: Wed Aug 18, 2021 12:23 pm
by Vik@Unimus
Hello,

There was an update to the framework and property name -Dserver.contextPath was changed to -Dserver.servlet.context-path .

Give it a try, please, and let us know if it worked.

Re: [Solved] Issues running behind nginx reverse proxy

Posted: Thu Aug 19, 2021 11:07 am
by tslytsly
Thanks Vik,

That fixed it.
Is this change documented anywhere?

Thanks

Re: [Solved] Issues running behind nginx reverse proxy

Posted: Thu Aug 19, 2021 3:21 pm
by Vik@Unimus
You are welcome and apologies again for the issue, even when there are framework updates, it is not frequent that property names change (but it happens). As for the documentation for this configuration, we haven't made any documentation for it yet as this property is, unfortunately, scarcely used.