Alerting

Splunk alert failed to execute script on Windows 2008 64-bit

sonicant
Path Finder

I set up an alert to trigger a script (sample "echo.bat" in $SPLUNK_HOME\bin\scripts\)
The alert fired normal, but the script was not executed.
When I check the splunkd.log, it says:


ERROR ScriptRunner - Couldn't start child process. script="E:\Program Files\Splunk\etc\apps\search\bin\runshellscript.py"
ERROR script - Script execution failed for external search command 'runshellscript.'

I tried to add python.exe path to %PATH, but it didn't help, strange.....

splunk version: 4.3-115073-x64

windows: server 2008 64-bit

Tags (2)
0 Karma
1 Solution

Drainy
Champion

It sounds like it may be the timezone bug that 4.3 has. It was fixed in 4.3.2 and it relates to Splunk firing scripts.

To test do the following;
Navigate to Manager in the top right, select Your Account in the bottom right, change the timezone to, "Default System Timezone". Hit save and try again.
If that works then it is that bug that is affecting you.

View solution in original post

sonicant
Path Finder

Hi Mario, Yes I tried in search bar "xxxx | runshellscript echo.bat arg1 arg2.....", but it reported the runshellscript returned error 1

0 Karma

Drainy
Champion

It sounds like it may be the timezone bug that 4.3 has. It was fixed in 4.3.2 and it relates to Splunk firing scripts.

To test do the following;
Navigate to Manager in the top right, select Your Account in the bottom right, change the timezone to, "Default System Timezone". Hit save and try again.
If that works then it is that bug that is affecting you.

sonicant
Path Finder

Hi Drainy

I upgraded splunk to 4.3.2 and the bug gone, thank you!

0 Karma

sonicant
Path Finder

when I set the timezone to default, the splunk page shows "AttributeError: 'str' object has no attribute 'os_startIndex'"

0 Karma

sonicant
Path Finder

Hi Drainy

If I set the timezone to default, the splunk page will report a common error "str object.....", anyway I will try it, thanks!

0 Karma

MarioM
Motivator

did you try to run it manually from the command line to see if you get an error?

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...