Uploaded image for project: 'Livy'
  1. Livy
  2. LIVY-615

livy.ui.basePath does not seem to work correctly

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.6.0
    • Fix Version/s: None
    • Component/s: Server
    • Labels:
      None

      Description

      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.:

      context.setContextPath(livyConf.get(LivyConf.SERVER_BASE_PATH))

      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:

      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 = {

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                fdeantoni Ferdinand de Antoni
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 5m Original Estimate - 5m
                  5m
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m