Login fails at security checks in a cluster environment

Piwik login fails at security checks in a cluster environment with the following error:

Error: Form security failed. Please reload the form and check that your cookies are enabled. If you use a proxy server, you must configure Piwik to accept the proxy header that forwards the Host header. Also, check that your Referer header is sent correctly.

Unfortunately I already have setup the mentioned configs but it’s not working properly.

I have a Piwik cluster out of three independent servers which uses the same database which is on another independent server (cluster). This setup is required due to the high amount of incomming Piwik traffic.

The frontend proxy dispatches to any cluster node which have the lowest load. In short: Every single call can be dispatched to different servers which using the same database on another server.

If I get the error I do some login page reloads (with POST credentials) until Piwik let me in. How to fix the security checks problem?


Hi Fabian.

Your right. I have forgotten to put the session storage in the database. Thank you.