'Selenium Grid UnreachableBrowserException

org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'DESKTOP-37JVVAA', ip: '199.254.9.005', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_181' Driver info: driver.version: Driver at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:573) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:144) at automationFramework.Driver.startWebDriver(Driver.java:80)

Caused by: java.io.IOException: unexpected end of stream on Connection{grid-selenium-hub.es-selenium-use.us-east-1.acceptance.com:4444, proxy=DIRECT hostAddress=grid-selenium-hub.es-selenium-use.us-east-1.acceptance.com/12.55.42.001:4444 cipherSuite=none protocol=http/1.1} at okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:208) at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:88) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)

{
  "browserTimeout": 0,
  "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher",
  "cleanUpCycle": 5000,
  "custom": {
  },
  "debug": false,
  "host": "90.395.99.144",
  "jettyMaxThreads": -1,
  "newSessionRequestCount": 0,
  "newSessionWaitTimeout": -1,
  "port": 4444,
  "registry": "org.openqa.grid.internal.DefaultGridRegistry",
  "role": "hub",
  "servlets": [
  ],
  "slotCounts": {
    "free": 10,
    "total": 10
  },
  "success": true,
  "throwOnCapabilityNotPresent": true,
  "timeout": 1800,
  "withoutServlets": [
  ]
}
Node has following:

browserTimeout: 0

debug: false

jettyMaxThreads: -1

host: 90.115.91.25:5555

port: 5555

role: node

timeout: 1800

cleanUpCycle: 5000

maxSession: 1

capabilities: Capabilities {applicationName: , browserName: chrome, maxInstances: 1, platform: LINUX, platformName: LINUX, seleniumProtocol: WebDriver, server:CONFIG_UUID: 277ded26-3931-42ec-b9e6-a6b..., version: 79.0.3945.117}

downPollingLimit: 2

hub: http://selenium-grid-selenium-hub:4444/grid/register

id: http://90.115.91.25:5555

nodePolling: 5000

nodeStatusCheckTimeout: 5000

proxy: org.openqa.grid.selenium.proxy.DefaultRemoteProxy

register: true

registerCycle: 5000

remoteHost: http://90.115.91.25:5555

unregisterIfStillDownAfter: 60000

Driver has following code

            ChromeOptions options = new ChromeOptions();
            options.addArguments("start-maximized");
            options.addArguments("--disable-infobars");
            options.addArguments("--disable-extensions");
            options.addArguments("chrome.switches", "--disable-extensions");
            options.addArguments("--disable-gpu");
            options.addArguments("--disable-dev-shm-usage");
            options.addArguments("--no-sandbox");
            options.addArguments("--disable-notifications");
            options.addArguments("--disable-popup-blocking");
            options.addArguments("enable-automation");
            options.addArguments("--disable-dev-shm-usage");
            options.addArguments("--disable-browser-side-navigation");
            options.addArguments("--dns-prefetch-disable");
                options.setExperimentalOption("useAutomationExtension", false);
                DesiredCapabilities capabilities = DesiredCapabilities.chrome();
                capabilities.setCapability(ChromeOptions.CAPABILITY, options);
                world.driver = new RemoteWebDriver(new URL(AWS_URL), options);
world.driver.manage().timeouts().pageLoadTimeout(20, TimeUnit.SECONDS);
We recently created grid on aws and see this issue for some of the pods(which is working fine earlier), though its same hub URL for all


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source