[
https://issues.apache.org/jira/browse/LIVY-615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gyorgy Gal updated LIVY-615:
----------------------------
Fix Version/s: 0.10.0
(was: 0.9.0)
This issue has been moved to the 0.10.0 release as part of a bulk update. If
you feel this is moved out inappropriately, feel free to provide justification
and reset the Fix Version to 0.9.0.
> livy.ui.basePath does not seem to work correctly
> ------------------------------------------------
>
> Key: LIVY-615
> URL: https://issues.apache.org/jira/browse/LIVY-615
> Project: Livy
> Issue Type: Bug
> Components: Server
> Affects Versions: 0.6.0
> Reporter: Ferdinand de Antoni
> Priority: Major
> Fix For: 0.10.0
>
> Original Estimate: 5m
> Time Spent: 40m
> Remaining Estimate: 0h
>
> When setting the property {{livy.ui.basePath}}, a HTTP error 404 is returned.
> To resolve this problem, the context path in {{WebServer.scala}} should be
> set as well, e.g.:
> {code:java}
> context.setContextPath(livyConf.get(LivyConf.SERVER_BASE_PATH)){code}
> Adding this seems to resolve this problem. Note that this of course also
> changes the context path of the API, not just the UI, but I presumed that was
> also the intention of the {{livy.ui.basePath}} property.
> Below patch of suggested changes:
> {noformat}
> Index: server/src/main/scala/org/apache/livy/server/WebServer.scala
> IDEA additional info:
> Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
> <+>UTF-8
> ===================================================================
> --- server/src/main/scala/org/apache/livy/server/WebServer.scala (revision
> 92062e1659db2af85711b1f35c50ff4050fec675)
> +++ server/src/main/scala/org/apache/livy/server/WebServer.scala (revision
> bdfb75d08bf34633ff23d7e4db380aca1fdf4d8e)
> @@ -81,7 +81,7 @@
> val context = new ServletContextHandler()
> - context.setContextPath("/")
> + context.setContextPath(livyConf.get(LivyConf.SERVER_BASE_PATH))
> context.addServlet(classOf[DefaultServlet], "/")
> val handlers = new HandlerCollection
> @@ -114,7 +114,7 @@
> }
> port = connector.getLocalPort
> - info("Starting server on %s://%s:%d" format (protocol, host, port))
> + info("Starting server on %s://%s:%d/%s" format (protocol, host, port,
> livyConf.get(LivyConf.SERVER_BASE_PATH)))
> }
> def join(): Unit = {{noformat}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)