Terminating all sessions before upgrading NodeBB
-
Hi,
Rather than updating NodeBB, sometimes we have to re-build a new server and then copy the current NodeBB database into the newly built, upgraded server. We have NodeBB forum installed at subfolder as /forum, and have other components of the website, so this approach is very convenient for us.
However, after doing the transfer and restart, when users are trying to log in to the forum, they get an error message saying that they are already logged in or there is a session mismatch. So, many users clear their web browser cache first and then log in.
We are looking for a solution to this "session mismatch" problem while transferring our database into the new server. Is it possible to terminate all active sessions and then transfer? Is this a solution to this problem?
-
@crazycells I think the sessions shouldn't be invalid of you keep the same database and secret in the config.
-
@pitaj @crazycells It depends on how the migration was done, and how the instance is set up.
An "invalid session" error means the server-side session data is missing.
If you are using redis as session store, and you don't bother to copy it to the new server (because it's just transient data), then this can happen...
Or if you're using Mongodb only, but you only migrated the
objects
collection (which is all that is strictly required).@crazycells Either way, if they see the message, clicking "ok" should automatically clear their local browser session. If not, that may be a bug.