Chrome not reachable on Jenkins












0















I have a Jenkins master - slave configured on Linux ec2 instance for automation test execution. The three slave instances were created by cloning the master instance. The configurations are as follows:
Java version - 1.8.0_191
Chrome version - 70
ChromeDriver version - 2.44



When I execute teh tests on the slave instances I get the below error:
org.openqa.selenium.WebDriverException: chrome not reachable



Below is the error in the console



at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:609)
at org.openqa.selenium.remote.RemoteWebDriver.getScreenshotAs(RemoteWebDriver.java:295)
at com.test.pageobjects.Base.HelperClass.takeScreenShot(HelperClass.java:119)
at com.test.UITests.Steps.FooterSteps.sessionCleanUp(FooterSteps.java:95)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at cucumber.runtime.Utils$1.call(Utils.java:26)
at cucumber.runtime.Timeout.timeout(Timeout.java:16)
at cucumber.runtime.Utils.invoke(Utils.java:20)
at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60)
at cucumber.runner.HookDefinitionMatch.runStep(HookDefinitionMatch.java:16)
at cucumber.runner.TestStep.executeStep(TestStep.java:63)
at cucumber.runner.TestStep.run(TestStep.java:49)
at cucumber.runner.TestCase.run(TestCase.java:48)
at cucumber.runner.Runner.runPickle(Runner.java:40)
at cucumber.runtime.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:146)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:68)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:23)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:73)
at cucumber.api.junit.Cucumber.runChild(Cucumber.java:124)
at cucumber.api.junit.Cucumber.runChild(Cucumber.java:65)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at cucumber.api.junit.Cucumber$1.evaluate(Cucumber.java:133)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)


When the test is executed on teh Master instance it works fine. The code used to initialise the driver is given below:



public static WebDriver getDriver(){
//Get the current OS Version
String os = System.getProperty("os.name").toLowerCase();
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--headless");
//Define the path of Chrome Driver on Test Server
if(os.contains("linux")) {
System.setProperty("webdriver.chrome.driver", "/usr/local/bin/chromedriver");
}
webdriver = new ChromeDriver(chromeOptions);
webdriver.manage().window().setSize(new Dimension(1920,1080));
return webdriver;
}


I have tried giving the path to binary as given in this question
and I tried upgrading to the latest versions as given in this question. Nothing works. I also tried adding the below code as well to initialise the browser.



public static WebDriver getDriver(){
//Get the current OS Version
String os = System.getProperty("os.name").toLowerCase();
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--headless");

//Define the path of Chrome Driver on Test Server
if(os.contains("linux")) {
chromeOptions.addArguments("--no-sandbox");
chromeOptions.addArguments("--disable-setuid-sandbox");
chromeOptions.addArguments("start-maximized");
chromeOptions.addArguments("disable-infobars");
chromeOptions.addArguments("--disable-extensions");
System.setProperty("webdriver.chrome.driver", "/usr/local/bin/chromedriver");
}
webdriver = new ChromeDriver(chromeOptions);
webdriver.manage().window().setSize(new Dimension(1920,1080));
return webdriver;
}


Note - These tests were working fine on all instances previously. The java version was updated from 1.8.0_171 to 1.8.0_191 on all 4 ec2 instances and since then the issue occurs.










share|improve this question



























    0















    I have a Jenkins master - slave configured on Linux ec2 instance for automation test execution. The three slave instances were created by cloning the master instance. The configurations are as follows:
    Java version - 1.8.0_191
    Chrome version - 70
    ChromeDriver version - 2.44



    When I execute teh tests on the slave instances I get the below error:
    org.openqa.selenium.WebDriverException: chrome not reachable



    Below is the error in the console



    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
    at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
    at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
    at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:609)
    at org.openqa.selenium.remote.RemoteWebDriver.getScreenshotAs(RemoteWebDriver.java:295)
    at com.test.pageobjects.Base.HelperClass.takeScreenShot(HelperClass.java:119)
    at com.test.UITests.Steps.FooterSteps.sessionCleanUp(FooterSteps.java:95)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at cucumber.runtime.Utils$1.call(Utils.java:26)
    at cucumber.runtime.Timeout.timeout(Timeout.java:16)
    at cucumber.runtime.Utils.invoke(Utils.java:20)
    at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60)
    at cucumber.runner.HookDefinitionMatch.runStep(HookDefinitionMatch.java:16)
    at cucumber.runner.TestStep.executeStep(TestStep.java:63)
    at cucumber.runner.TestStep.run(TestStep.java:49)
    at cucumber.runner.TestCase.run(TestCase.java:48)
    at cucumber.runner.Runner.runPickle(Runner.java:40)
    at cucumber.runtime.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:146)
    at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:68)
    at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:23)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:73)
    at cucumber.api.junit.Cucumber.runChild(Cucumber.java:124)
    at cucumber.api.junit.Cucumber.runChild(Cucumber.java:65)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at cucumber.api.junit.Cucumber$1.evaluate(Cucumber.java:133)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)


    When the test is executed on teh Master instance it works fine. The code used to initialise the driver is given below:



    public static WebDriver getDriver(){
    //Get the current OS Version
    String os = System.getProperty("os.name").toLowerCase();
    ChromeOptions chromeOptions = new ChromeOptions();
    chromeOptions.addArguments("--headless");
    //Define the path of Chrome Driver on Test Server
    if(os.contains("linux")) {
    System.setProperty("webdriver.chrome.driver", "/usr/local/bin/chromedriver");
    }
    webdriver = new ChromeDriver(chromeOptions);
    webdriver.manage().window().setSize(new Dimension(1920,1080));
    return webdriver;
    }


    I have tried giving the path to binary as given in this question
    and I tried upgrading to the latest versions as given in this question. Nothing works. I also tried adding the below code as well to initialise the browser.



    public static WebDriver getDriver(){
    //Get the current OS Version
    String os = System.getProperty("os.name").toLowerCase();
    ChromeOptions chromeOptions = new ChromeOptions();
    chromeOptions.addArguments("--headless");

    //Define the path of Chrome Driver on Test Server
    if(os.contains("linux")) {
    chromeOptions.addArguments("--no-sandbox");
    chromeOptions.addArguments("--disable-setuid-sandbox");
    chromeOptions.addArguments("start-maximized");
    chromeOptions.addArguments("disable-infobars");
    chromeOptions.addArguments("--disable-extensions");
    System.setProperty("webdriver.chrome.driver", "/usr/local/bin/chromedriver");
    }
    webdriver = new ChromeDriver(chromeOptions);
    webdriver.manage().window().setSize(new Dimension(1920,1080));
    return webdriver;
    }


    Note - These tests were working fine on all instances previously. The java version was updated from 1.8.0_171 to 1.8.0_191 on all 4 ec2 instances and since then the issue occurs.










    share|improve this question

























      0












      0








      0








      I have a Jenkins master - slave configured on Linux ec2 instance for automation test execution. The three slave instances were created by cloning the master instance. The configurations are as follows:
      Java version - 1.8.0_191
      Chrome version - 70
      ChromeDriver version - 2.44



      When I execute teh tests on the slave instances I get the below error:
      org.openqa.selenium.WebDriverException: chrome not reachable



      Below is the error in the console



      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
      at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
      at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
      at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
      at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
      at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:609)
      at org.openqa.selenium.remote.RemoteWebDriver.getScreenshotAs(RemoteWebDriver.java:295)
      at com.test.pageobjects.Base.HelperClass.takeScreenShot(HelperClass.java:119)
      at com.test.UITests.Steps.FooterSteps.sessionCleanUp(FooterSteps.java:95)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at cucumber.runtime.Utils$1.call(Utils.java:26)
      at cucumber.runtime.Timeout.timeout(Timeout.java:16)
      at cucumber.runtime.Utils.invoke(Utils.java:20)
      at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60)
      at cucumber.runner.HookDefinitionMatch.runStep(HookDefinitionMatch.java:16)
      at cucumber.runner.TestStep.executeStep(TestStep.java:63)
      at cucumber.runner.TestStep.run(TestStep.java:49)
      at cucumber.runner.TestCase.run(TestCase.java:48)
      at cucumber.runner.Runner.runPickle(Runner.java:40)
      at cucumber.runtime.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:146)
      at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:68)
      at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:23)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:73)
      at cucumber.api.junit.Cucumber.runChild(Cucumber.java:124)
      at cucumber.api.junit.Cucumber.runChild(Cucumber.java:65)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      at cucumber.api.junit.Cucumber$1.evaluate(Cucumber.java:133)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
      at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
      at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
      at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
      at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
      at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
      at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)


      When the test is executed on teh Master instance it works fine. The code used to initialise the driver is given below:



      public static WebDriver getDriver(){
      //Get the current OS Version
      String os = System.getProperty("os.name").toLowerCase();
      ChromeOptions chromeOptions = new ChromeOptions();
      chromeOptions.addArguments("--headless");
      //Define the path of Chrome Driver on Test Server
      if(os.contains("linux")) {
      System.setProperty("webdriver.chrome.driver", "/usr/local/bin/chromedriver");
      }
      webdriver = new ChromeDriver(chromeOptions);
      webdriver.manage().window().setSize(new Dimension(1920,1080));
      return webdriver;
      }


      I have tried giving the path to binary as given in this question
      and I tried upgrading to the latest versions as given in this question. Nothing works. I also tried adding the below code as well to initialise the browser.



      public static WebDriver getDriver(){
      //Get the current OS Version
      String os = System.getProperty("os.name").toLowerCase();
      ChromeOptions chromeOptions = new ChromeOptions();
      chromeOptions.addArguments("--headless");

      //Define the path of Chrome Driver on Test Server
      if(os.contains("linux")) {
      chromeOptions.addArguments("--no-sandbox");
      chromeOptions.addArguments("--disable-setuid-sandbox");
      chromeOptions.addArguments("start-maximized");
      chromeOptions.addArguments("disable-infobars");
      chromeOptions.addArguments("--disable-extensions");
      System.setProperty("webdriver.chrome.driver", "/usr/local/bin/chromedriver");
      }
      webdriver = new ChromeDriver(chromeOptions);
      webdriver.manage().window().setSize(new Dimension(1920,1080));
      return webdriver;
      }


      Note - These tests were working fine on all instances previously. The java version was updated from 1.8.0_171 to 1.8.0_191 on all 4 ec2 instances and since then the issue occurs.










      share|improve this question














      I have a Jenkins master - slave configured on Linux ec2 instance for automation test execution. The three slave instances were created by cloning the master instance. The configurations are as follows:
      Java version - 1.8.0_191
      Chrome version - 70
      ChromeDriver version - 2.44



      When I execute teh tests on the slave instances I get the below error:
      org.openqa.selenium.WebDriverException: chrome not reachable



      Below is the error in the console



      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
      at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
      at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
      at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
      at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
      at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:609)
      at org.openqa.selenium.remote.RemoteWebDriver.getScreenshotAs(RemoteWebDriver.java:295)
      at com.test.pageobjects.Base.HelperClass.takeScreenShot(HelperClass.java:119)
      at com.test.UITests.Steps.FooterSteps.sessionCleanUp(FooterSteps.java:95)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at cucumber.runtime.Utils$1.call(Utils.java:26)
      at cucumber.runtime.Timeout.timeout(Timeout.java:16)
      at cucumber.runtime.Utils.invoke(Utils.java:20)
      at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60)
      at cucumber.runner.HookDefinitionMatch.runStep(HookDefinitionMatch.java:16)
      at cucumber.runner.TestStep.executeStep(TestStep.java:63)
      at cucumber.runner.TestStep.run(TestStep.java:49)
      at cucumber.runner.TestCase.run(TestCase.java:48)
      at cucumber.runner.Runner.runPickle(Runner.java:40)
      at cucumber.runtime.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:146)
      at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:68)
      at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:23)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:73)
      at cucumber.api.junit.Cucumber.runChild(Cucumber.java:124)
      at cucumber.api.junit.Cucumber.runChild(Cucumber.java:65)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      at cucumber.api.junit.Cucumber$1.evaluate(Cucumber.java:133)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
      at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
      at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
      at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
      at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
      at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
      at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)


      When the test is executed on teh Master instance it works fine. The code used to initialise the driver is given below:



      public static WebDriver getDriver(){
      //Get the current OS Version
      String os = System.getProperty("os.name").toLowerCase();
      ChromeOptions chromeOptions = new ChromeOptions();
      chromeOptions.addArguments("--headless");
      //Define the path of Chrome Driver on Test Server
      if(os.contains("linux")) {
      System.setProperty("webdriver.chrome.driver", "/usr/local/bin/chromedriver");
      }
      webdriver = new ChromeDriver(chromeOptions);
      webdriver.manage().window().setSize(new Dimension(1920,1080));
      return webdriver;
      }


      I have tried giving the path to binary as given in this question
      and I tried upgrading to the latest versions as given in this question. Nothing works. I also tried adding the below code as well to initialise the browser.



      public static WebDriver getDriver(){
      //Get the current OS Version
      String os = System.getProperty("os.name").toLowerCase();
      ChromeOptions chromeOptions = new ChromeOptions();
      chromeOptions.addArguments("--headless");

      //Define the path of Chrome Driver on Test Server
      if(os.contains("linux")) {
      chromeOptions.addArguments("--no-sandbox");
      chromeOptions.addArguments("--disable-setuid-sandbox");
      chromeOptions.addArguments("start-maximized");
      chromeOptions.addArguments("disable-infobars");
      chromeOptions.addArguments("--disable-extensions");
      System.setProperty("webdriver.chrome.driver", "/usr/local/bin/chromedriver");
      }
      webdriver = new ChromeDriver(chromeOptions);
      webdriver.manage().window().setSize(new Dimension(1920,1080));
      return webdriver;
      }


      Note - These tests were working fine on all instances previously. The java version was updated from 1.8.0_171 to 1.8.0_191 on all 4 ec2 instances and since then the issue occurs.







      google-chrome jenkins selenium-chromedriver






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 26 '18 at 7:02









      RubeneeRubenee

      156




      156
























          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53476122%2fchrome-not-reachable-on-jenkins%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53476122%2fchrome-not-reachable-on-jenkins%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Contact image not getting when fetch all contact list from iPhone by CNContact

          count number of partitions of a set with n elements into k subsets

          A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks