In Juniper.2 After succesfull login (in log) returns to main page and exits

I’m looking for help. I have installed 3 instances (of juniper.2) and I’m getting the same wrong behavior.

When I installed the second instance all was working well (I created a course), but when I assigned a domain name and ssl, I couldn’t enter anymore (in the lms I can login and the lms/edx.log says Login success - user.id: 10) but it returns to the main page as if I’m not logged in.

In the last instance I assigned first the domain name at the DNS and in the config.yml I put the site name in both (LMS and CMS) but after the assignment of the SSL, It doesn’t allow me to sign in (the test of SSL is successful).

This are the logs just before and after I try to sign in, but I can’t find an error or hint about what is wrong. (sudo tail -f /edx/var/log/*/*log)

Any help is appreciated

==> /edx/var/log/nginx/access.log <==
- - 189.232.12.133 - - - [27/Aug/2020:03:25:48 +0000]  "GET /login?next=%2F HTTP/1.1" 200 11104 0.953 "https://sitename.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36"

==> /edx/var/log/supervisor/lms-stderr.log <==
[2020-08-27 03:25:49 +0000] [29103] [INFO] POST /user_api/v1/account/login_session/

==> /edx/var/log/tracking/tracking.log <==
{"time": "2020-08-27T03:25:49.904203+00:00", "event_source": "server", "host": "sitename.com", "ip": "189.232.12.133", "context": {"path": "/user_api/v1/account/login_session/", "org_id": "", "user_id": null, "course_id": ""}, "referer": "https://sitename.com/login?next=%2F", "event_type": "/user_api/v1/account/login_session/", "event": "{\"GET\": {}, \"POST\": {\"password\": \"********\", \"email\": [\"honor@example.com\"]}}", "username": "", "accept_language": "es-ES,es;q=0.9", "agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36", "page": null}

==> /edx/var/log/supervisor/xqueue-stderr.log <==
2020-08-26 23:25:50 [29145] [INFO] GET /xqueue/get_queuelen/

==> /edx/var/log/xqueue/edx.log <==
Aug 27 03:25:50 ip-172-31-42-228 [service_variant=xqueue][gunicorn.error][env:sandbox] INFO [ip-172-31-42-228  29145] [glogging.py:184] - GET /xqueue/get_queuelen/

==> /edx/var/log/nginx/access.log <==
- - 127.0.0.1 - o4KvPc2BLfiuWWI7ylvAowGiza5fOVLMdnH - [27/Aug/2020:03:25:50 +0000]  "GET /xqueue/get_queuelen/?queue_name=certificates HTTP/1.1" 200 61 0.007 "-" "python-requests/2.22.0"

==> /edx/var/log/supervisor/lms-stderr.log <==
2020-08-27 03:25:50,617 INFO 29103 [audit] [user 10] models.py:2450 - Login success - user.id: 10

==> /edx/var/log/lms/edx.log <==
Aug 27 03:25:50 ip-172-31-42-228 [service_variant=lms][audit][env:sandbox] INFO [ip-172-31-42-228  29103] [user 10] [models.py:2450] - Login success - user.id: 10

==> /edx/var/log/nginx/access.log <==
- - 189.232.12.133 - - - [27/Aug/2020:03:25:51 +0000]  "POST /user_api/v1/account/login_session/ HTTP/1.1" 200 72 1.172 "https://sitename.com/login?next=%2F" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36"

==> /edx/var/log/supervisor/lms-stderr.log <==
[2020-08-27 03:25:51 +0000] [29103] [INFO] GET /

==> /edx/var/log/tracking/tracking.log <==
{"time": "2020-08-27T03:25:51.148733+00:00", "event_source": "server", "host": "sitename.com", "ip": "189.232.12.133", "context": {"path": "/", "org_id": "", "user_id": null, "course_id": ""}, "referer": "https://sitename.com/login?next=%2F", "event_type": "/", "event": "{\"GET\": {}, \"POST\": {}}", "username": "", "accept_language": "es-ES,es;q=0.9", "agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36", "page": null}

==> /edx/var/log/nginx/access.log <==
- - 189.232.12.133 - - - [27/Aug/2020:03:25:51 +0000]  "GET / HTTP/1.1" 200 3700 0.063 "https://sitename.com/login?next=%2F" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36"

==> /edx/var/log/supervisor/xqueue-stderr.log <==
2020-08-26 23:25:55 [29145] [INFO] GET /xqueue/get_queuelen/

==> /edx/var/log/xqueue/edx.log <==
Aug 27 03:25:55 ip-172-31-42-228 [service_variant=xqueue][gunicorn.error][env:sandbox] INFO [ip-172-31-42-228  29145] [glogging.py:184] - GET /xqueue/get_queuelen/

Update: In chrome it’s not letting me sign in, but in firefox yes.

Daniel Laboreo shared this with me on Slack a few days ago, and this fixed my problem with logging in with Chrome and SSL. I was getting CSRF errors, so not sure if the same thing.

Daniel Clemente Laboreo on Slack:

The cookie issues with Chrome may be because Chrome recently changed the SameSite cookie behaviour, https://digiday.com/media/what-is-chrome-samesite/ . You can test temporarily disabling chrome://flags/#cookies-without-same-site-must-be-secure (then it should work), and a solution would be to enable SESSION_COOKIE_SECURE and EDXAPP_CSRF_COOKIE_SECURE

1 Like

Thanks a lot, I’ll try it right now.

Tom Misilo Thank you!!! That was the solution.

1 Like