Error: "Session with id ################################ has timed out because of inactivity" when attempting to log in to Cloud Director
search cancel

Error: "Session with id ################################ has timed out because of inactivity" when attempting to log in to Cloud Director

book

Article ID: 382233

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • Attempting to log into the Cloud Director UI Provider or Tenant portals fails.
  • The Cloud Director UI shows an error of the form:

Failed to Start

An error occurred during the initialization. Accessing the application through an unsupported public URL or poor connectivity might cause this error.

  • The browser developer console shows a 401 Unauthorized error for a request to GET https://<vcd_url>/api/session.
  • The /opt/vmware/vcloud-director/logs/vcloud-container-debug.log files on the Cells show an error for the same request to GET https://<vcd_url>/api/session of the form:

| DEBUG    | pool-jetty-40             | SessionManagerImpl             | Session with id ################################ has timed out because of inactivity. | requestId=########-####-####-####-############,request=GET https://<vcd_url>/api/session,requestTime=1731947542974,remoteAddress=#.#.#.#:#####,userAgent=Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:132.0) Gecko/20100...,accept=application/*+xml;version 37.2
| SECURITY | pool-jetty-40             | SecurityServiceImpl            | Session is invalid because it has expired | requestId=########-####-####-####-############,request=GET https://<vcd_url>/api/session,requestTime=1731947542974,remoteAddress=#.#.#.#:#####,userAgent=Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:132.0) Gecko/20100...,accept=application/*+xml;version 37.2

  • The Cloud Director Cells show different time zones or a significant time skew when running the timedatectl command.
  • Users are automatically logged out of Cloud Director immediately after logging in.
  • Issue occurs after an additional Standby or Application Cell has been added to Cloud Director and does not occur if the additional Cell is shut down.

Environment

  • VMware Cloud Director 10.6
  • VMware Cloud Director 10.5

Cause

This issue occurs if the Cloud Director Cells are configured with different time zones or there is a significant time skew such that the difference is greater than the configured Idle Session Timeout.

A Cell may mark a session as idle and timed out due to such a time difference causing the login to fail.

Resolution

To resolve the issue ensure that all Cloud Director Cells are configured with the same time zone and are in time sync.

To change the time zone of a Cloud Director Appliance Cell, follow these steps:

  1. Before making any changes, backup the Cloud Director instance as per the documentation, Backup and Restore of Your VMware Cloud Director Appliance.
  2. SSH as root to the first Cloud Director Cell and list the available time zones by browsing the /usr/share/zoneinfo/ directory and sub-directories:

    ls /usr/share/zoneinfo/
    ls /usr/share/zoneinfo/Europe/

    Example:
    Europe/Dublin

  3. Set the new time zone by running the following command. Substitute a desired time zone that you found when browsing the directories:

    Example:
    /opt/vmware/share/vami/vami_set_timezone_cmd Europe/Dublin

  4. Repeat the steps on all Cells and apply the same time zone.
  5. Restart the Cloud Director Appliance Cells for the change to take effect.
    WARNING: The Cloud Director Portal will be unavailable while the Cloud Director Cells are restarting.
  6. The timedatectl command can be used to verify the current time zone settings.

To chance the NTP settings of a Cloud Director Appliance Cell, follow the documentation, Change the NTP Server of Your VMware Cloud Director Appliance.