בעיה בהעלאה להירוקו על אתר קיים

תגיות: ,

היי,

עריכה: אני לא יכולה להקים אפליקציה חדשה כיוון שנגמרו לי ה 5 ניסיונות חינם, ולכן אני מעלה קבצים על אתר קיים במקום.
העלתי את כל הקבצים ל git (אני לא מצליחה לעשות חיבור עם heroku )
מקבלת את השגיאה:

  • Error: remote was closed, authorization was denied, or an authentication message otherwise not received before the window closed.

מה ניתן לעשות?

תודה!

היי עדי,

דרך אחת להתגבר על מגבלת ה־5 ניסיונות היא לפתוח חשבון חדש.
יש טריק מגניב נורא עבור משתמשי ג’ימייל – את יכולה להוסיף + אחרי שם המשתמש שלך, ואז לכתוב מה שאת רוצה, וזה עדיין יגיע לכתובת המייל שלך. לדוגמה, אם הכתובת שלי היא yam@gmail.com, אני יכול לכתוב yam+heroku@gmail.com וזה עדיין יגיע ל־yam@gmail.com. ככה את יכולה לפתוח חשבון חדש ועדיין להשתמש באותה כתובת דוא"ל.

כדי לתת דרך נוספת אני צריך להבין כמה שיותר פרטים:
– מה השגיאה?
– איפה היא מופיעה?
– באיזה שלב בתהליך?
– מה כתובת האתר?
– מה מופיע בלוגים?

מקבלת את השגיאה הבאה כאשר אני לוחצת בתוך heroku על להתחבר באמצעות git ומכניסה שם משתמש וסיסמה:

  • Error: remote was closed, authorization was denied, or an authentication message otherwise not received before the window closed.
    העלתי בעבר אתר על אתר
    כתובת האתר: https://seriesweb.herokuapp.com/

הצלחתי לבסוף להתחבר לgit, מצרפת מה שרשום בlog

-----> Python app detected
-----> Requirements file has been changed, clearing cached dependencies
-----> Installing python-3.6.12
-----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
-----> Installing SQLite3
-----> Installing requirements with pip
       Collecting click==7.1.2
         Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
       Collecting Flask==1.1.2
         Downloading Flask-1.1.2-py2.py3-none-any.whl (94 kB)
       Collecting itsdangerous==1.1.0
         Downloading itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
       Collecting Jinja2==2.11.2
         Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
       Collecting MarkupSafe==1.1.1
         Downloading MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl (27 kB)
       Collecting peewee==3.14.0
         Downloading peewee-3.14.0.tar.gz (873 kB)
       Collecting psycopg2==2.8.6
         Downloading psycopg2-2.8.6.tar.gz (383 kB)
       Collecting Werkzeug==1.0.1
         Downloading Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
       Building wheels for collected packages: peewee, psycopg2
         Building wheel for peewee (setup.py): started
         Building wheel for peewee (setup.py): finished with status 'done'
         Created wheel for peewee: filename=peewee-3.14.0-cp36-cp36m-linux_x86_64.whl size=600994 sha256=291a5c6ed335edca18f26abf05d680a1e7b2e8617494756bb0b7221322c33253
         Stored in directory: /tmp/pip-ephem-wheel-cache-4crucmhe/wheels/25/83/34/abda7ea46226da0db8f5ed68b14b6d0fa5f79a746b1d07527d
         Building wheel for psycopg2 (setup.py): started
         Building wheel for psycopg2 (setup.py): finished with status 'done'
         Created wheel for psycopg2: filename=psycopg2-2.8.6-cp36-cp36m-linux_x86_64.whl size=447621 sha256=4aae71967cf1c0bb05ea6bba9980efa8c02c6b531dcef259c07c9f8bc3973858
         Stored in directory: /tmp/pip-ephem-wheel-cache-4crucmhe/wheels/cb/74/1b/4b65077db4eb0d85763050e60c5921398d2858945558352dd8
       Successfully built peewee psycopg2
       Installing collected packages: click, MarkupSafe, Jinja2, Werkzeug, itsdangerous, Flask, peewee, psycopg2
       Successfully installed Flask-1.1.2 Jinja2-2.11.2 MarkupSafe-1.1.1 Werkzeug-1.0.1 click-7.1.2 itsdangerous-1.1.0 peewee-3.14.0 psycopg2-2.8.6
-----> Discovering process types
       Procfile declares types -> web
-----> Compressing...
       Done: 46.4M
-----> Launching...
       Released v6
       https://seriesweb.herokuapp.com/ deployed to Heroku

הלוג נראה טוב. מה לא עובד? :slight_smile:

כשנכנסים לקישור האתר לא מופיע כלום :confused:

בrequiments הוספתי הכל
כאשר האתר היה על שרת מקומי הכל עבד , לא בטוחה איפה עוד לבדוק.

איפה יש עוד להסתכל ולבדוק?

תודה רבה!

מממ, זה כל מה שמופיע בלוג?
אין איזו הודעת שגיאה באיזשהו מקום?

באתר עצמו כתוב apllication error
והעתקתי את כל מה שכתוב בlog :confused:

הנה מה שמכיל requiments:

click==7.1.2

Flask==1.1.2

itsdangerous==1.1.0

Jinja2==2.11.2

MarkupSafe==1.1.1

peewee==3.14.0

psycopg2==2.8.6

Werkzeug==1.0.1 

עכשיו שאני בסביבה הוירטואלית אני רואה שהוא לא מצליח ליבא לapp.py את models.py, ן private.py ת האם הדבר נובא מgitignore? האם הייתי צריכה להתקין דבר נוסף ל
?requiments

הדבקת את ה־Build log. אולי יש לוג אחר רלוונטי?

image

מצרפת:

2020-12-09T19:58:37.000000+00:00 app[api]: Build succeeded

2020-12-09T19:58:39.272301+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`

2020-12-09T19:58:42.252992+00:00 app[web.1]: bash: gunicorn: command not found

2020-12-09T19:58:42.324786+00:00 heroku[web.1]: Process exited with status 127

2020-12-09T19:58:42.379327+00:00 heroku[web.1]: State changed from starting to crashed

2020-12-09T19:58:43.734759+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=seriesweb.herokuapp.com request_id=c00f7f7e-ec2b-41e0-a8c3-33b4d7058e0f fwd="77.137.154.227" dyno= connect= service= status=503 bytes= protocol=https

2020-12-09T20:00:13.118904+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=seriesweb.herokuapp.com request_id=4a738998-798c-484d-89ca-84f6ad0c19f4 fwd="77.137.154.227" dyno= connect= service= status=503 bytes= protocol=https

2020-12-09T20:05:49.202756+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=seriesweb.herokuapp.com request_id=9bafce40-9355-4845-aba4-c708dae75417 fwd="87.70.80.70" dyno= connect= service= status=503 bytes= protocol=https

2020-12-09T20:05:49.544910+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=seriesweb.herokuapp.com request_id=2f8fd844-520f-4330-a994-bcdc7cd00d38 fwd="87.70.80.70" dyno= connect= service= status=503 bytes= protocol=https

2020-12-09T20:18:59.662280+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=seriesweb.herokuapp.com request_id=779dd290-3ad5-458d-9aa0-17df46d5a2db fwd="77.137.115.30" dyno= connect= service= status=503 bytes= protocol=https

ומכאן כבר פתרנו :slight_smile:

מיד מנסה.

המון תודה, על כל העזרה לאורך כל היום.
מאוד מעריכה את זה!!

לייק 1

עדיין הודעות שגיאה למרות שעכשיו guincorn מותקן.
בסביבה הוירטואלית בנוסף app.py לא מצליח ליבא את private.py ואת models.py, לא הייתה בעיה כזו מחוץ לסביבה הוירטואלית

2020-12-09T20:24:27.911642+00:00 heroku[web.1]: State changed from crashed to starting
2020-12-09T20:24:31.045198+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`
2020-12-09T20:24:33.287460+00:00 app[web.1]: bash: gunicorn: command not found
2020-12-09T20:24:33.348215+00:00 heroku[web.1]: Process exited with status 127
2020-12-09T20:24:33.389733+00:00 heroku[web.1]: State changed from starting to crashed
2020-12-09T20:28:10.319855+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=seriesweb.herokuapp.com request_id=07763fbd-994f-48b2-9112-0dbee21234aa fwd="77.137.154.227" dyno= connect= service= status=503 bytes= protocol=https
2020-12-09T20:28:11.000000+00:00 app[api]: Build started by user adidas2712@gmail.com
2020-12-09T20:28:58.822827+00:00 app[api]: Deploy 7f7272cc by user adidas2712@gmail.com
2020-12-09T20:28:58.822827+00:00 app[api]: Release v7 created by user adidas2712@gmail.com
2020-12-09T20:28:59.540197+00:00 heroku[web.1]: State changed from crashed to starting
2020-12-09T20:29:02.381101+00:00 heroku[web.1]: Starting process with command `gunicorn app:app`
2020-12-09T20:29:04.830261+00:00 heroku[web.1]: Process exited with status 3
2020-12-09T20:29:04.866257+00:00 heroku[web.1]: State changed from starting to crashed
2020-12-09T20:29:04.618937+00:00 app[web.1]: [2020-12-09 20:29:04 +0000] [4] [INFO] Starting gunicorn 20.0.4
2020-12-09T20:29:04.619814+00:00 app[web.1]: [2020-12-09 20:29:04 +0000] [4] [INFO] Listening at: http://0.0.0.0:54978 (4)
2020-12-09T20:29:04.619993+00:00 app[web.1]: [2020-12-09 20:29:04 +0000] [4] [INFO] Using worker: sync
2020-12-09T20:29:04.625118+00:00 app[web.1]: [2020-12-09 20:29:04 +0000] [10] [INFO] Booting worker with pid: 10
2020-12-09T20:29:04.630130+00:00 app[web.1]: [2020-12-09 20:29:04 +0000] [11] [INFO] Booting worker with pid: 11
2020-12-09T20:29:04.636523+00:00 app[web.1]: [2020-12-09 20:29:04 +0000] [10] [ERROR] Exception in worker process
2020-12-09T20:29:04.636525+00:00 app[web.1]: Traceback (most recent call last):
2020-12-09T20:29:04.636526+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2020-12-09T20:29:04.636527+00:00 app[web.1]:     worker.init_process()
2020-12-09T20:29:04.636527+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 119, in init_process
2020-12-09T20:29:04.636527+00:00 app[web.1]:     self.load_wsgi()
2020-12-09T20:29:04.636528+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
2020-12-09T20:29:04.636528+00:00 app[web.1]:     self.wsgi = self.app.wsgi()
2020-12-09T20:29:04.636529+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
2020-12-09T20:29:04.636529+00:00 app[web.1]:     self.callable = self.load()
2020-12-09T20:29:04.636530+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
2020-12-09T20:29:04.636530+00:00 app[web.1]:     return self.load_wsgiapp()
2020-12-09T20:29:04.636531+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
2020-12-09T20:29:04.636531+00:00 app[web.1]:     return util.import_app(self.app_uri)
2020-12-09T20:29:04.636532+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 358, in import_app
2020-12-09T20:29:04.636532+00:00 app[web.1]:     mod = importlib.import_module(module)
2020-12-09T20:29:04.636533+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/importlib/__init__.py", line 126, in import_module
2020-12-09T20:29:04.636533+00:00 app[web.1]:     return _bootstrap._gcd_import(name[level:], package, level)
2020-12-09T20:29:04.636533+00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 994, in _gcd_import
2020-12-09T20:29:04.636534+00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
2020-12-09T20:29:04.636534+00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
2020-12-09T20:29:04.636535+00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
2020-12-09T20:29:04.636535+00:00 app[web.1]:   File "<frozen importlib._bootstrap_external>", line 678, in exec_module
2020-12-09T20:29:04.636535+00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2020-12-09T20:29:04.636536+00:00 app[web.1]:   File "/app/app.py", line 4, in <module>
2020-12-09T20:29:04.636536+00:00 app[web.1]:     import bcrypt
2020-12-09T20:29:04.636537+00:00 app[web.1]: ModuleNotFoundError: No module named 'bcrypt'
2020-12-09T20:29:04.636824+00:00 app[web.1]: [2020-12-09 20:29:04 +0000] [10] [INFO] Worker exiting (pid: 10)
2020-12-09T20:29:04.641016+00:00 app[web.1]: [2020-12-09 20:29:04 +0000] [11] [ERROR] Exception in worker process
2020-12-09T20:29:04.641018+00:00 app[web.1]: Traceback (most recent call last):
2020-12-09T20:29:04.641018+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2020-12-09T20:29:04.641019+00:00 app[web.1]:     worker.init_process()
2020-12-09T20:29:04.641019+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 119, in init_process
2020-12-09T20:29:04.641020+00:00 app[web.1]:     self.load_wsgi()
2020-12-09T20:29:04.641020+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
2020-12-09T20:29:04.641020+00:00 app[web.1]:     self.wsgi = self.app.wsgi()
2020-12-09T20:29:04.641021+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
2020-12-09T20:29:04.641022+00:00 app[web.1]:     self.callable = self.load()
2020-12-09T20:29:04.641022+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
2020-12-09T20:29:04.641023+00:00 app[web.1]:     return self.load_wsgiapp()
2020-12-09T20:29:04.641023+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
2020-12-09T20:29:04.641023+00:00 app[web.1]:     return util.import_app(self.app_uri)
2020-12-09T20:29:04.641024+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/site-packages/gunicorn/util.py", line 358, in import_app
2020-12-09T20:29:04.641024+00:00 app[web.1]:     mod = importlib.import_module(module)
2020-12-09T20:29:04.641029+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/importlib/__init__.py", line 126, in import_module
2020-12-09T20:29:04.641030+00:00 app[web.1]:     return _bootstrap._gcd_import(name[level:], package, level)
2020-12-09T20:29:04.641030+00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 994, in _gcd_import
2020-12-09T20:29:04.641031+00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 971, in _find_and_load
2020-12-09T20:29:04.641031+00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
2020-12-09T20:29:04.641031+00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
2020-12-09T20:29:04.641032+00:00 app[web.1]:   File "<frozen importlib._bootstrap_external>", line 678, in exec_module
2020-12-09T20:29:04.641032+00:00 app[web.1]:   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2020-12-09T20:29:04.641033+00:00 app[web.1]:   File "/app/app.py", line 4, in <module>
2020-12-09T20:29:04.641033+00:00 app[web.1]:     import bcrypt
2020-12-09T20:29:04.641040+00:00 app[web.1]: ModuleNotFoundError: No module named 'bcrypt'
2020-12-09T20:29:04.641495+00:00 app[web.1]: [2020-12-09 20:29:04 +0000] [11] [INFO] Worker exiting (pid: 11)
2020-12-09T20:29:04.767231+00:00 app[web.1]: [2020-12-09 20:29:04 +0000] [4] [INFO] Shutting down: Master
2020-12-09T20:29:04.767357+00:00 app[web.1]: [2020-12-09 20:29:04 +0000] [4] [INFO] Reason: Worker failed to boot.
2020-12-09T20:29:06.000000+00:00 app[api]: Build succeeded

מה הבנת מקריאת קובץ ה־log? :slight_smile:

כביכול ש gunicorn עדיין לא מותקן, אבל התקנתי אותו והוא גם נוסף לrequirment.

אלא אם שוב אני מפספת משהו כנראה.

נכון, זו הייתה הבעיה בפעם שעברה, אבל עכשיו סידרת את זה. זה נראה ש־gunicorn עובד אחלה בלוג החדש.

שתי אופציות לאיך ממשיכים מפה, לפי הלוג החדש:

  1. קראי את הלוג וחפשי דברים שנראים כמו קריסת פייתון, ואז טפלי בהם כמו שהיית מטפלת בכל קריסה אחרת.
  2. נסי לעשות CTRL+F על המילה ERROR ולראות מה כתוב בכל השורות שיש בהן את המילה הזו. איזו שגיאה נראית לך בעייתית/מוכרת?

האם התכוונת ל:

ModuleNotFoundError: No module named 'bcrypt'?

אוקיי. נשמע שזה באמת בעייתי שזה מופיע בלוג. איך היית פותרת?

מתקינה את המודול בסביבה הוירטואלית. (התקנתי אותו ומשום מה הוא לא מופיע ב requirements.
מנסה שוב ומעדכנת.
תודה תודה!!

עזר מאוד בהורדת כמות הבעיות. לפי מה שאני רואה הוא נופל כי models.py לא מצליח לייבא את private.py וapp.py לא מצליח ליבא את models
כל הקבצים הללו נמצאים באותה תיקייה והבעיה לא הופיעה עד הופעת הסביבה הוירטואלית.

2020-12-09T20:53:02.206825+00:00 app[web.1]:   File "/app/app.py", line 9, in <module>
2020-12-09T20:53:02.206826+00:00 app[web.1]:     from models import database, Companies, Categories, Movies, Users, MoviesCompany,  MoviesCategory, Reviews
2020-12-09T20:53:02.206826+00:00 app[web.1]:   File "/app/models.py", line 6, in <module>
2020-12-09T20:53:02.206827+00:00 app[web.1]:     import private
2020-12-09T20:53:02.206837+00:00 app[web.1]: ModuleNotFoundError: No module named 'private'
2020-12-09T20:53:02.207345+00:00 app[web.1]: [2020-12-09 20:53:02 +0000] [11] [INFO] Worker exiting (pid: 11)
2020-12-09T20:53:02.345590+00:00 app[web.1]: [2020-12-09 20:53:02 +0000] [4] [INFO] Shutting down: Master
2020-12-09T20:53:02.345738+00:00 app[web.1]: [2020-12-09 20:53:02 +0000] [4] [INFO] Reason: Worker failed to boot.
2020-12-09T20:53:02.433053+00:00 heroku[web.1]: Process exited with status 3
2020-12-09T20:53:02.479355+00:00 heroku[web.1]: State changed from starting to crashed