All Apps and Add-ons

Splunk Synthetic Transaction not working

ShaneNewman
Motivator

I can run the bat file by hand and the command will execute correctly, however, when Splunk runs it the IE browser never comes up. I have spent all day troubleshooting and I am no closer to understanding why Splunk will not kick off the selenium server and open up the IE web driver, seeing as how I can just double click the bat file in the directory and everything works perfectly...

test.bat

@echo off
setlocal
set SELENIUM_SERVER_JAR=C:\Progra~1\Splunk\bin\selenium-server-standalone-2.43.1.jar
set PATH=C:\Python34;C:\Python34\Lib;C:\Progra~1\Splunk\etc\apps\splunk-app-synthetic\bin\
set PYTHONPATH=C:\Python34
set "scriptP=C:\Progra~1\Splunk\etc\apps\splunk-app-synthetic\bin\"
set "full_path=%scriptP%aka_login.py"
cd C:\Python34
python %full_path%

The error logs in Splunk make it appear as if the script is running, yet since IE never starts, it cannot find the DOM objects it is looking for and errors out.

splunkd.log

05-11-2015 18:12:08.309 -0500 INFO Metrics - group=per_source_thruput, series="c:\program files\splunk\etc\apps\splunk-app-synthetic\bin\test.bat", kbps=0.010269, eps=0.064514, kb=0.318359, ev=2, avg_age=160.500000, max_age=321

05-11-2015 18:12:53.311 -0500 INFO LicenseUsage - type=Usage s="C:\\Program Files\\Splunk\\etc\\apps\\splunk-app-synthetic\\bin\\test.bat" st=synthetic h=XRDCWPAPPSPL01 o="" idx="synthetic" i="56446DF8-64A3-4A04-9293-204D9C2054E0" pool="auto_generated_pool_download-trial" b=326 poolsz=524288000

05-11-2015 18:13:31.281 -0500 INFO ExecProcessor - New scheduled exec process: "C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"

05-11-2015 18:14:59.987 -0500 INFO ExecProcessor - setting reschedule_ms=300026, for command="C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"

05-11-2015 18:20:00.029 -0500 INFO ExecProcessor - setting reschedule_ms=299971, for command="C:\Program    
05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" C:\Python34\lib\site-packages\selenium\webdriver\ie\service.py:97: ResourceWarning: unclosed <socket.socket fd=448, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('0.0.0.0', 59173)>

05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" while utils.is_connectable(self.port):

05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" E

05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" ======================================================================

05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" ERROR: test_aka (__main__.AKATest)

05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" ----------------------------------------------------------------------

05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" Traceback (most recent call last):

05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" File "C:\Progra~1\Splunk\etc\apps\splunk-app-synthetic\bin\aka_login.py", line 44, in test_aka

05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" driver.find_element_by_id("imgNavSignOut").click()

05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" File "C:\Python34\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 208, in find_element_by_id

05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" return self.find_element(by=By.ID, value=id_)

05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" File "C:\Python34\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 664, in find_element

05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" {'using': by, 'value': value})['value']

05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" File "C:\Python34\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 175, in execute

05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" self.error_handler.check_response(response)

05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" File "C:\Python34\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 166, in check_response

05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" raise exception_class(message, screen, stacktrace)

05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" selenium.common.exceptions.NoSuchElementException: Message: Unable to find element with id == imgNavSignOut

05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" ----------------------------------------------------------------------

05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" Ran 1 test in 322.401s

05-11-2015 18:20:23.451 -0500 ERROR ExecProcessor - message from ""C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"" FAILED (errors=1)

05-11-2015 18:20:33.873 -0500 INFO LicenseUsage - type=Usage s="C:\\Program Files\\Splunk\\etc\\apps\\splunk-app-synthetic\\bin\\test.bat" st=synthetic h=XRDCWPAPPSPL01 o="" idx="synthetic" i="56446DF8-64A3-4A04-9293-204D9C2054E0" pool="auto_generated_pool_download-trial" b=327 poolsz=524288000

05-11-2015 18:20:43.842 -0500 INFO Metrics - group=per_source_thruput, series="c:\program files\splunk\etc\apps\splunk-app-synthetic\bin\test.bat", kbps=0.010301, eps=0.064514, kb=0.319336, ev=2, avg_age=160.500000, max_age=321

05-11-2015 18:25:00.006 -0500 INFO ExecProcessor - setting reschedule_ms=299994, for command="C:\Program Files\Splunk\etc\apps\splunk-app-synthetic\bin\test.bat"

05-11-2015 18:25:53.835 -0500 INFO Metrics - group=per_source_thruput, series="c:\program files\splunk\etc\apps\splunk-app-synthetic\bin\test.bat", kbps=0.010301, eps=0.064514, kb=0.319336, ev=2, avg_age=160.500000, max_age=321
0 Karma
1 Solution

khutchinson_spl
Splunk Employee
Splunk Employee

This has got to be permissions. The Splunk user does not have the ability to run a remote script I bet. What version of Windows? Python 2.7? UAC controls? Intel sticker?

It's a great day to be Splunkin'!

View solution in original post

khutchinson_spl
Splunk Employee
Splunk Employee

This has got to be permissions. The Splunk user does not have the ability to run a remote script I bet. What version of Windows? Python 2.7? UAC controls? Intel sticker?

It's a great day to be Splunkin'!

ShaneNewman
Motivator

Tried disabling UAC via the registry. Bounced the box, confirmed still set to 0 and it still won't work. WS2012 R2. Python 3.4 is installed on the box, the test.bat is using 3.4...

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Best Practices: Splunk auto adjust pipeline queue

When you enable autoAdjustQueue in Splunk, maxSize should be understood as the queue size Splunk starts with ...

Laser Bananas and Edge Hubs: Exploring Operational Technology (OT) Data Through a ...

  OT is a different environment to traditional IT and can have interesting challenges when interfacing the ...

Event Series: Mastering AI Tokenomics and Splunk Agent Observability

Beyond the Black Box: Correlating AI Performance and Tokenomics with Splunk Agent Observability   As ...