How to kill used port of docker
To expand on Robert Moskal's answer, you'll need to kill whatever's already on that port:
- kill all the containers again
- if you're on Linux, kill the process running on your port with
fuser -k 9042/tcp
- if above steps don't work, reboot your computer and try again.
Happy hunting!
I used with sudo
. it worked me.
sudo fuser -k 9042/tcp
I check port status:
$ netstat -pna | grep 9042
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)