Splunk Search

When run a diag, got error: Exception: , Value: global name 'src_path' is not defined

zliu
Splunk Employee
Splunk Employee

Attempting to run ./splunk diag has failed with the following error:

================================================================
[splunk@fugaku]bin$ ./splunk diag
Ensuring clean temp dir...
Selected diag name of: diag-fugaku-2011-06-30
Starting splunk diag...
Copying Splunk configuration files...
Copying Splunk log files...
Copying index worddata, and bucket info files...

An unforeseen error occurred:

Exception: , Value: global name 'src_path' is not defined

Traceback (most recent call last):
File "/san/splunk/prod/splunk/lib/python2.6/site-packages/splunk/clilib/cli.py", line 1082, in main
parseAndRun(argsList)
File "/san/splunk/prod/splunk/lib/python2.6/site-packages/splunk/clilib/cli.py", line 930, in parseAndRun
retVal = cList.getCmd(command, subCmd).call(argList, fromCLI = True)
File "/san/splunk/prod/splunk/lib/python2.6/site-packages/splunk/clilib/cli.py", line 264, in call
return self.func(args, fromCLI)
File "/san/splunk/prod/splunk/lib/python2.6/site-packages/splunk/clilib/control_api.py", line 33, in wrapperFunc
return func(dictCopy, fromCLI)
File "/san/splunk/prod/splunk/lib/python2.6/site-packages/splunk/clilib/info_gather.py", line 625, in pclMain
return main()
File "/san/splunk/prod/splunk/lib/python2.6/site-packages/splunk/clilib/info_gather.py", line 589, in main
copy_indexfiles(get_results_dir())
File "/san/splunk/prod/splunk/lib/python2.6/site-packages/splunk/clilib/info_gather.py", line 368, in copy_indexfiles
copy_file_with_parent(src_file, dest_file)
File "/san/splunk/prod/splunk/lib/python2.6/site-packages/splunk/clilib/info_gather.py", line 326, in copy_file_with_parent
logger.warn(err_msg % (src_path, dest_file, e.strerror))
NameError: global name 'src_path' is not defined

Please file a case online at http://www.splunk.com/page/submit_issue

Tags (1)
0 Karma
1 Solution

jrodman
Splunk Employee
Splunk Employee

This means there are files in the index which the diag user cannot copy successfully.
I think this is fixed in 4.2.1, and is definitely fixed in 4.2.2, where we just mention that there was a permissions problem and continue.

It can be worked around by running diag as a user who has permission to read and copy the index .data files.

View solution in original post

0 Karma

jrodman
Splunk Employee
Splunk Employee

This means there are files in the index which the diag user cannot copy successfully.
I think this is fixed in 4.2.1, and is definitely fixed in 4.2.2, where we just mention that there was a permissions problem and continue.

It can be worked around by running diag as a user who has permission to read and copy the index .data files.

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...