Summary
OpsCenter UI fails to load when running on SLES 11.4.
Symptoms
When opening OpsCenter url in your browser, you only see a spinning wheel. If authentication is enabled, after entering your credentials you only see a spinning wheel, nothing else is ever returned. There are no errors in the opscenterd.log or http.log.
When enabling browser developer tools the below error is displayed
For Chrome
- Select the Chrome menu
at the top-right of your browser window, then select Tools > More Tools > Developer Tools.
- You will see the below error under the Elements Tab in the toolbar that opened on the right hand side of your browser.
For Firefox
- Select the menu
at the top-right of your browser window, then select Web Developer > Inspector.
- You will see the below error under the Inspector Tab in the toolbar that opened at the bottom of your browser.
index.html:1 Refused to execute script from 'http://10.200.x.x:8888/opscenter/js/lib/dojo/dojo.js' because its MIME type ('text/x-js') is not executable, and strict MIME type checking is enabled. index.html:1 Refused to execute script from 'http://10.200.x.x:8888/opscenter/js/ripcord/ripcord.js' because its MIME type ('text/x-js') is not executable, and strict MIME type checking is enabled. index.html:40 Uncaught ReferenceError: require is not defined at index.html:40
Cause
SLES 11.4 adds mime type text/x-js js
in /etc/mime.types
which overrides the application/javascript js
mime type during OpsCenters strict mime check
Solution
Comment out text/x-js js
in /etc/mime.types
and restart OpsCenter