python - Django app successfully deploys to Heroku but immediately crashes with the Heroku open or Heroku local command -


i able create heroku app , deploy project heroku without error. additionally, app runs locally.


when run command heroku ps in command line: web.1: crashed 2016/01/06 01:30:10


when run heroku open default error message:

an error occurred in application , page not served. please try again in few moments. if application owner, check logs details.


with command: heroku local

web.1  | [2016-01-06 07:04:52 +0000] [33239] [info] starting gunicorn 19.4.5 web.1  | [2016-01-06 07:04:52 +0000] [33239] [info] listening at: http://0.0.0.0:5000 (33239) web.1  | [2016-01-06 07:04:52 +0000] [33239] [info] using worker: sync web.1  | [2016-01-06 07:04:52 +0000] [33242] [info] booting worker pid: 33242 

my directory set shown: directory


settings.py

import os import dj_database_url  # build paths inside project this: os.path.join(base_dir, ...) base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))   # quick-start development settings - unsuitable production   # security warning: keep secret key used in production secret! secret_key = 'removed'  # security warning: don't run debug turned on in production! debug = true  allowed_hosts = []  crispy_template_pack = 'bootstrap3' # application definition  installed_apps = [     #default django     'django.contrib.admin',     'django.contrib.auth',     'django.contrib.contenttypes',     'django.contrib.sessions',     'django.contrib.messages',     'django.contrib.staticfiles',     #third party     'crispy_forms',     #my apps     'mysite', ]  middleware_classes = [     'django.middleware.security.securitymiddleware',     'django.contrib.sessions.middleware.sessionmiddleware',     'django.middleware.common.commonmiddleware',     'django.middleware.csrf.csrfviewmiddleware',     'django.contrib.auth.middleware.authenticationmiddleware',     'django.contrib.auth.middleware.sessionauthenticationmiddleware',     'django.contrib.messages.middleware.messagemiddleware',     'django.middleware.clickjacking.xframeoptionsmiddleware', ]  root_urlconf = 'mysite.urls'  templates = [     {         'backend': 'django.template.backends.django.djangotemplates',         'dirs': ['mysite/templates'],         'app_dirs': true,         'options': {             'context_processors': [                 'django.template.context_processors.debug',                 'django.template.context_processors.request',                 'django.contrib.auth.context_processors.auth',                 'django.contrib.messages.context_processors.messages',             ],         },     }, ]  wsgi_application = 'mysite.wsgi.application'   # database  databases = {     'default': {         'engine': 'django.db.backends.postgresql_psycopg2',         'name': 'myproject3',         'user': 'myproject3user',         'password': 'password',         'host': 'localhost',         'port': '',     } }   # password validation  auth_password_validators = [     {         'name':   'django.contrib.auth.password_validation.userattributesimilarityvalidator',     },     {         'name': 'django.contrib.auth.password_validation.minimumlengthvalidator',     },     {         'name': 'django.contrib.auth.password_validation.commonpasswordvalidator',     },     {         'name': 'django.contrib.auth.password_validation.numericpasswordvalidator',     }, ]  password_hashers = (         'django.contrib.auth.hashers.pbkdf2passwordhasher',         'django.contrib.auth.hashers.pbkdf2sha1passwordhasher',         'django.contrib.auth.hashers.bcryptpasswordhasher',         'django.contrib.auth.hashers.sha1passwordhasher',         'django.contrib.auth.hashers.md5passwordhasher',         'django.contrib.auth.hashers.cryptpasswordhasher', )  # internationalization   #auth_profile_module = 'mysite.userprofile'  language_code = 'en-us'  time_zone = 'utc'  use_i18n = true  use_l10n = true  use_tz = true  # static files (css, javascript, images)   static_url = '/static/'  import dj_database_url databases['default'] = dj_database_url.config()  secure_proxy_ssl_header = ('http_x_forwarded_proto', 'https')  allowed_hosts = ['*']  debug = false  try:     .local_settings import * except importerror:     pass 

wsgi.py

import os  django.core.wsgi import get_wsgi_application  dj_static import cling  os.environ.setdefault("django_settings_module", "mysite.settings") application = cling(get_wsgi_application()) 

procfile

web: gunicorn mysite.wsgi --preload 

requirements.txt

dj-database-url==0.3.0 dj-static==0.0.6 django==1.9.1 django-crispy-forms==1.5.2 django-toolbelt==0.0.1 gunicorn==19.4.5 heroku==0.1.4 postgres==2.2.1 psycopg2==2.6.1 python-dateutil==1.5 requests==2.9.1 static3==0.6.1 waitress==0.8.10 wheel==0.24.0 whitenoise==2.0.6 

runtime.txt

python-2.7.10 

i have spent considerable amount of time trying debug problem , gone through countless tutorials appreciated!

heroku logs

2016-01-06t12:14:27.531220+00:00 heroku[web.1]: state changed starting crashed  2016-01-06t12:14:27.546362+00:00 heroku[web.1]: process exited status 1 2016-01-06t17:51:55.821211+00:00 heroku[web.1]: starting process command `gunicorn mysite.wsgi --preload` 2016-01-06t17:51:59.829953+00:00 app[web.1]: traceback (most recent call last): 2016-01-06t17:51:59.839957+00:00 app[web.1]:   file "/app/.heroku/python/bin/gunicorn", line 11, in <module> 2016-01-06t17:51:59.840035+00:00 app[web.1]:     sys.exit(run()) 2016-01-06t17:51:59.840068+00:00 app[web.1]:   file "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 74, in run 2016-01-06t17:51:59.840117+00:00 app[web.1]:     wsgiapplication("%(prog)s [options] [app_module]").run() 2016-01-06t17:51:59.840227+00:00 app[web.1]:     super(application, self).run() 2016-01-06t17:51:59.840311+00:00 app[web.1]:     arbiter(self).run() 2016-01-06t17:51:59.840163+00:00 app[web.1]:   file "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 192, in run 2016-01-06t17:51:59.840248+00:00 app[web.1]:   file "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 72, in run 2016-01-06t17:51:59.840335+00:00 app[web.1]:   file "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 61, in __init__ 2016-01-06t17:51:59.840379+00:00 app[web.1]:     self.setup(app) 2016-01-06t17:51:59.840401+00:00 app[web.1]:   file "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 119, in setup 2016-01-06t17:51:59.840476+00:00 app[web.1]:     self.app.wsgi() 2016-01-06t17:51:59.840497+00:00 app[web.1]:   file "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi 2016-01-06t17:51:59.840540+00:00 app[web.1]:     self.callable = self.load() 2016-01-06t17:51:59.840561+00:00 app[web.1]:   file "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load 2016-01-06t17:51:59.840624+00:00 app[web.1]:     return self.load_wsgiapp() 2016-01-06t17:51:59.840646+00:00 app[web.1]:   file "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp 2016-01-06t17:51:59.840689+00:00 app[web.1]:     return util.import_app(self.app_uri) 2016-01-06t17:51:59.840711+00:00 app[web.1]:   file "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 357, in import_app 2016-01-06t17:51:59.840812+00:00 app[web.1]:     __import__(module) 2016-01-06t17:51:59.840833+00:00 app[web.1]:   file "/app/mysite/wsgi.py", line 17, in <module> 2016-01-06t17:51:59.840869+00:00 app[web.1]:     application = cling(get_wsgi_application()) 2016-01-06t17:51:59.840891+00:00 app[web.1]:   file "/app/.heroku/python/lib/python2.7/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application 2016-01-06t17:51:59.840948+00:00 app[web.1]:     django.setup() 2016-01-06t17:51:59.840971+00:00 app[web.1]:   file "/app/.heroku/python/lib/python2.7/site-packages/django/__init__.py", line 17, in setup 2016-01-06t17:51:59.841009+00:00 app[web.1]:     configure_logging(settings.logging_config, settings.logging) 2016-01-06t17:51:59.841031+00:00 app[web.1]:   file "/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py", line 55, in __getattr__ 2016-01-06t17:51:59.841074+00:00 app[web.1]:     self._setup(name) 2016-01-06t17:51:59.841145+00:00 app[web.1]:   file "/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py", line 43, in _setup 2016-01-06t17:51:59.841188+00:00 app[web.1]:     self._wrapped = settings(settings_module) 2016-01-06t17:51:59.841209+00:00 app[web.1]:   file "/app/.heroku/python/lib/python2.7/site-packages/django/conf/__init__.py", line 99, in __init__ 2016-01-06t17:51:59.841325+00:00 app[web.1]:     mod = importlib.import_module(self.settings_module) 2016-01-06t17:51:59.841348+00:00 app[web.1]:   file "/app/.heroku/python/lib/python2.7/importlib/__init__.py", line 37, in import_module 2016-01-06t17:51:59.841389+00:00 app[web.1]:     __import__(name) 2016-01-06t17:51:59.841478+00:00 app[web.1]: importerror: no module named prod 2016-01-06t17:52:01.141159+00:00 heroku[web.1]: process exited status 1 2016-01-06t17:52:01.152836+00:00 heroku[web.1]: state changed starting crashed 

i've been struggling problem , have been researching other similar services heroku seems 1 interacts django.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -