when running auto tests in a batch i get Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it

Anonymous
2024-03-29T16:13:14+00:00

i am running big batches of at least 20-30 auto tests written with selenium /python , when i run them individually they run fine but when i run them together through Jenkins or pytest i get this error message

MaxRetryError: HTTPConnectionPool(host='localhost', port=62210): Max retries exceeded with url: /session/eca69aecf00a87a626f8abab103ef511/screenshot (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000019CBB145B10>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))

i am running the tests on an AWS windows server , the chrome and chromedriver installed are both version 123.0.6312.59

when i looked in the log files i see the chrome driver crashes

Faulting application name: chromedriver.exe, version: 0.0.0.0, time stamp: 0x65f87911

Faulting module name: chromedriver.exe, version: 0.0.0.0, time stamp: 0x65f87911

Exception code: 0xc0000005

Fault offset: 0x00000000000ccf46

Faulting process id: 0x1e00

Faulting application start time: 0x01da81ef3406f3bb

Faulting application path: C:\debug\chromedriver-win64\chromedriver-win64\chromedriver.exe

Faulting module path: C:\debug\chromedriver-win64\chromedriver-win64\chromedriver.exe

Report Id: 4347024b-7717-40d9-b5a6-382ff629fc7b

Faulting package full name: 

Faulting package-relative application ID: 

this is not consistent , sometimes the tests can pass and sometimes i get this error and it doesn't matter what script i am running it can fall on any script in the batch .

*** Moved from Windows / Other/Unknown / Programs ***

Windows for business | Windows Server | Networking | Network connectivity and file sharing

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes
Accepted answer
  1. Anonymous
    2024-04-02T07:48:06+00:00

    Hello,

    This issue could be caused by various factors, such as compatibility issues between the ChromeDriver version and the Chrome browser version, or resource limitations on the AWS Windows server.

    Here are a few suggestions to troubleshoot the problem:

    1. Verify that the Chrome browser installed on the AWS Windows server is also up to date. If not, update it to the latest version.
    2. Check the resource utilization on the AWS Windows server during the test execution. Ensure that there is sufficient memory and CPU available to handle the test batch.

    Because this issue is caused by Jenkins or pytest, if the issue persists after trying these steps, consult Jenkins or pytes technical support for further assistance.

    Best regards

    Zunhui

    0 comments No comments

0 additional answers

Sort by: Most helpful