Dashboards & Visualizations

debug/refresh - TypeError: string indices must be integers, not str

ben_leung
Builder

After doing a /debug/refresh, I get the following error.

"TypeError: string indices must be integers, not str"

Below is the python traceback. Please help me understand this error and how to resolve this issue.

Traceback (most recent call last):
      File "/ngs/app/splunkp/splunk/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 606, in respond
        cherrypy.response.body = self.handler()
      File "/ngs/app/splunkp/splunk/lib/python2.7/site-packages/cherrypy/_cpdispatch.py", line 25, in __call__
        return self.callable(*self.args, **self.kwargs)
      File "<string>", line 1, in <lambda>
      File "/ngs/app/splunkp/splunk/lib/python2.7/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 38, in rundecs
        return fn(*a, **kw)
      File "<string>", line 1, in <lambda>
      File "/ngs/app/splunkp/splunk/lib/python2.7/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 107, in check
        return fn(self, *a, **kw)
      File "<string>", line 1, in <lambda>
      File "/ngs/app/splunkp/splunk/lib/python2.7/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 156, in validate_ip
        return fn(self, *a, **kw)
      File "<string>", line 1, in <lambda>
      File "/ngs/app/splunkp/splunk/lib/python2.7/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 236, in preform_sso_check
        return fn(self, *a, **kw)
      File "<string>", line 1, in <lambda>
      File "/ngs/app/splunkp/splunk/lib/python2.7/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 348, in check_login
        return fn(self, *a, **kw)
      File "<string>", line 1, in <lambda>
      File "/ngs/app/splunkp/splunk/lib/python2.7/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 369, in handle_exceptions
        return fn(self, *a, **kw)
      File "/ngs/app/splunkp/splunk/lib/python2.7/site-packages/splunk/appserver/mrsparkle/controllers/debug.py", line 268, in refresh
        msg = e.extendedMessages[0]['text']
    TypeError: string indices must be integers, not str
Tags (2)
1 Solution

somesoni2
Revered Legend

You need to be admin to do the debug/refresh. Try the same with an admin account.

Update:

I am using Splunk 5.0.5 (with SSL authentication) and get the exact same error while doing https://host:8000/en_US/debug/refresh using non-admin account.

My Admin account has following capabilities.

title   capabilities
admin   admin_all_objects
admin   change_authentication
admin   edit_deployment_client
admin   edit_deployment_server
admin   edit_dist_peer
admin   edit_forwarders
admin   edit_httpauths
admin   edit_input_defaults
admin   edit_monitor
admin   edit_roles
admin   edit_scripted
admin   edit_search_server
admin   edit_server
admin   edit_splunktcp
admin   edit_splunktcp_ssl
admin   edit_tcp
admin   edit_udp
admin   edit_user
admin   edit_web_settings
admin   indexes_edit
admin   license_edit
admin   license_tab
admin   list_deployment_client
admin   list_forwarders
admin   list_httpauths
admin   rest_apps_management
admin   restart_splunkd
admin   run_debug_commands

For obvious reasons, the last capability looks responsible for providing debug/refresh capability.

View solution in original post

somesoni2
Revered Legend

You need to be admin to do the debug/refresh. Try the same with an admin account.

Update:

I am using Splunk 5.0.5 (with SSL authentication) and get the exact same error while doing https://host:8000/en_US/debug/refresh using non-admin account.

My Admin account has following capabilities.

title   capabilities
admin   admin_all_objects
admin   change_authentication
admin   edit_deployment_client
admin   edit_deployment_server
admin   edit_dist_peer
admin   edit_forwarders
admin   edit_httpauths
admin   edit_input_defaults
admin   edit_monitor
admin   edit_roles
admin   edit_scripted
admin   edit_search_server
admin   edit_server
admin   edit_splunktcp
admin   edit_splunktcp_ssl
admin   edit_tcp
admin   edit_udp
admin   edit_user
admin   edit_web_settings
admin   indexes_edit
admin   license_edit
admin   license_tab
admin   list_deployment_client
admin   list_forwarders
admin   list_httpauths
admin   rest_apps_management
admin   restart_splunkd
admin   run_debug_commands

For obvious reasons, the last capability looks responsible for providing debug/refresh capability.

ben_leung
Builder

Admin role does have the capability "run_debug_commands", still getting the error though. I restarted the search head and tried to debug/refresh again, same error comes up.

UPDATE: I ran the debug/refresh on the VIP URL and it was successful.

ben_leung
Builder

I am also doing this with a local account and SSO account. I cant decipher what the TypeError is referring to. I am using version 5.0.3

0 Karma

ben_leung
Builder

Yes, I have the admin role. Are there certain capabilities I might be missing? In our setup, the admin role has not been changed.

0 Karma
Get Updates on the Splunk Community!

New in Observability - Improvements to Custom Metrics SLOs, Log Observer Connect & ...

The latest enhancements to the Splunk observability portfolio deliver improved SLO management accuracy, better ...

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

Register Join this Tech Talk to learn how unique features like Service Centric Views, Tag Spotlight, and ...