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!

Splunk Observability Cloud | Unified Identity - Now Available for Existing Splunk ...

Raise your hand if you’ve already forgotten your username or password when logging into an account. (We can’t ...

Index This | How many sides does a circle have?

February 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

Registration for Splunk University is Now Open!

Are you ready for an adventure in learning?   Brace yourselves because Splunk University is back, and it's ...