error: unknown error: net::ERR_CONNECTION_REFUSED

I am running my selenium test in Azure DevOps and this is the error message I get. "error: unknown error: net::ERR_CONNECTION_REFUSED"

The test runs successfully in my local with no issue. But when I do a build in DevOps and run the Test, It fails from the very beginning due to this connection issue. It appears Chrome is unable to connect with the application in DevOps.

But when I use the same url in Chrome, the connection is successful. When I run the test in my VS, the connection is successful as well.

I am using the VsTest testAssemblies task for this.

Please any help will be much appreciated.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum