3

The Selenium Grid Hub I am running displays this error message whenever a Robot Framework automation test (kicked off by a Jenkins job) requests a Chrome browser from the Hub:

Session [(null externalkey)] not available and is not among the last 1000 terminated sessions.

I've spent hours searching and trying proposed solutions with no luck.

Running a Linux server as a Selenium Grid Hub and a windows server as a Selenium Grid Node. Have tried each node with versions 3.0.1, 3.5.3, 3.13.0, and 3.141.59 of the selenium-server-standalone-<version>.jar files. A third server runs Jenkins.

The Hub appears to be config'd properly because this works fine:

http://10.1.10.231:4444/grid/console

I've also run the jar files at the command line with -debug at the end but no further information is displayed. Have also tried -Dselenium.LOGGER.level=WARNING on the "java side" of the command line with no further information displayed than using -debug.

We have another set of servers with the same config that runs just fine.

Anyone have an idea of what this message is indicating?


Nitty-gritty follows.

Grid Hub:

java -jar -Xms1024m -Xmx2048m selenium-server-standalone-3.141.59.jar -role hub -hubConfig ./hub-config.json

hub-config.json:

{
  "port": 4444,
  "newSessionWaitTimeout": -1,
  "servlets" : [],
  "withoutServlets": [],
  "custom": {},
  "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher",
  "throwOnCapabilityNotPresent": true,
  "cleanUpCycle": 5000,
  "role": "hub",
  "debug": false,
  "browserTimeout": 360,
  "timeout": 1800
}

Grid Node:

SET CHROMEDRIVER=.\bin\chromedriver_win32-v2.37\chromedriver.exe
SET IEDRIVER=.\bin\IEDriverServer.exe
SET FFDRIVER=.\bin\geckodriver-v0.11.1-win32\geckodriver.exe

START "SeleniumNode" java -Xms1024m -Xmx2048m ^
    -Dwebdriver.gecko.driver=%FFDRIVER% ^
    -Dwebdriver.ie.driver=%IEDRIVER% ^
    -Dwebdriver.chrome.driver=%CHROMEDRIVER% -Dwebdriver.chrome.args="--disable-extensions" ^
    -jar .\bin\selenium-server-standalone-3.141.59.jar -role node -nodeConfig .\node-config.json

node-config.json:

{
  "capabilities":
  [
    {
      "browserName": "firefox",
      "maxInstances": 5,
      "platform": "WINDOWS",
      "seleniumProtocol": "WebDriver"
    },
    {
      "browserName": "chrome",
      "maxInstances": 5,
      "platform": "WINDOWS",
      "seleniumProtocol": "WebDriver"
    },
    {
      "browserName": "internet explorer",
      "maxInstances": 5,
      "platform": "WINDOWS",
      "seleniumProtocol": "WebDriver"
    }
  ],
  "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
  "maxSession": 5,
  "port": 5555,
  "register": true,
  "registerCycle": 5000,
  "hub": "http://10.1.10.231:4444",
  "nodeStatusCheckTimeout": 5000,
  "nodePolling": 5000,
  "role": "node",
  "unregisterIfStillDownAfter": 60000,
  "downPollingLimit": 2,
  "debug": false,
  "servlets" : [],
  "withoutServlets": [],
  "custom": {},
  "browserTimeout": 0,
  "timeout": 1800,
  "cleanUpCycle": 2000
}
Glenn Doten
  • 2,603
  • 3
  • 21
  • 22

1 Answers1

0

Figured this one out! Hopefully it will help others who have reported this error message and not received a solution.

As is most often the case with an issue like this, especially when there's a known-working setup right beside the broken instance, it was an (embarrassingly) silly config issue. The Robot tests were pointing to this URL to get a browser:

http://10.1.10.75:4444/wd/hub/static/resource/hub.html

and it should have been pointing to this path:

http://10.1.10.75:4444/wd/hub

At least it was an easy fix.

Glenn Doten
  • 2,603
  • 3
  • 21
  • 22