Comments (22)
@sanyam-git It looks like you're doing all the right things here, so I'll spin up a ubuntu 18.04 vm and see if I can reproduce.
from twlight.
@jsnshrmn were you able to reproduce the issue, any update ?
from twlight.
@sanyam-git not so far. I've tried a few different iterations of a fresh ubuntu 18.04.3 vm, and so far it works every time.
from twlight.
based on the errors your seeing, it looks like the db is up, but that django isn't correctly picking up the credentials. That stuff is all there in the git checkout, so I'm wondering if you have git tree on an interesting filesystem, like something remotely mounted, or ntfs, something like that?
from twlight.
-
performed
git checkout
I am getting thisYour branch is up to date with 'origin/master'.
-
I forget to mention earlier that I use a dual boot system with Windows 10 (use NTFS file system) and Mint 19.3.
-
I checked the disk partitions and it showed that Linux Mint is not using NTFS
and the windows partitions are unmounted.
Hope this can help.
from twlight.
Till this issue isn't fixed, is there any alternate way to setup TWLight on my machine?
Does using VM feasible to run the app and can you provide some info about what VM to use and other
required details. Thanks!
from twlight.
When I spoke about setting up a VM, I was referring to one that then gets docker setup on it. You would just go through the exact same steps you've already done, just within the VM.
from twlight.
It's been a little while since I've heard back from you. @sanyam-git were you able to try the setup from within a VM? Success? Failure?
from twlight.
Thanks @jsnshrmn for helping with issue. But no succees so far, even with the VM I am getting the same issue.
from twlight.
can you post the output of printenv from the twlight container? e.g. something like docker-compose exec twlight printenv
?
from twlight.
The output of pritenv from the twlight container:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/pandoc-2.7.1/bin
HOSTNAME=172996a674c9
TERM=xterm
DJANGO_DB_HOST=db
DJANGO_EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend
DJANGO_EMAIL_ADMINS_BACKEND=django.core.mail.backends.dummy.EmailBackend
DJANGO_EMAIL_HOST=localhost
DJANGO_SETTINGS_MODULE=TWLight.settings.local
TWLIGHT_HOME=/app
TWLIGHT_DUMP_DIR=
TWLIGHT_MYSQLDUMP_DIR=/app/TWLight
TWLIGHT_BACKUP_DIR=/app/backup
TWLIGHT_ENV=local
TWLIGHT_UNIXNAME=root
[email protected]
USER=root
ALLOWED_HOSTS=localhost 127.0.0.1 [::1]
REQUEST_BASE_URL=http://localhost/
DEBUG=True
TWLIGHT_OAUTH_PROVIDER_URL=https://meta.wikimedia.org/w/index.php
TWLIGHT_EZPROXY_URL=https://wikipedialibrary.idm.oclc.org:9443
GUNICORN_CMD_ARGS=--name twlight --workers 1 --backlog 2048 --timeout 300 --bind=-0.0.0.0:80 --forwarded-allow-ips * --reload --log-level=info
PYTHONUNBUFFERED=1
PYTHONPATH=/app:/usr/lib/python3.7
HOME=/root
from twlight.
https://stackoverflow.com/questions/1559955/host-xxx-xx-xxx-xxx-is-not-allowed-to-connect-to-this-mysql-server/1559992 might be relevant.
Can you try running it on root (rootless is an experimental feature afaik)?
from twlight.
@sanyam-git your container doesn't seem to have loaded the "secrets" for the development environment. Here's a fresh printenv
from my dev environment. Notice that there is a db password in there, among other things?
TWLIGHT_EZPROXY_SECRET=twlight
TWLIGHT_API_PROVIDER_ENDPOINT=https://meta.wikimedia.org/w/api.php
TWLIGHT_OAUTH_CONSUMER_SECRET=3c89911e1981b9bc2777618eeca4e7d22d25821e
PWD=/app
TWLIGHT_UNIXNAME=root
DJANGO_DB_HOST=db
GUNICORN_CMD_ARGS=--name twlight --workers 1 --backlog 2048 --timeout 300 --bind=-0.0.0.0:80 --forwarded-allow-ips * --reload --log-level=info
DJANGO_DB_PASSWORD=twlight
HOME=/root
VIRTUAL_ENV=/venv
SECRET_KEY=twlight
TWLIGHT_DUMP_DIR=
TWLIGHT_BACKUP_DIR=/app/backup
DJANGO_SETTINGS_MODULE=TWLight.settings.local
DJANGO_DB_NAME=twlight
DJANGO_EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend
PYTHONPATH=/app:/venv:/usr/lib/python3.8
TERM=xterm
USER=root
TWLIGHT_EZPROXY_URL=https://wikipedialibrary.idm.oclc.org:9443
SHLVL=1
DJANGO_DB_USER=twlight
TWLIGHT_MYSQLDUMP_DIR=/app/TWLight
REQUEST_BASE_URL=http://localhost/
PS1=(venv) ${debian_chroot:+($debian_chroot)}\w\$
DJANGO_EMAIL_ADMINS_BACKEND=django.core.mail.backends.dummy.EmailBackend
GCC_COLORS=error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01
TWLIGHT_OAUTH_CONSUMER_KEY=42b486d69d24a109c49e12673895b3aa
PATH=/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/pandoc-2.7.1/bin
DEBUG=True
[email protected]
TWLIGHT_OAUTH_PROVIDER_URL=https://meta.wikimedia.org/w/index.php
OLDPWD=/app
those should be getting pulled from the files under the ./secrets
directory in the project.
from twlight.
@QEDK tried with root
also, no change same issue persists.
from twlight.
@jsnshrmn , Yep this should be the reason why it is not allowed to connect to the db. Is there a way by which I can manually write the secrets rather than fetching from file.
from twlight.
@sanyam-git yes, they are just used to set environment variables in the guest vm. See bin/twlight_docker_secrets.sh
which is supposed to do that for you.
from twlight.
But I'm pretty baffled as to why this wouldn't be working for you in the first place. Do the files in your secrets
directory on the host match up with what's visible in the codebase on github? Do those files seem to be mounted under /run/secrets
in your twlight container?
from twlight.
- tried manually running
./twlight_docker_secrets.sh
, no change - check secrets files at local with that on github repo, no difference
I did't found any folder/ file with name as secrets
under /run/
directory. Is there need to be one ?
from twlight.
you are correct if you don't have /run/secrets
in the container then you don't have the data source for those environment variables. I'm not sure why that would be the case, unless the override file isn't being applied for some reason. You can check by running docker-compose -f docker-compose.yml -f docker-compose.override.yml
and see if that fixes your issue. It shouldn't make a difference, but then again this issue has been pretty baffling to me.
from twlight.
As mentioned by you docker-compose -f docker-compose.yml -f docker-compose.override.yml
didn't made any difference, Can you give me the contents of /run/secrets
, I can manually place them at the required destination and give it a try. Thanks for helping me so far with the issue :)
from twlight.
It's literally just the contents of the secrets
directory in the project
from twlight.
Closing out due to lack of activity.
from twlight.
Related Issues (18)
- app_url is called in places where it isn't defined. HOT 1
- cleanup include_invalid model manager HOT 2
- djmail should use a pool of hosts if posible HOT 1
- pickup filesystem changes without restarting gunicorn HOT 2
- docker-compose up command HOT 3
- Migrating command fix HOT 1
- the Brazilian Portuguese language is not configured correctly HOT 6
- Test class added in another class in application/tests HOT 6
- New to this Project HOT 2
- New member! HOT 1
- Editing Readme file HOT 1
- with environment setup HOT 9
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- Suggestion for adding commands in README HOT 6
- docker-compose up throws error : "invalid mount config for type "bind": bind source path does not exist" HOT 1
- Allow login everywhere HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twlight.