Hi Community,
I am trying to enable ecommerce for my site(not devstack) and using ironwood version. Made necessary changes in following files as mentioned in article of Mr. Lawrence (Open edX Ecommerce - Blog) :-
- app/edxapp/lms.env.json
- app/nginx/sites-available/lms
- etc/lms.yml
- etc/ecommerce.yml
- app/nginx/sites-available/ecommerce
- OAuth2 table - /admin/oauth2/client/
Still finding error in logs as mentioned below. Can someone please guide what I am missing?
/edx/var/log/ecommerce/edx.log
Sep 28 10:27:10 ip-172-31-20-199 [service_variant=ecommerce][django.request] ERROR [ip-172-31-20-199 2680] [/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/exception.py:135] - Internal Server Error: /complete/edx-oidc/ Traceback (most recent call last): File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response response = self._get_response(request) File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response response = self.process_exception_by_middleware(e, request) File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/utils/decorators.py", line 185, in inner return func(*args, **kwargs) File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func response = view_func(request, *args, **kwargs) File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view return view_func(*args, **kwargs) File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_django/utils.py", line 50, in wrapper return func(request, backend, *args, **kwargs) File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_django/views.py", line 32, in complete redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs) File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/actions.py", line 41, in do_complete user = backend.complete(user=user, *args, **kwargs) File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/backends/base.py", line 40, in complete return self.auth_complete(*args, **kwargs) File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/auth_backends/backends.py", line 163, in auth_complete user = super(EdXOpenIdConnect, self).auth_complete(*args, **kwargs) File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/utils.py", line 255, in wrapper raise AuthCanceled(args[0], response=err.response) AuthCanceled: Authentication process canceled
/edx/var/log/tracking/tracking.log
{"username": "admin", "event_type": "/oauth2/authorize/", "ip": "72.255.57.63", "agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", "host": "openedx.techhivesolutions.com", "referer": "https://openedx.techhivesolutions.com:18130/", "accept_language": "en-US,en;q=0.9", "event": "{\"POST\": {}, \"GET\": {\"scope\": [\"openid profile email permissions\"], \"state\": [\"pyHG3JMSNIvwaKFHezozRpDXL3Krp79G\"], \"redirect_uri\": [\"https://openedx.techhivesolutions.com:18130/complete/edx-oidc/\"], \"response_type\": [\"code\"], \"client_id\": [\"ecommerce-key\"]}}", "event_source": "server", "context": {"user_id": 12, "org_id": "", "course_id": "", "path": "/oauth2/authorize/"}, "time": "2020-09-28T07:58:47.764538+00:00", "page": null} {"username": "admin", "event_type": "/oauth2/authorize/confirm", "ip": "72.255.57.63", "agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", "host": "openedx.techhivesolutions.com", "referer": "https://openedx.techhivesolutions.com:18130/", "accept_language": "en-US,en;q=0.9", "event": "{\"POST\": {}, \"GET\": {}}", "event_source": "server", "context": {"user_id": 12, "org_id": "", "course_id": "", "path": "/oauth2/authorize/confirm"}, "time": "2020-09-28T07:58:47.908380+00:00", "page": null} {"username": "admin", "event_type": "/oauth2/redirect", "ip": "72.255.57.63", "agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", "host": "openedx.techhivesolutions.com", "referer": "https://openedx.techhivesolutions.com:18130/", "accept_language": "en-US,en;q=0.9", "event": "{\"POST\": {}, \"GET\": {}}", "event_source": "server", "context": {"user_id": 12, "org_id": "", "course_id": "", "path": "/oauth2/redirect"}, "time": "2020-09-28T07:58:48.232899+00:00", "page": null} {"username": "", "event_type": "/oauth2/access_token/", "ip": "127.0.0.1", "agent": "python-requests/2.21.0", "host": "127.0.0.1:8000", "referer": "", "accept_language": "", "event": "{\"POST\": {\"grant_type\": [\"authorization_code\"], \"code\": [\"e204577d3c4645ede5ad3f68d0a35365b5cd974d\"], \"client_id\": [\"ecommerce-key\"], \"redirect_uri\": [\"https://openedx.techhivesolutions.com:18130/complete/edx-oidc/\"], \"claims\": [\"{\\\"id_token\\\": {}}\"], \"client_secret\": [\"ecommerce-secret\"]}, \"GET\": {}}", "event_source": "server", "context": {"user_id": null, "org_id": "", "course_id": "", "path": "/oauth2/access_token/"}, "time": "2020-09-28T07:58:48.377043+00:00", "page": null}
Somehow tracking logs are giving clue for “event_type”: “/oauth2/access_token/” but not sure why its “host” is “127.0.0.1:8000”