Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-20042

Buttons on executor log page don't work with spark.ui.reverseProxy=true

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.1.0
    • 2.1.2, 2.2.0
    • Web UI

    Description

      The "Load More" and "Load New" buttons on the executor log page generate full-path URLs to the "/log" REST end point in the worker. If the worker is served via master reverse proxy (spark.ui.reverseProxy=true), the calls go to the master web UI and return the HTML for the master page, instead of the expected REST data.

      Successfully tested the following fix:
      Use JavaScript in log-view.js that checks for a /proxy/<target>/ portion in the URL and prefixes that to the REST call, similar to the way this is done in executorspage.js

      function getRESTEndPoint() {
      var words = document.baseURI.split('/');
      var ind = words.indexOf("proxy");
      if (ind > 0)

      { return words.slice(0, ind + 2).join('/') + "/log"; }

      return "/log"
      }

      function loadNew() {
      $.ajax({
      type: "GET",
      url: getRESTEndPoint() + baseParams + "&byteLength=0",
      ... etc

      Attachments

        Activity

          People

            okoethibm Oliver Koeth
            okoethibm Oliver Koeth
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: