Sessions Not Working After Enabling Session Clustering

Follow

Applies To:
Zend Server running in Cluster Mode
Session Clustering
Admin UI

Summary

Once enabling Session Clustering from the Admin UI, sessions are being generated with the new format (master-port-backup-port-version-hash).

However those sessions are not being retrieved from Session Clustering Storage.

We found out that after initially enabling Session Clustering from the Admin UI, any usage of alternative session.save_handler will break this flow from running again. Once enabling Session Clustering the second time (for example, switching from "files" or "memcache" or "mysql") sessions functionality will be broken with the PHP applications.

Technical

The problem is that the Admin UI only switches session.save_handler in php.ini, and not getting to set Zend Session Service (SCD) configuration as well.

To remedy the situation, use one of the two following methods.

Method 1: Manual Fix

1. Backup, then edit /usr/local/zend/etc/scd.ini on all the cluster nodes, make sure you have "zend_sc.daemon.enable=1".

2. Restart SCD:

From console: sudo /usr/local/zend/bin/zendctl.sh restart-scd

From UI: Administration -> Components -> Zend Session Clustering -> Click the right circle which says "Restart daemon"

Method 2: Using CLI Tools

1. Run cluster wide config change (define target first):

$ zs-client.sh --target=<target name> configurationStoreDirectives --directives="zend_sc.daemon.enable=1"

2. Restart SCD across the cluster nodes:

$ zs-client.sh --target=<target name> restartDaemon --daemon=scd

Notes

Have more questions? Submit a request

Comments

Powered by Zendesk