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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...