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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...