>_ IzzyLab

Topic breakdown

When a process can't take a TCP port, the kernel responds with address already in use — the port is already held by another process. Diagnosis goes in two steps: first, with a socket-viewing utility (ss, historically netstat) you find the owner process's name and PID by the port number, then with a signal via kill you terminate it and make sure it's dead (pgrep). Having freed the port, you bring up the right service — and so that it survives the terminal closing, you detach it from the session and send it to the background (nohup/setsid with &).

What's checked

  1. the stray process is killed
  2. port 8080 serves the real application

What it looks like