1

I have cloned this heroku-django-starter https://github.com/heroku/heroku-django-template.

I have done pip install gunicorn

When i run heroku local web, i'm getting the following error log.

forego | starting web.1 on port 5000
web.1  | [2016-03-08 21:03:59 -0800] [8288] [INFO] Starting gunicorn 19.4.5
web.1  | [2016-03-08 21:03:59 -0800] [8288] [ERROR] Connection in use: ('0.0.0.0', 5000)
web.1  | [2016-03-08 21:03:59 -0800] [8288] [ERROR] Retrying in 1 second.
web.1  | [2016-03-08 21:04:00 -0800] [8288] [ERROR] Connection in use: ('0.0.0.0', 5000)
web.1  | [2016-03-08 21:04:00 -0800] [8288] [ERROR] Retrying in 1 second.
web.1  | [2016-03-08 21:04:01 -0800] [8288] [ERROR] Connection in use: ('0.0.0.0', 5000)
user1159517
  • 5,390
  • 8
  • 30
  • 47

1 Answers1

15

This answer assumes you are running on a *nix machine like OSX or Linux.

kill `lsof -i :5000`

What this does is kill the process running on port 5000. You could also, if you wanted to see what was running on port 5000 run the following:

ps aux | grep 5000

That will show you the process running that match the string 5000 and you'll likely see what is causing that error. You could then kill that process id.

Another option is to run your app on a different port like so: heroku local web --port 5001

maxbeizer
  • 847
  • 9
  • 12
  • Changing the port did it for me. Strange as I run my local there, and yet there are actually other processes running there too that I don't control. Guess I don't understand the workings underneath. – Mote Zart Apr 27 '22 at 23:35