Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Error logging out with redis #1547

Closed
nachogarcia opened this issue Dec 11, 2019 · 9 comments
Closed

Error logging out with redis #1547

nachogarcia opened this issue Dec 11, 2019 · 9 comments

Comments

@nachogarcia
Copy link

Bug Report

Steps to Reproduce

  1. Login into directus
  2. Logout out of direcut
  3. Can't reach API (even though API calls return a 200 status, and I can consume everything from my app without issues) and you're not able to login ever again
  4. Flush redis cache
  5. You can login again

Expected Behavior

Be able to logout and login freely

Actual Behavior

Can't login after logout

Other Context & Screenshots

Technical Details

  • Device: Chrome
  • OS: Windows
  • Database: MySQL
  • Directus: Docker v8
@benhaynes benhaynes transferred this issue from directus/directus Dec 11, 2019
@benhaynes benhaynes added the bug Something isn't working label Dec 11, 2019
@nachogarcia
Copy link
Author

nachogarcia commented Dec 12, 2019

Looks like it's not only logging out, from time to time I need to flush redis cache so that users can keep logging in.
It's the only big issue that I've came with v8 so far.
My exact config is here https://github.com/directus/docker/pull/84

@nachogarcia
Copy link
Author

I didn't share any screenshot because it does not provide any information - no console errors and the network responds with a 200
image

@nachogarcia
Copy link
Author

nachogarcia commented Dec 12, 2019

After checking the difference in responses that get done to _/, i can see this differences
image
The one in the right is the succesful one - in that one later is made a second request to _/

@nachogarcia
Copy link
Author

The logs are the same - completely clear

172.20.1.1 - - [12/Dec/2019:08:35:33 +0000] "GET /server/ping HTTP/1.1" 200 232 "https://api.private/admin/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
172.20.1.1 - - [12/Dec/2019:08:35:34 +0000] "GET /server/ping HTTP/1.1" 200 399 "https://api.private/admin/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
172.20.1.1 - - [12/Dec/2019:08:35:36 +0000] "GET /server/ping HTTP/1.1" 200 396 "https://api.private/admin/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
172.20.1.1 - - [12/Dec/2019:08:35:37 +0000] "GET /server/ping HTTP/1.1" 200 402 "https://api.private/admin/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
::1 - - [12/Dec/2019:08:35:37 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.38 (Debian) PHP/7.3.12 (internal dummy connection)"
172.20.1.1 - - [12/Dec/2019:08:35:39 +0000] "GET /server/ping HTTP/1.1" 200 233 "https://api.private/admin/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Safari/537.36"
172.20.1.1 - - [12/Dec/2019:08:35:40 +0000] "GET /server/ping HTTP/1.1" 200 397 "https://api.private/admin/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
172.20.1.1 - - [12/Dec/2019:08:35:42 +0000] "POST /_/auth/authenticate HTTP/1.1" 200 777 "https://api.private/admin/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Safari/537.36"
172.20.1.1 - - [12/Dec/2019:08:35:42 +0000] "GET /_/ HTTP/1.1" 200 849 "https://api.private/admin/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Safari/537.36"
172.20.1.1 - - [12/Dec/2019:08:35:43 +0000] "GET /server/ping HTTP/1.1" 200 233 "https://api.private/admin/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
172.20.1.1 - - [12/Dec/2019:08:35:43 +0000] "GET /server/ping HTTP/1.1" 200 232 "https://api.private/admin/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
172.20.1.1 - - [12/Dec/2019:08:35:45 +0000] "GET /server/ping HTTP/1.1" 200 398 "https://api.private/admin/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"

@rijkvanzanten
Copy link
Member

Lets combine this into #1476 🙂

@nachogarcia
Copy link
Author

@rijkvanzanten any recommendation to avoid this issue while is fixed? I'm flushing the cache manually but can't do that for ever :P and can't disable it since our load times will skyrocket.

@rijkvanzanten
Copy link
Member

rijkvanzanten commented Dec 16, 2019

You might be able to create a hook that empties the cache on update of directus_user_sessions 🤔

@binal-7span
Copy link
Contributor

You might be able to create a hook that empties the cache on update of directus_user_sessions

That can be a solution for this issue. But at the end, we should combine it with #1476.

Thoughts? @rijkvanzanten

@rijkvanzanten
Copy link
Member

Yeah, lets close this in favor of the bigger conversation happening in #1476

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

4 participants