Hi ,
I am getting 500 Internal Server Error when I click on Manage Apps, however other functionalities are working fine.
Any quick help would be greatly appreciated.
We are 8.0.1 on Linux and here is how I found the Dashboard that was missing a label:
1.) List Dashboard XML files that are missing a label:
grep -rl "<dashboard" /opt/splunk/etc/* | grep "\.xml" | xargs grep "<label></label>"
2.) Edit these files and change "<label></label>" to "<label>New Label</label>". (Change "New Label" to whatever you want)
3.) Restart Splunk.
Hi everyone,
I did grep -rl "<dashboard" /opt/splunk/etc/* | grep "\.xml" | xargs grep "<label></label>",
found an .xml file with no content inside <label></label>,
changed it to <label>Corvil</label>,
restarted Splunk -in fact, the whole system-,
tried updating an app -any app-
and the 500 Error is still there.
Any suggestion?
Thanks!
I am having the same problem too
The simple answer to this is you have a dashboard without a title. As soon as I fixed that, all the problems with 500 errors went away.
I'm experiencing this too after an upgrade to 8. Did you end up finding a resolution?
In my case,
The problem occurred when some dashboard had a label tag but no tag content.
When I added the string in label, the 500 error disappeared.
May be it is not problem of Splunk enterprise version. I think...
Ran into this issue - label was missing in one of the dashboard XML files.
If you're seeing this error message at the bottom of the stack trace - means this is a likely fix.
File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/controllers/view.py", line 806, in buildViewTemplate
viewList.sort(key=lambda x: x['label'])
TypeError: '<' not supported between instances of 'NoneType' and 'str'
Quick workaround is to identify the dashboard XML without a label and update it.
https://docs.splunk.com/Documentation/Splunk/8.0.2/Viz/PanelreferenceforSimplifiedXML#Overview
<dashboard>
<label>test_db</label>
Borrowed this from Engineering.
Here is a regex to find the labels causing the issue, run inside the splunk or diag folder
linux:
find . -name ".xml" | xargs grep -Pzo "(board.|orm.*)>\s+<\/label>"
In my case,
Label values were missing in some old dashboard xml files in other app.
(ex. )
After setting the label value, the dashboard such as manager was successfully loaded.
(ex. 111)
I had the exact same problem.
I tried but it did not solve the problem.
Let me know if this helps. Borrowed this from Engineering.
Here is a regex to find the labels causing the issue, run inside the splunk or diag folder
linux:
find . -name ".xml" | xargs grep -Pzo "(board.|orm.*)>\s+<\/label>"
Did anyone solve this? The regex didn't work
find . -name ".xml" | xargs grep -Pzo "(board.|orm.)>\s+<\/label>"
I modified it as above but couldn't find a file.
I am also seeing this issue when I click on "Update" to update one of the Apps in the Apps list.
The error page loads after about 4-5 seconds.
I am seeing this same error after upgrading to 8.0.2. It's only on 1 of my SH's, the others are functioning fine.
Eventually found the culprit dashboard without a label tag applied and that resolved the issues.
@broberg
And I don't see any error in the splunkd.log around the same time.
What do you get in your splunkd log?
I don't see any specific error.
I see this error in the web access log.
ERROR [5e452b083b7f55f825d890] error:335 - Traceback (most recent call last):
File "/opt/splunk/lib/python3.7/site-packages/cherrypy/cprequest.py", line 628, in respond
self._do_respond(path_info)
File "/opt/splunk/lib/python3.7/site-packages/cherrypy/_cprequest.py", line 687, in _do_respond
response.body = self.handler()
File "/opt/splunk/lib/python3.7/site-packages/cherrypy/lib/encoding.py", line 219, in __call_
self.body = self.oldhandler(*args, **kwargs)
File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/lib/htmlinjectiontoolfactory.py", line 75, in wrapper
resp = handler(*args, **kwargs)
File "/opt/splunk/lib/python3.7/site-packages/cherrypy/cpdispatch.py", line 54, in __call_
return self.callable(*self.args, **self.kwargs)
File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/lib/routes.py", line 383, in default
return route.target(self, **kw)
File "</opt/splunk/lib/python3.7/site-packages/decorator.py:decorator-gen-136>", line 2, in upload
File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 40, in rundecs
return fn(*a, **kw)
File "</opt/splunk/lib/python3.7/site-packages/decorator.py:decorator-gen-134>", line 2, in upload
File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 118, in check
return fn(self, *a, **kw)
File "</opt/splunk/lib/python3.7/site-packages/decorator.py:decorator-gen-133>", line 2, in upload
File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 166, in validate_ip
return fn(self, *a, **kw)
File "</opt/splunk/lib/python3.7/site-packages/decorator.py:decorator-gen-132>", line 2, in upload
File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 245, in preform_sso_check
return fn(self, *a, **kw)
File "</opt/splunk/lib/python3.7/site-packages/decorator.py:decorator-gen-131>", line 2, in upload
File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 284, in check_login
return fn(self, *a, **kw)
File "</opt/splunk/lib/python3.7/site-packages/decorator.py:decorator-gen-130>", line 2, in upload
File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 304, in handle_exceptions
return fn(self, *a, **kw)
File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/controllers/appinstall.py", line 358, in upload
'state': state
File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/controllers/appinstall.py", line 185, in render_admin_template
return manager.render_admin_template(*a, **kw)
File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/controllers/admin.py", line 1381, in render_admin_template
args = root.app.buildViewTemplate(namespace, ADMIN_VIEW_NAME, render_invisible=True, build_nav=False, include_app_css_assets=False)
File "/opt/splunk/lib/python3.7/site-packages/splunk/appserver/mrsparkle/controllers/view.py", line 806, in buildViewTemplate
viewList.sort(key=lambda x: x['label'])
TypeError: '<' not supported between instances of 'NoneType' and 'str'
I'm getting the same