Spark 2.4.5 UI not showing because of strict MIME type checking

Viewed 536

I've been working on upgrading all of my systems to use the latest AWS EMR offerings including Spark 2.4.5 and emr-5.30.0. I was finally able to get a cluster running with my code and wanted to check what was going on the worker nodes via the Spark UI http://3.84.xxx.xxx:4040/executors and am seeing some issues with the styling. Upon looking at the Chrome console, I can see a whole bunch of errors like:

Refused to apply style from '<URL>' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

and

Refused to execute script from '<URL>' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

This works fine on my old cluster with Spark 2.0.0.

I've tried to find a way around this to get the pages to load properly and am not seeing anything on here or elsewhere on Google. And it doesn't look like there is anyway to disable Strict MIME type checking.

Screen shot of network tab in Chrome https://www.dropbox.com/s/gww2arkts8i7dqk/sparkui.jpg?dl=0

Page Source:


<!DOCTYPE html><html>
      <head>
        <meta http-equiv="Content-type" content="text/html; charset=utf-8"/><link rel="stylesheet" href="/proxy/application_1591462671294_0525/static/bootstrap.min.css" type="text/css"/><link rel="stylesheet" href="/proxy/application_1591462671294_0525/static/vis.min.css" type="text/css"/><link rel="stylesheet" href="/proxy/application_1591462671294_0525/static/webui.css" type="text/css"/><link rel="stylesheet" href="/proxy/application_1591462671294_0525/static/timeline-view.css" type="text/css"/><script src="/proxy/application_1591462671294_0525/static/sorttable.js"></script><script src="/proxy/application_1591462671294_0525/static/jquery-1.12.4.min.js"></script><script src="/proxy/application_1591462671294_0525/static/emr-shim.js"></script><script src="/proxy/application_1591462671294_0525/static/vis.min.js"></script><script src="/proxy/application_1591462671294_0525/static/bootstrap-tooltip.js"></script><script src="/proxy/application_1591462671294_0525/static/initialize-tooltips.js"></script><script src="/proxy/application_1591462671294_0525/static/table.js"></script><script src="/proxy/application_1591462671294_0525/static/additional-metrics.js"></script><script src="/proxy/application_1591462671294_0525/static/timeline-view.js"></script><script src="/proxy/application_1591462671294_0525/static/log-view.js"></script><script src="/proxy/application_1591462671294_0525/static/webui.js"></script><script>setUIRoot('/proxy/application_1591462671294_0525')</script>

        <link rel="stylesheet" href="/proxy/application_1591462671294_0525/static/jquery.dataTables.1.10.18.min.css" type="text/css"/><link rel="stylesheet" href="/proxy/application_1591462671294_0525/static/dataTables.bootstrap.css" type="text/css"/><link rel="stylesheet" href="/proxy/application_1591462671294_0525/static/jsonFormatter.min.css" type="text/css"/><script src="/proxy/application_1591462671294_0525/static/jquery.dataTables.1.10.18.min.js"></script><script src="/proxy/application_1591462671294_0525/static/jquery.cookies.2.2.0.min.js"></script><script src="/proxy/application_1591462671294_0525/static/jquery.blockUI.min.js"></script><script src="/proxy/application_1591462671294_0525/static/dataTables.bootstrap.min.js"></script><script src="/proxy/application_1591462671294_0525/static/jsonFormatter.min.js"></script><script src="/proxy/application_1591462671294_0525/static/jquery.mustache.js"></script>
        <link rel="shortcut icon" href="/proxy/application_1591462671294_0525/static/spark-logo-77x50px-hd.png"></link>
        <title>uspto public pair collector - Executors</title>
      </head>
      <body>
        <div class="navbar navbar-static-top">
          <div class="navbar-inner">
            <div class="brand">
              <a href="/proxy/application_1591462671294_0525/" class="brand">
                <img src="/proxy/application_1591462671294_0525/static/spark-logo-77x50px-hd.png"/>
                <span class="version">2.4.5-amzn-0</span>
              </a>
            </div>
            <p class="navbar-text pull-right">
              <strong title="uspto public pair collector">uspto public pair collector</strong> application UI
            </p>
            <ul class="nav"><li class="">
        <a href="/proxy/application_1591462671294_0525/jobs/">Jobs</a>
      </li><li class="">
        <a href="/proxy/application_1591462671294_0525/stages/">Stages</a>
      </li><li class="">
        <a href="/proxy/application_1591462671294_0525/storage/">Storage</a>
      </li><li class="">
        <a href="/proxy/application_1591462671294_0525/environment/">Environment</a>
      </li><li class="active">
        <a href="/proxy/application_1591462671294_0525/executors/">Executors</a>
      </li></ul>
          </div>
        </div>
        <div class="container-fluid">
          <div class="row-fluid">
            <div class="span12">
              <h3 style="vertical-align: bottom; display: inline-block;">
                Executors

              </h3>
            </div>
          </div>
          <div>
        <div id="active-executors" class="row-fluid"></div><script src="/proxy/application_1591462671294_0525/static/utils.js"></script><script src="/proxy/application_1591462671294_0525/static/executorspage.js"></script><script>setThreadDumpEnabled(true)</script><script>setErrorMessageEnabled(false)</script>
      </div>
        </div>
      </body>
    </html>

1 Answers

Weird thing happened and my accounts have been merged but I can't respond to my OP because my rep didn't transfer. I'm working on fixing that separately.

@mazaneicha, I've found the jar you mentioned at /usr/lib/spark/jars/spark-core_2.11-2.4.5-amzn-0.jar and ran jar tf spark-core_2.11-2.4.5-amzn-0.jar | grep /ui/static/.

Results:

org/apache/spark/ui/static/webui.js
org/apache/spark/ui/static/dataTables.rowsGroup.js
org/apache/spark/ui/static/jsonFormatter.min.js
org/apache/spark/ui/static/spark-dag-viz.css
org/apache/spark/ui/static/jquery.blockUI.min.js
org/apache/spark/ui/static/executorspage.js
org/apache/spark/ui/static/timeline-view.css
org/apache/spark/ui/static/additional-metrics.js
org/apache/spark/ui/static/executorspage-template.html
org/apache/spark/ui/static/initialize-tooltips.js
org/apache/spark/ui/static/jquery.dataTables.1.10.18.min.css
org/apache/spark/ui/static/dataTables.bootstrap.css
org/apache/spark/ui/static/jquery-1.12.4.min.js
org/apache/spark/ui/static/historypage.js
org/apache/spark/ui/static/historypage-common.js
org/apache/spark/ui/static/jsonFormatter.min.css
org/apache/spark/ui/static/vis.min.js
org/apache/spark/ui/static/dagre-d3.min.js
org/apache/spark/ui/static/dataTables.bootstrap.min.js
org/apache/spark/ui/static/webui.css
org/apache/spark/ui/static/spark-logo-77x50px-hd.png
org/apache/spark/ui/static/table.js
org/apache/spark/ui/static/jquery.cookies.2.2.0.min.js
org/apache/spark/ui/static/utils.js
org/apache/spark/ui/static/graphlib-dot.min.js
org/apache/spark/ui/static/emr-shim.js
org/apache/spark/ui/static/vis.min.css
org/apache/spark/ui/static/bootstrap-tooltip.js
org/apache/spark/ui/static/jquery.dataTables.1.10.18.min.js
org/apache/spark/ui/static/log-view.js
org/apache/spark/ui/static/spark-dag-viz.js
org/apache/spark/ui/static/d3.min.js
org/apache/spark/ui/static/timeline-view.js
org/apache/spark/ui/static/bootstrap.min.css
org/apache/spark/ui/static/sorttable.js
org/apache/spark/ui/static/historypage-template.html
org/apache/spark/ui/static/jquery.mustache.js

Per your original question, the permission for the jar are

-rw-r--r-- 1 root root 13818506 Apr 23 04:23 spark-core_2.11-2.4.5-amzn-0.jar

But I was unable to find the /ui/static/ expanded anywhere on disk.

Related