Question

I can't track down what's forcing localhost:8000 and localhost:8888 to redirect to localhost:8080. Is there anyone out there that has an idea? I'm on a local machine, mac os x, not a server. I've used jekyll, pow, haproxy, nodejs, webrick, and mamp. Right now none of them are running (as far as I know).

Was it helpful?

Solution 2

Here's a bash script that will kill the process running on a specific port.

lsof -n -i4TCP:3000 | grep LISTEN | tr -s ' ' | cut -f 2 -d ' ' | xargs kill -9

Just replace 3000 with the desired port you'd like to kill.

This should clear all your ports for you:

lsof -n -i4TCP:8080 | grep LISTEN | tr -s ' ' | cut -f 2 -d ' ' | xargs kill -9
lsof -n -i4TCP:8888 | grep LISTEN | tr -s ' ' | cut -f 2 -d ' ' | xargs kill -9
lsof -n -i4TCP:8000 | grep LISTEN | tr -s ' ' | cut -f 2 -d ' ' | xargs kill -9

OTHER TIPS

There is a lot of tiny tools that can do that for you. Search for port forwarding tools...

You can also make a tunnel with ssh.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top