27
votes

I deployed my django app and when I tried

heroku run python manage.py syncdb

I got a timeout awaiting process error. Superuser is not created for the system yet, though i did syncdb by using:

heroku run:detached python manage.py createsuperuser

But this does not prompt me for the superuser.

Port 5000 is not blocked in my system. How do I make heroku run work (or) how do I create the super user?

4
Check your logs heroku logs , you may have problems with your requirements.txt - fasouto
Also, the syntax to create a super user is: createsuperuser without spaces - fasouto
@fasouto: I dont have a problem with the requirements.txt. The app is working and I also did syncdb. Only problem is i cannot create a superuser. - Aswin Murugesh
This really looks as though you can't connect, as you seem to be doing the right thing. Can you run heroku logs? - Rob Grant

4 Answers

76
votes

do not detach the heroku shell:

heroku run python manage.py createsuperuser

worked for me

7
votes

after wasting entire day i got the answer

heroku run python manage.py syncdb

doesn't run on institute or office lan to run this you must remove system proxy as well

 unset http_proxy
`unset https_proxy`

I hope this will help

2
votes

Try

heroku run python manage.py shell

And then create your superuser from there. Good luck!

1
votes

More info please.
What DB are you using?
Have you set your local_settings.py?
Are you using Debian?

I use Postgres on Debian so I had to both apt-get install python-psycopg2 (otherwise you can't use postgres) and pip install --user psycopg2 (otherwise pip freeze misses Postgres), then manually create a user and db. Replace USER with the username from your local_settings.py

sudo su - postgres
createuser USER -dPRs
createdb --owner USER  db.db