In new 4.3 instance running on Win2008 R2, external commands (e.g. sendemail) have started failing with errors like the one below.
03-01-2012 09:20:26.862 +0000 ERROR script - External search command 'sendemail' returned error code 1.
03-01-2012 09:20:26.831 +0000 ERROR ScriptRunner - stderr from 'C:\Program Files\Splunk\etc\apps\search\bin\sendemail.py': ImportError: No module named site
I can't pinpoint the problem to a particular application installation or configuration change, all I can say is that everything has worked fine when the instance was first installed, but at some point we've noticed that the mails have stopped coming and then we've found the errors like the one in the example.
We found what was triggering the problem. Comes out it's the per-user timezone setting (new in 4.3). So once you set the user's timezone to anything other than the system's default timezone, you'll encounter the following problems:
03-01-2012 09:20:26.862 +0000 ERROR script - External search command 'sendemail' returned error code 1.
03-01-2012 09:20:26.831 +0000 ERROR ScriptRunner - stderr from 'C:\Program Files\Splunk\etc\apps\search\bin\sendemail.py': ImportError: No module named site
I wanted to upvote IgorB's answer, but I don't have enough points 😛
Anyway- you saved us too, thank you!
Thank you, i can confirm that setting the "System Default timezone" made my email alerts work again.
I dont know how you found it, but a big thank you for posting it, saved my day 🙂
The credit should go to my customer - Eyal P.
We found what was triggering the problem. Comes out it's the per-user timezone setting (new in 4.3). So once you set the user's timezone to anything other than the system's default timezone, you'll encounter the following problems:
03-01-2012 09:20:26.862 +0000 ERROR script - External search command 'sendemail' returned error code 1.
03-01-2012 09:20:26.831 +0000 ERROR ScriptRunner - stderr from 'C:\Program Files\Splunk\etc\apps\search\bin\sendemail.py': ImportError: No module named site