I keep getting logged out of YouTrack



“Remember me” option is disabled.

Check the “Remember me” box when you log in to YouTrack next time. This will allow you to stay logged in until the “Remember me” cookie is expired.

The duration of the “Remember me” cookie is too short.

Open Administration > Access Management > Auth Modules > Common settings > check and adjust the “Remember Me duration” parameter.

You have a browser plugin or an adblocker that clears Hub authentication cookies.

Disable those plugins and adblockers that might clear the Hub authentication cookies.

Some adblockers allow whitelisting sites, so as an option, you can simply add the URL of the Hub to the whitelist there.

Your YouTrack and your external Hub are outdated.

Check if your license allows updates and upgrade your YouTrack and Hub installation.

We deliver fixes related to the logouts issue from time to time, so an upgrade might help in your particular case.

YouTrack URL in your browser doesn’t match its Base URL.

Open Administration > Server Settings > Global Settings > the Server Configuration tab > check the Base URL.

Make sure that the Base URL matches the URL that you’re using. If these URLs are different, it can break the exchange of authentication tokens in the background which usually leads to frequent logouts.

You have an external Hub installed on a domain that differs from your YouTrack domain.

Your browser has tracking prevention enabled, and it blocks the “Remember me” cookie from the external Hub.

Add your external Hub to the whitelist in your browser or make sure that tracking prevention (TP) is disabled in your browser settings.

How to disable TP in your browser:

Safari: open Preferences > Privacy > Website tracking > uncheck the box “Prevent cross-site tracking”.

Chrome: open Preferences > Advanced > Privacy and security > Cookies and other site data > disable the option “Send a “Do Not Track” request with your browsing traffic”.

Firefox: open Preferences > Privacy & Security > “Send websites a “Do Not Track” signal that you don’t want to be tracked” > check the option “Only when Firefox is set to block known trackers”.

If you’re using another browser, look for a similar setting responsible for TP.

Note: TP only causes logouts when YouTrack works with an external Hub installation, and these two are installed on two different domains. Then TP might block the “Remember me” cookie from Hub as a cookie from another domain, causing frequent logouts.

The reverse proxy server interferes with the process that keeps you logged in.

If your YouTrack is configured to run behind a reverse proxy server, don't set the X-Frame-Options header on the reverse proxy level. YouTrack manages the header by itself to provide a reasonable level of data protection and to keep the application operational at the same time.

The built-in Hub service uses a hidden inline frame to refresh authentication tokens. If you have set the value for the X-Frame-Options header to DENY for your reverse proxy server, users are logged out when their tokens expire.

For more information, see X-Frame-Options.

You have an external Hub installation which is using plain HTTP.

Make sure that all traffic to your external Hub is secured with TLS. Read more details in our documentation.

The time on your machine is different compared to NTP (Network Time Protocol).

If the time on your machine is different compared to NTP, it breaks the normal process of updating the authentication token.

Most operating systems have built-in tools to keep system time automatically synchronized with the reference clocks (`timed` system daemon in MacOS (“Settings” - “Date and Time” in the UI), `ntpd` or `chrony` daemon in UNIX-like operating systems, Windows Time service, etc). 

Check the built-in settings of your OS via UI or via the command line.


An example of how to troubleshoot this via the command line on macOS Mojave (source):

    1. Run `sudo sntp pool.ntp.org` in your command line to check the local clock on your machine.
    2. Example output: `2020-06-22 16:35:44.725010 (-0300) +0.009259 +/- 0.006411 pool.ntp.org s3 no-leap`. ‘+0.009259’ indicates that the local clock is 0.009259 seconds behind the correct time (so 0.009259 seconds must be added to the local clock to make it correct).
    3. Run `sudo sntp -sS pool.ntp.org` to check and fix the local clock using the pool.ntp.org server.
    4. If you see a message “Cannot open KoD db file" in the response, create this file: `sudo touch /var/db/ntp-kod`
    5. Change ownership of this file to root: `sudo chown root:wheel /var/db/ntp-kod`
    6. Try the command from p.3 again and check that the error message is gone.
2 out of 5 found this helpful

Please sign in to leave a comment.

Have more questions?

Submit a request