java.net.BindException: Address already in use

Scenario

Sometimes while trying to start the Testsigma Agent using the startup script, we might face errors in Apache Tomcat Server startup due to blockage of ports. The error message looks somewhat similar to the ones shown below:

SEVERE [main] org.apache.coyote.AbstractProtocol.init Failed to initialize end point associated with ProtocolHandler ["http-nio-8080"]
 java.net.BindException: Address already in use


Cause

This usually happens when one of your local Applications is already using the ports required by Apache Tomcat(ports 8080, 8005, 8009).


Resolution

You can perform either of the below options in this case:

1. Change the port that Testsigma Agent uses so as to avoid conflict with other Apps.

You can follow the steps in the following guide for that: How to change the port at which Testsigma Agent is running?


2. Kill the application that's using the ports(8080, 8005, 8009)

You can follow the steps in the following guide for that: How to kill process running on specific ports


Happy Test Automation!