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!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...