Your session has expired. You may need to re-submit the form or reload the page.
Asked by VGS Register:

Moved confluence site from atlassian cloud to self hosted/Server (through a backup/restore).

Currently I'm running confluence from the atlassian/confluence latest docker image.

When I log with my admin user everything looks fine (creating space/pages/search/...).

Every time I try to change a user password or change permission for a space I get the following error:

The following error(s) occurred:

* Your session has expired. You may need to re-submit the form or reload the page.

The error happens with both Chrome (all extensions disabled) and Safari.

The server is running UTC timezone and the client is in EST timezone.

No anomalies in the confluence or tomcat logs.

Suggestions are appreciated.

Thanks.


Answers:
author: VGS Register
body: After several tries I found the issue.

I had to set **sessionCookieName** attribute to the \<Context\> element of my context.xml.

After the setting, it all worked like a charm.

Thanks.

Stef

comments: author: Henry Bruce
body: Stef,

I have am getting the same error but when uploading a file (server 7.1.2 docker image running in a Azure Container instance, no reverse proxy).

Can you please be more specific about how you set the *sessionCookieName* as I don't see this as a supported option in the [docker configuration](https://hub.docker.com/r/atlassian/confluence-server/) and don't have access to the *\<install\>/conf/context.xml* (only */var/atlassian/application-data/confluence* is mounted to a file share).

Many thanks in advance, Henry.


author: Martin Jane?ek
body: Hello,

I would also appreciate a more complex answer. Currently I have successfully started a Docker with 3 containers

1. Nginx (for reverse proxy needs)
2. Confluence A
3. Confluence B

When I run containers (1 + 2) or (1 + 3), then everything works fine. As soon as I start up all 3 .. my sessions (on both Conf. instances) start to wreak havoc .. "randomly" log-outing people etc.

Would like to find out, how exactly am I supposed to set up, the so called **sessionCookieName** attribute ?  

Thanks


author: Dave Chevell
body: [@Martin Jane?ek](/t5/user/viewprofilepage/user-id/136946) this definitely sounds like nginx needs to be configured with sticky sessions, so that once you're logged in nginx can keep routing you to the same node where your server-side session exists.

Check out the two nginx examples on this article - although it's written for Jira, Confluence also uses the **JSESSIONID** cookie so the nginx configuration would be essentially the same: <https://confluence.atlassian.com/enterprise/jira-data-center-load-balancer-examples-781200827.html>

It's up to you how you want to approach it, but give one of these examples a try and see how you go.


author: Martin Jane?ek
body: Hi Dave,

thank you for a quick response. The problem was actually 2-fold.

1/ The sticky sessions

2/ And secondly, insufficient resources on the running host (VM).

The problem was still occuring even after implementing the sticky sessions and then I found out, there was not enough resources allocated for the VM where these things run. They were actually fighting for last "scraps" of resources (Memory specifically), which as far as I can tell was part of the problem.

It's all good now, thanks for your assistance.


author: Dave Chevell
body: Hey there,

Are you running Confluence behind a reverse proxy, like nginx or apache? It sounds as though something is interfering with your session cookie, and a reverse proxy sitting in the middle would be the first place I would look.

Cheers,

Dave


Tags: confluence-server

server