skip to Main Content

I have selenium based web application developed using spring boot. The server is located as VM Instance of google cloud server.

Please find below the details about the versions.

Spring Boot – 2.0.0.RELEASE

Selenium – 3.9.1

Linux – Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux

Chrome Driver – 2.35.528139 (47ead77cb35ad2a9a83248b292151462a66cd881)

Google Chrome – 70.0.3538.110

JDK – 1.8.0_232

From the past few days, I am facing a strange issue, application works fine when business hours start but after few hours it becomes unstable and whole application stop working, even user can not login.
After digging more for this issue I found the below error from server logs. I have to restart the VM Instance in order to fix it.

enter image description here
.

After restart, it works fine for a few hours and then we face same issue again.

Also, I have noticed that while sending an email we face the below issue which works fine before
a few minutes.
enter image description here

I also verified the server resource usage but didn’t find any suspicious activity.
I googled for this issue but most of the solutions are provided for the problem being faced while running it first time. However, in my case it works fine for few hours and then start having this issue.

Please help me to understand the issue and root cause of this problem. It would be better if you can suggest a solution as well.

Thanks in advance.

2

Answers


  1. This error message…

    java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:1731
    

    …implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.

    Your main issue is the incompatibility between the version of the binaries you are using as follows:

    • You are using chromedriver=2.35
    • Release Notes of chromedriver=2.41 clearly mentions the following :

    Supports Chrome v62-64

    • Presumably you are using chrome=70.0
    • Release Notes of ChromeDriver v2.44 clearly mentions the following :

    Supports Chrome v69-71

    • Your Selenium Client version is 3.9.1 which is almost 2 years older.

    So there is a clear mismatch between Selenium Client v3.9.1 , ChromeDriver v2.35 and the Chrome Browser v70.0


    Solution

    Ensure that:

    • Selenium is upgraded to current levels Version 3.141.59.
    • ChromeDriver is updated to current ChromeDriver v79.0.3945.36 level.
    • Chrome is updated to current Chrome Version 79.0 level. (as per ChromeDriver v79.0 release notes)
    • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
    • If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
    • Execute your @Test as non-root user.
    Login or Signup to reply.
  2. In my case, it was bcoz of chrome driver instance was closed in the middle of test execution. so it was not able to get that particular chrome driver to process the selenium commands. I had to tweak the logic of chrome instantiation and closure as in my case, parallel 3 chrome instances were opened and these were getting closed in the middle of execution so the problem was not finding a particular needed chrome driver instance.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search