Closed jimbobcraig closed 3 years ago
FitTrackee needs to connect to database to start.
(note: unfortunately for now, application logs are located in fittrackee container, which does not make debugging easy in that case. I will fix docker-compose.yml
.)
Is DATABASE_URL
environment variable correctly initialized?
yes, before issuing the make,
source .env && echo $DATABASE_URL
shows the ENV variable to be correctly set.
make rebuild run init
completes with the following error.
Successfully built 02e1a8b275b5
Successfully tagged fittrackee_fittrackee:latest
Creating network "fittrackee_default" with the default driver
Creating fittrackee-redis ... done
Creating fittrackee-db ... done
Creating fittrackee ... done
ERROR: No container found for fittrackee_1
make: *** [Makefile:16: migrate] Error 1
are the scripts trying to create a second fittrackee container ? i'm beginning to think this is something simple I'm missing, but can't figure out what...
make init
needs fittrackee container running.
I updated docker-compose.yml
to mount a directory to store logs.
Can you try the last version to get error displayed in gunicorn logs?
@SamR1 I appreciate the support, thanks
make rebuild run init
ends with error
Successfully built b84172bb8b8e
Successfully tagged fittrackee_fittrackee:latest
Recreating fittrackee-db ...
Recreating fittrackee-db ... done
Recreating 632aaadd99b3_fittrackee ... done
ERROR: No container found for fittrackee_1
make: *** [Makefile:16: migrate] Error 1
gunicorn.log shows
[2021-07-13 12:28:47 +0000] [7] [INFO] Starting gunicorn 20.1.0
[2021-07-13 12:28:47 +0000] [7] [INFO] Listening at: http://0.0.0.0:5000 (7)
[2021-07-13 12:28:47 +0000] [7] [INFO] Using worker: gthread
[2021-07-13 12:28:47 +0000] [8] [INFO] Booting worker with pid: 8
[2021-07-13 12:28:47 +0000] [9] [INFO] Booting worker with pid: 9
[2021-07-13 12:28:48 +0000] [9] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/src/app/.venv/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
worker.init_process()
File "/usr/src/app/.venv/lib/python3.9/site-packages/gunicorn/workers/gthread.py", line 92, in init_process
super().init_process()
File "/usr/src/app/.venv/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
self.load_wsgi()
File "/usr/src/app/.venv/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/src/app/.venv/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/src/app/.venv/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
return self.load_wsgiapp()
File "/usr/src/app/.venv/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/src/app/.venv/lib/python3.9/site-packages/gunicorn/util.py", line 412, in import_app
app = app(*args, **kwargs)
File "/usr/src/app/.venv/lib/python3.9/site-packages/fittrackee/__init__.py", line 50, in create_app
email_service.init_email(app)
File "/usr/src/app/.venv/lib/python3.9/site-packages/fittrackee/emails/email.py", line 83, in init_email
parsed_url = parse_email_url(app.config['EMAIL_URL'])
File "/usr/src/app/.venv/lib/python3.9/site-packages/fittrackee/emails/utils_email.py", line 11, in parse_email_url
raise InvalidEmailUrlScheme()
fittrackee.emails.exceptions.InvalidEmailUrlScheme
[2021-07-13 12:28:48 +0000] [9] [INFO] Worker exiting (pid: 9)
[2021-07-13 12:28:48 +0000] [8] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/src/app/.venv/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
worker.init_process()
File "/usr/src/app/.venv/lib/python3.9/site-packages/gunicorn/workers/gthread.py", line 92, in init_process
super().init_process()
File "/usr/src/app/.venv/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
self.load_wsgi()
File "/usr/src/app/.venv/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/src/app/.venv/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/src/app/.venv/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
return self.load_wsgiapp()
File "/usr/src/app/.venv/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/src/app/.venv/lib/python3.9/site-packages/gunicorn/util.py", line 412, in import_app
app = app(*args, **kwargs)
File "/usr/src/app/.venv/lib/python3.9/site-packages/fittrackee/__init__.py", line 50, in create_app
email_service.init_email(app)
File "/usr/src/app/.venv/lib/python3.9/site-packages/fittrackee/emails/email.py", line 83, in init_email
parsed_url = parse_email_url(app.config['EMAIL_URL'])
File "/usr/src/app/.venv/lib/python3.9/site-packages/fittrackee/emails/utils_email.py", line 11, in parse_email_url
raise InvalidEmailUrlScheme()
fittrackee.emails.exceptions.InvalidEmailUrlScheme
[2021-07-13 12:28:48 +0000] [8] [INFO] Worker exiting (pid: 8)
[2021-07-13 12:28:48 +0000] [7] [WARNING] Worker with pid 9 was terminated due to signal 15
[2021-07-13 12:28:48 +0000] [7] [INFO] Shutting down: Master
[2021-07-13 12:28:48 +0000] [7] [INFO] Reason: Worker failed to boot.
Thanks for the logs.
It seems that the env variable EMAIL_URL
is invalid or empty (see documentation):
File "/usr/src/app/.venv/lib/python3.9/site-packages/fittrackee/emails/utils_email.py", line 11, in parse_email_url
raise InvalidEmailUrlScheme()
fittrackee.emails.exceptions.InvalidEmailUrlScheme
yeah, that has sorted it, typo in that variable in my setup. thank you for the support.
trying to run this as per the instructions in README.md. but i always get a failure of the fittrackee container. db and redis appear fine.
docker-compose logs -f gives,