Grunt error “port 9000 is already in use” [solved]

When trying to run “grunt server” to start up the front-end you may come across port already in use errors. Like this one:


Grunt uses these ports to setup various features such as live reload, documentation, testing etc… It may be that your previous Grunt server was running on those ports and unexpectedly exited but those ports are still in use. You will need to kill those processes in order to start a new Grunt server up. To find process ids that are running type:

netstat -a | egrep 'Proto|LISTEN'

Grunt error port 9000 is already in use

If you want a full list of all process ids using a specific port type:

lsof -n | grep TCP | grep LISTEN | grep 9000


In this example we can see actually that php-fp is using port 9000. Let’s kill them.

sudo kill $(sudo lsof -t -i:9000)


We’re up and running again!