This is a common error associated with running multiple servers on a single machine. Note the beginning of the error “Address already in use”. If you’re running multiple development servers, then the first one started is likely to run on port 80. If like me you often have multiple terminal tabs open it’s not always easy to remember which application is running on a specific port. You can use commands like lsof
to learn more about the command that used the port. For instance in the following example I’m passing port 8080
to lsof
, and can see that a NodeJS server is using the port:
$ lsof -i :8080
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 90692 wjgilmore 14u IPv4 0x41500bb50c0a1f2d 0t0 TCP *:http-alt (LISTEN)
Many tools such as Laravel’s serve
command support specifying a port at start time:
$ php artisan --port 8001