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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...