session invalid please log in again

Moderator: crythias

Locked
freak
Znuny newbie
Posts: 19
Joined: 22 Sep 2014, 17:30
Znuny Version: 4.0.5

session invalid please log in again

Post by freak »

If I leave myself logged for a certain amount of time the system logs me out automatically. That is fine with me. However when I go to log back in I enter my username and correct password and the system tells me "session invalid please log in again". So I have to log in all over again. Why does it do this and what can be done to change the behavior? Can't the session just go away so I don't have to log in twice?
OTRS 4.0.5
wurzel
Znuny guru
Posts: 3273
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: session invalid please log in again

Post by wurzel »

Hi,

this might be a browser issue (caching).

you can try to reset your browser or/and delete browser caches.

Flo
OTRS 2025 SILVER (Prod)
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
benjamin1
Znuny newbie
Posts: 14
Joined: 19 Aug 2015, 05:16
Znuny Version: 5.0.13

Re: session invalid please log in again

Post by benjamin1 »

It could be due to your local IP changing and failing IP session check.

If you don't want sessions to be restricted to the same IP you can change:

Config Options: Framework -> Core::Session
SessionCheckRemoteIP: Select No
freak
Znuny newbie
Posts: 19
Joined: 22 Sep 2014, 17:30
Znuny Version: 4.0.5

Re: session invalid please log in again

Post by freak »

wurzel wrote:Hi,

this might be a browser issue (caching).

you can try to reset your browser or/and delete browser caches.

Flo
Clearing the cache does not fix it. Closing the firefox tab that is running otrs does fix it. One of my web developers said that it is likely they (otrs) have a bug in the way that they are handling the session id and cookie when the system logs a user out.
freak
Znuny newbie
Posts: 19
Joined: 22 Sep 2014, 17:30
Znuny Version: 4.0.5

Re: session invalid please log in again

Post by freak »

benjamin1 wrote:It could be due to your local IP changing and failing IP session check.

If you don't want sessions to be restricted to the same IP you can change:

Config Options: Framework -> Core::Session
SessionCheckRemoteIP: Select No
Thanks but my ip address isn't changing. You can read my other response in this thread.
freak
Znuny newbie
Posts: 19
Joined: 22 Sep 2014, 17:30
Znuny Version: 4.0.5

Re: session invalid please log in again

Post by freak »

freak wrote:
wurzel wrote:Hi,

this might be a browser issue (caching).

you can try to reset your browser or/and delete browser caches.

Flo
Clearing the cache does not fix it. Closing the firefox tab that is running otrs does fix it. One of my web developers said that it is likely they (otrs) have a bug in the way that they are handling the session id and cookie when the system logs a user out.

He looked at it further and said it looks like the cookie path is wrong. This might be from when I converted the system to a virtualhost so otrs could live at otrs.domain.tld instead of www.domain.tld/otrs (or whatever it used to be).
freak
Znuny newbie
Posts: 19
Joined: 22 Sep 2014, 17:30
Znuny Version: 4.0.5

Re: session invalid please log in again

Post by freak »

freak wrote:
freak wrote:
wurzel wrote:Hi,

this might be a browser issue (caching).

you can try to reset your browser or/and delete browser caches.

Flo
Clearing the cache does not fix it. Closing the firefox tab that is running otrs does fix it. One of my web developers said that it is likely they (otrs) have a bug in the way that they are handling the session id and cookie when the system logs a user out.

He looked at it further and said it looks like the cookie path is wrong. This might be from when I converted the system to a virtualhost so otrs could live at otrs.domain.tld instead of http://www.domain.tld/otrs (or whatever it used to be).

Further digging showed ScriptAlias was still set to "otrs/". Setting that to blank fixed the cookie path and I assume it will fix the session problem as well. Thanks!
Locked