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 Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...