oncall icon indicating copy to clipboard operation
oncall copied to clipboard

Unable to use Docker Container

Open cameronhopkin opened this issue 5 years ago • 5 comments

Running the commands from the Documents to run the docker version has no errors when run. However when trying to connect to localhost:8080 the site throws an internal server error

Commands run: mkdir output python gen_packer_cfg.py ./oncall.yaml | tail -n +2 > ./output/oncall.json packer build -only=docker ./output/oncall.json docker run --name oncall-mysql -e MYSQL_ROOT_PASSWORD='1234' -d mysql --default-authentication-plugin=mysql_native_password docker run -d --link oncall-mysql:mysql -p 8080:8080 -e DOCKER_DB_BOOTSTRAP=1 quay.io/iris/oncall

Ran Docker Events& showed no issues

Running docker exec -it (container) bash and looking at processes shows Nginx Master and minion running

Running local for test environment is working but I need this dockerized and able to run with my iris instance.

cameronhopkin avatar Mar 19 '19 15:03 cameronhopkin

Found this in the uwsgi logs: Traceback (most recent call last): File "/home/oncall/env/bin/oncall-scheduler", line 6, in from oncall.bin.scheduler import main File "/home/oncall/env/local/lib/python2.7/site-packages/oncall/bin/scheduler.py", line 13, in from oncall.api.v0.schedules import get_schedules File "/home/oncall/env/local/lib/python2.7/site-packages/oncall/api/v0/schedules.py", line 4, in from urllib.parse import unquote ImportError: No module named parse Mon Mar 18 22:43:44 2019 - --- no python application found, check your startup logs for errors --- Mon Mar 18 22:43:44 2019 - --- no python application found, check your startup logs for errors --- Mon Mar 18 22:43:44 2019 - [uwsgi-daemons] throttling "/home/oncall/env/bin/oncall-scheduler /home/oncall/config/config.yaml" for 2 seconds

cameronhopkin avatar Mar 19 '19 16:03 cameronhopkin

We began a migration to Python 3, but have not yet updated the docs (and possibly ironed out all the bugs). I've moved this migration to a feature branch, and reverted master to a working Python 2.7 implementation. When the Python 3 migration is stable, we'll update documentation and merge in the branch. Running docker from HEAD should now work.

dwang159 avatar Mar 19 '19 20:03 dwang159

This appears to still be an issue on master. From: /home/oncall/var/log/uwsgi/error.log:

Tue Jun 18 18:54:46 2019 - --- no python application found, check your startup logs for errors ---

Is there a commit prior to the merge/revert we can reference?

chrisboustead avatar Jun 18 '19 19:06 chrisboustead

you can find fixed code here: https://github.com/cleveritcz/oncall

or just built docker container by github: docker pull cleveritcz/oncall:latest

cleveritcz avatar Aug 16 '19 21:08 cleveritcz

you can retake the code

cleveritcz avatar Aug 16 '19 21:08 cleveritcz