Login is not working (When more than 1 UI server) while updating OS from CentOS 7 to Amazon Linux 2023 for SugarCRM 12.0.5

Hello Team,

We are using SugarCRM 12.0.5 Enterprise Edition on our on-premise AWS environment with Cent OS7. We are running with 2 UI and 2 API and 1 Scheduler instance on lower environment.

When we are trying to upgrade OS from CentOS 7 to Amazon Linux 2023 along with PHP version upgrade from 7.4 to 8.2 then we are facing issue in login functionality. We are using Redis for session save path.

When we are trying to login from UI then we are getting error message "Unable to sync with server.: The access token provided is invalid.".

But, if we bring up application with 1 UI instance only then it will start working. We are not sure why it is not working with more than 1 UI instance.

Do you have any idea if we need to make any additional application configuration to support OS change from CentOS 7 to Amazon Linux 2023?

Any help is highly appreciated.