Giter VIP home page Giter VIP logo

Comments (22)

jsnshrmn avatar jsnshrmn commented on September 25, 2024

@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.

sanyam-git avatar sanyam-git commented on September 25, 2024

@jsnshrmn were you able to reproduce the issue, any update ?

from twlight.

jsnshrmn avatar jsnshrmn commented on September 25, 2024

@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.

jsnshrmn avatar jsnshrmn commented on September 25, 2024

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.

sanyam-git avatar sanyam-git commented on September 25, 2024
  • performed git checkout I am getting this Your 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.

Screenshot from 2020-02-02 00-26-10

Hope this can help.

from twlight.

sanyam-git avatar sanyam-git commented on September 25, 2024

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.

jsnshrmn avatar jsnshrmn commented on September 25, 2024

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.

jsnshrmn avatar jsnshrmn commented on September 25, 2024

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.

sanyam-git avatar sanyam-git commented on September 25, 2024

Thanks @jsnshrmn for helping with issue. But no succees so far, even with the VM I am getting the same issue.

from twlight.

jsnshrmn avatar jsnshrmn commented on September 25, 2024

can you post the output of printenv from the twlight container? e.g. something like docker-compose exec twlight printenv?

from twlight.

sanyam-git avatar sanyam-git commented on September 25, 2024

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.

QEDK avatar QEDK commented on September 25, 2024

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.

jsnshrmn avatar jsnshrmn commented on September 25, 2024

@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.

sanyam-git avatar sanyam-git commented on September 25, 2024

@QEDK tried with root also, no change same issue persists.

from twlight.

sanyam-git avatar sanyam-git commented on September 25, 2024

@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.

jsnshrmn avatar jsnshrmn commented on September 25, 2024

@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.

jsnshrmn avatar jsnshrmn commented on September 25, 2024

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.

sanyam-git avatar sanyam-git commented on September 25, 2024

@jsnshrmn

  • 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.

jsnshrmn avatar jsnshrmn commented on September 25, 2024

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.

sanyam-git avatar sanyam-git commented on September 25, 2024

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.

jsnshrmn avatar jsnshrmn commented on September 25, 2024

It's literally just the contents of the secrets directory in the project

from twlight.

jsnshrmn avatar jsnshrmn commented on September 25, 2024

Closing out due to lack of activity.

from twlight.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.