Tomcat port address is already in use (bind failed)

Time:2021-7-30

environment

  • Linux/Ubuntu20.04LTS
  • IntelliJ IDEA Community Editon 2021.1
  • java-11-openjdk-amd64
  • apache-tomcat-7.0.109

abnormal

Tomcat service port is occupied!

Critical: failed to initialize end point associated with protocolhandler ["http-bio-8087"]
Java.net.bindexception: address already in use (bind failed) < null >: 8087
July 14, 2021 9:45:36 PM org.apache.catalina.core.standardserver await
Critical: standardserver.await: create [localhost: 8005]:

reason

  1. The port address is already in use. The port address conflicts
  2. The service was not shut down in time during the last operation, and the service is still running, resulting in port conflict

programme

  1. In case of port conflict, directly modify the port number in the configuration file and re run the project

Tomcat port address is already in use (bind failed)

  1. If the service is not shut down in time, close the last running service, open the file in the Tomcat directory, directly shut down the service and execute $. / shutdown.sh
[email protected]:/usr/local/apache-tomcat-7.0.109/bin$ ./shutdown.sh

Just run the project again

explain

  • [in rainy season, eat rainbow] – layuji
  • It is compiled and released by individuals. It is inevitable that there are omissions or errors in the compilation process. Please point out them so as not to mislead everyone!