Which application is running on which port?
sudo lsof -i :9000 # checks port 9000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 53 root 19u IPv6 0t0 TCP *:cslistener (LISTEN)
To kill the process with PID;
sudo kill 53