Clear the port, by finding the process using the port.
For example, find a process using port 8000.
$ netstat -tulpn | grep 8000
Running the netstat command will show an id on the far right. Stop the process by passing this process id to the kill command.
For example, if the id was 3746, run the following command.
$ kill 3746