Solution to occupied port number (super detailed)

Time:2021-8-14

Problem description

java.net.BindException: Address already in use: JVM_Bind

Solution to occupied port number (super detailed)

Web server failed to start. Port 8899 was already in use.

Solution to occupied port number (super detailed)

Encountering the above similar problems means that your port number is already in use. We commonly call this problem as port number occupied.

Solution

  1. win+ROpen the windows computer running window and enter in the text input box of the running windowcmdinstructions
    Solution to occupied port number (super detailed)
  2. Enter the command in the pop-up command window (terminal)netstat -ano|findstr 8080, 8080 is the port number we need to query
    Solution to occupied port number (super detailed)
  3. We will get the response given by the system. There is a value in the first row of the query, which we need to remember
    Solution to occupied port number (super detailed)
  4. Here, we can kill the occupied port number through two modes

    • Terminal instructionTaskkill PID value – F
      Solution to occupied port number (super detailed)
    • Graphical interface
      Solution to occupied port number (super detailed)
  5. Some related terminal instructions are also involved here

    • View all port numbersnetstat -ano
      Solution to occupied port number (super detailed)
    • Obtain the process information through PIDTasklist | findstr PID value
      Solution to occupied port number (super detailed)
    • Kill the corresponding process by process nameTaskkill / F / T / im process name
      Solution to occupied port number (super detailed)

Recommended Today

Java Engineer Interview Questions

The content covers: Java, mybatis, zookeeper, Dubbo, elasticsearch, memcached, redis, mysql, spring, spring boot, springcloud, rabbitmq, Kafka, Linux, etcMybatis interview questions1. What is mybatis?1. Mybatis is a semi ORM (object relational mapping) framework. It encapsulates JDBC internally. During development, you only need to pay attention to the SQL statement itself, and you don’t need to […]