Hi
After installing tutor using a precompile binary, I have enabled ecommerce plugin using tutor plugins enable discovery ecommerce.
According to the tutor plugins list both plugins are enabled but when I try to go to http://ecommerce.local.overhang.io/ it gets redirected to the dashboard page.
the output of the tutor local logs -f --tail=10 command is:
Yes. According to https://pypi.org/project/tutor-ecommerce/ I ran tutor local quickstart after enabling the plugins.
Related docker containers are also running. Here is the output of the docker ps command:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
23b7378c0963 overhangio/openedx-ecommerce-worker:10.1.6 "/bin/sh -c 'celery …" 18 hours ago Up 4 hours tutor_local_ecommerce-worker_1
17e70ec7cfc9 overhangio/openedx-ecommerce:10.1.6 "/bin/sh -c 'gunicor…" 18 hours ago Up 4 hours 8000/tcp tutor_local_ecommerce_1
a4318065de88 nginx:1.13 "nginx -g 'daemon of…" 18 hours ago Up 4 hours 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp tutor_local_nginx_1
bde5edd1f47d overhangio/openedx:10.4.0 "docker-entrypoint.s…" 18 hours ago Up 4 hours 8000/tcp tutor_local_cms-worker_1
067a7a61dcec overhangio/openedx-discovery:10.1.7 "/bin/sh -c 'gunicor…" 18 hours ago Up 4 hours 8000/tcp tutor_local_discovery_1
e96a91da10d5 overhangio/openedx:10.4.0 "docker-entrypoint.s…" 18 hours ago Up 4 hours 8000/tcp tutor_local_cms_1
2fec796d514c overhangio/openedx:10.4.0 "docker-entrypoint.s…" 18 hours ago Up 4 hours 8000/tcp tutor_local_lms-worker_1
f8c5d90ac998 overhangio/openedx:10.4.0 "docker-entrypoint.s…" 18 hours ago Up 4 hours 8000/tcp tutor_local_lms_1
e1f47d01eaa6 overhangio/openedx-forum:10.4.0 "docker-entrypoint.s…" 18 hours ago Up 4 hours 4567/tcp tutor_local_forum_1
ac36b08656e0 rabbitmq:3.6.10-management-alpine "docker-entrypoint.s…" 18 hours ago Up 4 hours 4369/tcp, 5671-5672/tcp, 15671-15672/tcp, 25672/tcp tutor_local_rabbitmq_1
c92ecf794b3d elasticsearch:1.5.2 "/docker-entrypoint.…" 18 hours ago Up 4 hours 9200/tcp, 9300/tcp tutor_local_elasticsearch_1
ac41804e5915 namshi/smtp:latest "/bin/entrypoint.sh …" 18 hours ago Up 4 hours 25/tcp tutor_local_smtp_1
7d5f8f010d45 mongo:3.6.18 "docker-entrypoint.s…" 18 hours ago Up 4 hours 27017/tcp tutor_local_mongodb_1
2fe63e820d82 mysql:5.6.49 "docker-entrypoint.s…" 18 hours ago Up 4 hours 3306/tcp tutor_local_mysql_1
a22df378aee1 memcached:1.4.38 "docker-entrypoint.s…" 18 hours ago Up 4 hours 11211/tcp tutor_local_memcached_1
OK, good news is that I managed to reproduce the issue on a new installation. I guess I didn’t detect it earlier because I always create a super user in ecommerce directly. I’ll be able to investigate this.
I finally remembered something: this is not a bug, it’s actually a feature Users who are staff/superusers on the LMS do not necessarily have the same privileges in Ecommerce. You need to explicitly grant superuser/staff privileges with the createsuperuser command, as indicated in the README.
To grant staff+superuser access to an existing user, run:
tutor local run ecommerce ./manage.py shell -c "from django.contrib.auth import get_user_model; get_user_model().objects.filter(email='USER@EMAIL.COM').update(is_staff=True, is_superuser=True)"
After running the above command, I can’t access the LMS anymore. The nginx container is stuck in restarting state: a4318065de88 nginx:1.13 "nginx -g 'daemon of…" 2 days ago Restarting (1) 54 seconds ago tutor_local_nginx_1
Ok my problem with nginx is solved by restarting the platform (thank you for the hint), but I still have the same problem with the url even after granting staff+superuser access to the existing user :
When I try to navigate to http://ecommerce.local.overhang.io/, when logged in I get redirected to Open edX dashboard and I get redirected to sign in page when the user is not logged in.