netstat -tulnap shows me what ports are in use. How to free up a port in Linux?
netstat -tulnap
You can use tcpkill (part of the dsniff package) to kill the connection that's on the port you need:
tcpkill
dsniff
sudo tcpkill -9 port PORT_NUMBER