Error 500 org.openqa.grid.common.exception.GridException: Session [(null externalkey)] not available

393 views
Skip to first unread message

antti...@exove.com

unread,
Aug 28, 2014, 4:33:58 AM8/28/14
to seleniu...@googlegroups.com
I am running Selenium Grid on a Jenkins machine. Every now and then when I try to run scripts, I get error "Error 500 org.openqa.grid.common.exception.GridException: Session [(null externalkey)] not available and is not among the last 1000 terminated sessions." Searching the group resulted just unanswered and incomplete posts, so I decided to try to ask this with more specifications.

That error comes sometimes when I try to request browser from a slave. It happens with all of the browsers (Firefox, IE, Google Chrome)

GRID:
Master: Linux, running selenium-standalone 2.42.2. Run from Jenkins.
Slaves: Windows 7, running selenium-standalone 2.42.2. Windows 8, running selenium-standalone 2.42.2.


THE CODE
self.selenium = selenium("grid.hostname", "4444", "*firefox", "http://url")
self.selenium.start()
self.selenium.run_script("window.resizeTo(" + str(browser_width) + ",1000)")
self.selenium.set_speed("1500")


COMMAND USED TO RUN A SLAVE
java -jar selenium-server-standalone-2.42.2.jar -port 5556 -role node ^
-browser "seleniumProtocol=WebDriver,browserName=firefox,maxInstances=5,platform=WINDOWS" ^
-browser "seleniumProtocol=WebDriver,browserName=chrome,maxInstances=5,platform=WINDOWS" ^
-browser "seleniumProtocol=WebDriver,browserName=internet explorer,platform=WINDOWS" ^
-browser "seleniumProtocol=Selenium,browserName=*firefox,maxInstances=5,platform=WINDOWS" ^
-browser "seleniumProtocol=Selenium,browserName=*googlechrome,maxInstances=5,platform=WINDOWS" ^
-browser "seleniumProtocol=Selenium,browserName=*iexplore,platform=WINDOWS" ^
-Dwebdriver.chrome.driver=c:\selenium\chromedriver.exe ^
-Dwebdriver.ie.driver=c:\selenium\IEDriverServerWin64.exe ^
-Dwebdriver.ie.driver.logfile=c:\selenium\logs\IEDriverServerWin64.log ^
-Dwebdriver.ie.driver.loglevel=WARN


PROCESSES AT HUB
[root@jenkins ~]# ps -fu jenkins|grep selenium
jenkins  28364 31039  0 09:33 ?        00:00:14 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65.x86_64/jre/bin/java -cp /var/cache/jenkins/war/WEB-INF/lib/remoting-2.42.jar hudson.remoting.Launcher -cp /var/lib/jenkins/plugins/selenium/WEB-INF/lib/selenium-server-standalone-2.42.2.jar -connectTo localhost:47345
jenkins  28426 31039  0 09:33 ?        00:00:08 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65.x86_64/jre/bin/java -Dwebdriver.chrome.driver=/opt/bin/chromedriver -cp /var/cache/jenkins/war/WEB-INF/lib/remoting-2.42.jar hudson.remoting.Launcher -cp /var/lib/jenkins/selenium-server-standalone-2.42.2.jar -connectTo localhost:48085


COMPLETE ERROR MESSAGE FROM HTMLRUNNER:
ft1.1: Traceback (most recent call last):
  File "main_script.py", line 66, in test_01
    do_login(self, 1)
  File "lib/testlib.py", line 83, in do_login
    sel.set_speed("1500")
  File "/usr/lib/python2.6/site-packages/selenium/selenium.py", line 637, in set_speed
    self.do_command("setSpeed", [value,])
  File "/usr/lib/python2.6/site-packages/selenium/selenium.py", line 225, in do_command
    raise Exception(data)
Exception: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 org.openqa.grid.common.exception.GridException: Session [(null externalkey)] not available and is not among the last 1000 terminated sessions.
Active sessions are[ext. key dbeb8afa-b2b6-4fe2-ac41-8847e39a0fb4, ext. key 32e1613c5fcc451187cf6e5280402858, 41c822e0-fa00-4242-80ed-12ea0746ff0e (int. key, remote not contacted yet.)]</title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /selenium-server/driver/. Reason:
<pre>    org.openqa.grid.common.exception.GridException: Session [(null externalkey)] not available and is not among the last 1000 terminated sessions.
Active sessions are[ext. key dbeb8afa-b2b6-4fe2-ac41-8847e39a0fb4, ext. key 32e1613c5fcc451187cf6e5280402858, 41c822e0-fa00-4242-80ed-12ea0746ff0e (int. key, remote not contacted yet.)]</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>

Sorry for the re-post; couldn't figure out how to edit posts if it is even possible.

antti...@exove.com

unread,
Oct 24, 2014, 1:10:06 AM10/24/14
to seleniu...@googlegroups.com
Any ideas? This is still happening with Selenium 2.43.1. It seems that this occurs only when I try to use Selenium RC. Selenium Webdriver does not have this problem.

antti...@exove.com

unread,
Mar 6, 2015, 7:51:57 AM3/6/15
to seleniu...@googlegroups.com
I think I _might_ have found a solution for this. Not sure about it since I restarted all nodes & Jenkins while investigating, but this is worth giving a go:

I updated the selenium python library: sudo pip install selenium --upgrade
Reply all
Reply to author
Forward
0 new messages