New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
django.db.utils.OperationalError: (1045, "Access denied for user 'xqueue'@'172.18.0.13' #34
Comments
Yes, the database associated with the xqueue service needs to be created. Please run |
Concerning the 400 error, what is the exact domain name you used to configure the LMS? |
i ran the two commands you suggested, but I'm still getting the same error. i just realized that when i re-ran the But when I go to localhost:8000 and localhost:8001, it doesn't return the site. |
Did you stop all services prior to running both commands? (sorry, I should have mentioned that earlier) To test the images locally, specify "localhost" and "studio.localhost" during configuration. I realised this is a common mistake, so I modified the message displayed on configuration. |
No, I don't believe I had stopped all the services prior to running those commands. Will do so now. If the default for testing locally is |
The docs are still referring to localhost for local development: https://github.com/regisb/openedx-docker#for-developers |
During configuration, the defaults are "www.myopenedx.com" and "studio.myopenedx.com". I wanted to set defaults for a production environment, which explains why I didn't set "localhost" or "localhost:8000" as defaults. Let's see what's going on here (and then I'll add more information to the README because you're not the first one with this problem): when the platform is running and we try to access it on port 80, we reach the Nginx server, which then forwards the request to the gunicorn process. The production settings of the gunicorn process are defined to allow access only to the configured domain name, through the ALLOWED_HOSTS django setting: https://github.com/regisb/openedx-docker/blob/master/config/openedx/universal/lms/production.py#L21 This is an issue that confuses many people, and I'm not 100% sure how we can improve the situation. A good start would be to allow access to "localhost:8000" and "localhost:8001", even in production. It's not a big deal, in terms of security, because ports 8000 and 8001 are not open from the docker-compose configuration. But I wonder if this is going to generate other issues, for instance with static assets. |
I just re-ran the commands setting these environment variables. Before I was using the default settings file, which is for production, not for development.
Now the LMS is responding at |
This is not a security issue because ports 8000-8001 are not open to the world; it should also drastically simplify the life of many people. See for instance issues #30 and #34. Also, we allow access to nginx on hostnames "localhost" and "studio.localhost" for lms and cms, respectively. Again, this will remove much of the confusion for many users.
Nate, I just made changes to the production settings (in nginx and django) which should allow anyone to access "localhost" and "studio.localhost" both in development and producton mode. I also fixed the documentation. The xqueue error message that you are seeing means that the xqueue MySQL database was not created, or not with the right credentials. I suspect that multiple mysql containers have been run concurrently. And here we reach the bottom of my ignorance about docker 😅 For some reason, when running |
(I just updated the |
Yeah, the xqueue docker container was not stopped for some reason, which is probably why i was getting that error before:
|
Should I run the |
I pulled down the images from your Docker Hub, and re-ran all the commands, and now getting this error:
|
What is the output of the (and building or pulling should just be a matter of personal preference: in theory, there shouldn't be any difference.) |
For some reason, I can't stop the xqueue_consumer container.
|
I just removed it, so now it's not running anymore:
|
Here's the output of the
|
Hmmm and you're still getting that xqueue error? I need to think about this... |
Any more thoughts? Should I just delete all the containers and start over
with rebuilding them from scratch?
…On Sat, Jun 9, 2018 at 10:03 AM, Régis B. ***@***.***> wrote:
Hmmm and you're still getting that xqueue error? I need to think about
this...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#34 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHQyH5BL9aQCYc60GENHxwS9s4sytQjks5t6__pgaJpZM4UgqW7>
.
--
Website: http://www.appsembler.com
Blog: http://www.appsembler.com/blog
Twitter: http://twitter.com/natea
LinkedIn: http://linkedin.com/in/natea
Phone: +1 (617) 702-4331
|
Let's try to diagnose this better. The error you are getting is still the following, right?
Let's try the following steps:
Which steps failed? |
@regisb i'm wondering if this had something to do with it... Notice the two
so I stopped and removed that container:
|
I switched back to universal.production settings rather than my development settings to rule out that as the culprit. And sure enough once I did that, then the LMS and CMS came up fine without any problems. So I need to go debug my local environment to find out why it's not working. I did run the commands you suggested, and everything worked as expected:
|
The Can you post your development settings? |
This one seems to have reared its ugly head again.
I got a Does anything seem strange about the containers that are running:
|
You have two different containers that run xqueue: 83518f0378a2 and 73ab6d877376. The problem is that you should have only one. From my understanding, the container with the mysql error is not inside the open edx "cluster" created from all the containers (lms, cms, mysql, etc.), so it does not have access to mysql. Try to kill the xqueue containers and restart it. By the way, do you need the xqueue container? I'm thinking of removing it from the project. |
Hi Regis,
I did a
git pull
,configure
andmake build
and now when I runmake up
i'm seeing this permissions error with the xqueue service.And when I go to www.myopenedx.com and studio.myopenedx.com, I'm seeing "400 Bad Request".
The text was updated successfully, but these errors were encountered: