Executing external script in SHC Clustering enviourment - 6.2.2.


Hi All,

I am using Splunk version 6.2.2 with 4 Search heads and formed a Search Head Cluster enviourment with those 4 servers. I have a scheduled search running on this cluster to call the external shellscript to email the search results "results.gz" content to different customers based on the logic in the shell script.

This script is working fine in a Single Non Clustered Searchhead but when comes to clustered enviourment , I am seeing the following error and the scripts seems to be not working as expected.

02-15-2017 03:04:19.516 +0000 ERROR
script -
command="runshellscript", Script:
exited with status code: 2

Could you please help what could be the issue here ??


Tags (1)
0 Karma

Splunk Employee
Splunk Employee

If you examine the code there is only one place where it exits with code 2:

script = sys.argv[1]

if not script:
splunk.Intersplunk.generateErrorResults("Empty string is not a valid script name")

do you also see that message in you logs?

I would make sure that the app has been deployed to all members of the SHC.

0 Karma


No john , I am just seeing the error code 2 but not the msg..

If I call the default script it's working fine but when I try to call the another script in file it's throwing this error.

It's works fine in single search head environment but here I am having the issue. Am I missing something

0 Karma

Super Champion

did you deploy your app containing the script using "deployer"?

0 Karma


yes koshyk. i have deployed the apps using the deployer only.

0 Karma
.conf21 CFS Extended through 5/20!

Don't miss your chance
to share your Splunk
wisdom in-person or
virtually at .conf21!

Call for Speakers has
been extended through
Thursday, 5/20!