Dashboards & Visualizations

After upgrading Splunk, why does splunkweb fail to load on random browsers with javascript errors?

yannK
Splunk Employee
Splunk Employee

After an upgrade of Splunk, I sometimes have random browsers (usually IE) unable to load the pages.

In the developer browser tools, I found errors about javascript missing.

example :

Uncaught ReferenceError: Splunk is not defined login:57
Uncaught ReferenceError: initUpdateChecker is not defined login:193

This seems to be a cache issue as it differs between clients.

1 Solution

yannK
Splunk Employee
Splunk Employee

They are 2 ways to investigate

First : clear the cache on the splunkweb server
(in case there is a discrepancy between the client and server cache versions)

  1. On the search-head while splunk is still running
  2. clear the $SPLUNK_HOME/var/run/splunk/appserver/* folder
  3. then retry from a web client to reload (you should see the appserver repopulated on the webserver)

Second technique : disable the javascript minification
(when the javascripts are compacted together in a big one to send to the client)

  1. on the search-head edit web.conf
  2. add

[settings]
minify_js=false

3. restart to apply
4. reload the webclient browser

View solution in original post

yannK
Splunk Employee
Splunk Employee

They are 2 ways to investigate

First : clear the cache on the splunkweb server
(in case there is a discrepancy between the client and server cache versions)

  1. On the search-head while splunk is still running
  2. clear the $SPLUNK_HOME/var/run/splunk/appserver/* folder
  3. then retry from a web client to reload (you should see the appserver repopulated on the webserver)

Second technique : disable the javascript minification
(when the javascripts are compacted together in a big one to send to the client)

  1. on the search-head edit web.conf
  2. add

[settings]
minify_js=false

3. restart to apply
4. reload the webclient browser

anthonysomerset
Path Finder

just had a related issue (different JS error) after upgrading to 7.2.6 - clearing the cache didn't work but disable minify and restart did - we run splunk behind nginx which is doing SSL termination and HTTP/2 so the performance impact should be negligable to us

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...