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

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...