Cannot log in to Plesk: Session Expired

Created:

2016-11-16 12:47:20 UTC

Modified:

2017-04-24 11:15:03 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Cannot log in to Plesk: Session Expired

Applicable to:

  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

It is not possible to log in to Plesk. A "Session Expired" message appears.

  1. There is a blank screen on the Plesk login page.

  2. The following error message is shown in /usr/local/psa/admin/logs/panel.log :

    ERR (3)  [panel]: Session expired:
    0: Session.php:410
    Session->init()
    1: cmd_loginup.php:135
    createSessionCommon(integer '1', string 'admin', boolean true, string '1.2.3.4', NULL null, NULL null)
    2: cmd_loginup.php:278
    createSessionAdmin(string 'admin', string '******', boolean false, NULL null, boolean true)
    3: cmd_loginup.php:68
    createSession(string 'admin', string '******', boolean false, boolean false)
    4: login_up.php3:45
    Session_Exception: Session expired
    file: /opt/psa/admin/plib/Session.php
    line: 410
    code: 0
  3. Operating system time is::

    # /usr/local/psa/bin/sw-engine-pleskrun  -r 'date_default_timezone_set(@date_default_timezone_get()); echo(date(DATE_RFC2822)."\

    ");' 16:00

  4. MySQL server time is:

    # plesk db "select NOW()"
    17:00

Cause

The MySQL server and the operating system (OS) have different timezone settings.

Resolution

  1. Ensure that the ' default-time-zone ' parameter is not defined in /etc/my.cnf ( /etc/mysql/my.cnf on Debian/Ubuntu). If it is defined, update, comment out, or remove this directive.

    The 'default-time-zone' option sets the global 'time_zone' system variable. If this option is not given, the default time zone is the same as the system time zone (defined by the value of the 'system_time_zone' system variable.)
  2. Restart the MySQL server (if my.cnf was changed):

    # /etc/init.d/mysqld restart 
    Stopping mysqld: [ OK ]
    Starting mysqld: [ OK ]
  3. Restart the PSA service if the "Session Expired" message is still present:

    # /etc/init.d/psa restart
  4. If the above is not the case and MySQL actually reports correct time and sw-engine-pleskrun does not, ensure the system has correct timezone:

    # /usr/local/psa/bin/sw-engine-pleskrun  -r 'date_default_timezone_set(@date_default_timezone_get()); echo(date(DATE_RFC2822)."\

    ");' Fri, 02 Jan 2015 09:32:33 +0600

    # date
    Fri Jan 2 10:32:35 NOVT 2015

    # plesk db "select NOW()"
    +---------------------+
    | NOW() |
    +---------------------+
    | 2015-01-02 10:32:44 |
    +---------------------+
  5. Replace /etc/localtime with correct timezone. Usually timezone files can be located in /usr/share/zoneinfo/ , here is example to change timezone to Moscow time:

    # unlink /etc/localtime
    # ln -s /usr/share/zoneinfo/Europe/Moscow /etc/localtime
  6. Make sure that system, Plesk and MySQL time is the same by performing Step 4 .

  7. Restart MySQL server:

    # service mysqld restart
  8. Restart psa service:

    # service psa restart
Have more questions? Submit a request
Please sign in to leave a comment.