Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Analytics dashboard not opened after Insights login #850

Open
testaccountsnt opened this issue Apr 1, 2019 · 3 comments
Open

Analytics dashboard not opened after Insights login #850

testaccountsnt opened this issue Apr 1, 2019 · 3 comments

Comments

@testaccountsnt
Copy link

testaccountsnt commented Apr 1, 2019

I have installed complete edx devstack setup. I can open studio, LMS and eCommerce successfully.
I have also installed analytics pipeline. Services running successfully

  • edxops/analytics_pipeline:latest
  • edxops/analytics_pipeline_spark_worker:latest
  • edxops/analytics_pipeline_hadoop_nodemanager:latest
  • edxops/analytics_pipeline_hadoop_resourcemanager:latest
  • edxops/analytics_pipeline_hadoop_datanode:latest
  • edxops/analytics_pipeline_spark_master:latest
  • edxops/analytics_pipeline_hadoop_namenode:latest

I have cloned analytics dashboard, executed npm start and manage.py runserver - Django successfully. Django is running fine as I can open Insights. When I click on login, it takes me on
http://127.0.0.1:18000/login?next=/oauth2/authorize/
When I log in using edx credentials ([email protected] / edx - what I use to login to the Studio and LMS) I get following message after login.

unauthorized_client An unauthorized client tried to access your resources.

The url of this page is "http://127.0.0.1:18000/oauth2/authorize/confirm"

I have generated client ID for analytics in django lms admin and mentioned this in insights.yml

Please help to fix this issue as I am not able to use Analytics Dashboard.

@testaccountsnt testaccountsnt changed the title Analytics dashboard not opened after installation Analytics dashboard not opened after Insights login Apr 2, 2019
@Shadowmoise
Copy link

Hello I have the same issue with the same installation. Did you manage to solve it by any chance. I'm not sure what configuration I'm missing here.

Best,

@testaccountsnt
Copy link
Author

No, I could not solve it. Insights login is not working. If you solve this, please update here.

@lngvietthang
Copy link

Hi @testaccountsnt @Shadowmoise,

I had the same problem like you. After two weeks investigation, I find that note from author:

Note: When using OAuth2, the dashboard and provider must be accessed via different host names (e.g. dashboard.example.org and provider.example.org) in order to avoid issues with session cookies being overwritten. (This was true with the use of the removed Open ID Connect, but is untested since.)

I used the same server ip as host name for both Analytic Dashboard and OpenEdx LMS, so the session_id in cookie from Analytic Dashboard sent to OAuth2 of LMS is overridden by LMS. That change the behaviour of OAuth2.
I fixed that by move my Analytic Dashboard to another server and everything work correctly.
Another solution to solve is try map two hostname with different ports to Analytic Dashboard and LMS. My colleague tested this way and it works too. For example, you can map Analytic Dashboard to insight.example.com:8110 and lms.example.com:18000 for LMS.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants