The aforementioned killall -9 node, suggested by Patrick works as expected and solved the problem for me (although you may want to read the edit part of this very answer about why kill -9 may not be the best way to do it).
But you might want to target a single process rather than killing all active processes.
In that case, first get the ID of the process running on that port (say 8888):
This will return something like:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME node 57385 You 11u IPv6 0xac745b2749fd2be3 0t0 TCP *:ddi-tcp-1 (LISTEN) Then just do:
kill -9 57385
You can read a bit more about this here.
EDIT: I was reading on a fairly related topic today and stumbled upon this interesting thread on "why should i not kill -9 a process?".
Generally, you should use kill -15 before kill -9 to give the target process a chance to clean up after itself. (Processes can't catch or ignore SIGKILL, but they can and often do catch SIGTERM.) If you don't give the process a chance to finish what it's doing and clean up, it may leave corrupted files (or other state) around that it won't be able to understand once restarted.
So, as stated you should better kill the above process with:
kill -15 57385
Tested and worked for me too, i guess it may be a better alternative in this case.