Roundcube Community Forum

Release Support => Pending Issues => Topic started by: myth on January 14, 2013, 02:55:41 AM

Title: Session error - Session auth check failed for - Session authentication failed
Post by: myth on January 14, 2013, 02:55:41 AM
Hi roundcube community,

I installed my new web-/mailserver under nginx/php 5.3.19 and want to use roundcube, but I am not able to get it work. It seems, that there are problems with the sessions I could not solve by my own. The error messages are:

[14-Jan-2013 08:41:21 +0100]: Session auth check failed for ; timeslot = 2013-01-14 08:41:00
[14-Jan-2013 08:41:21 +0100]: Session authentication failed for ; invalid auth cookie sent; timeslot = 2013-01-14 08:39:00

User login is working fine:

[14-Jan-2013 08:41:21 +0100]: Successful login for xxx@xxx.com (ID: 1) from 217.x.x.x in session 6crhp89j0i1bci3pj8mbep7r61

I searched a lot inside this community forum because some other guys had the same error message, but none of the solutions worked for me. My webserver is using https and so I tried it with and without this following options (true and false):

$rcmail_config['force_https'] = true;
$rcmail_config['use_https'] = true;
$rcmail_config['session_lifetime'] = 0;
$rcmail_config['session_domain'] = '.xxx.com';
$rcmail_config['session_name'] = 'null';
$rcmail_config['session_storage'] = 'db';
$rcmail_config['memcache_hosts'] = null;
$rcmail_config['ip_check'] = false;

The configuration and testing of SMTP and IMAP was fine as well, but I tried a lot of configuration options and none of them worked. If I delete the session_domain and set it to

$rcmail_config['session_domain'] = ''

I'll get another error message as expected:

[14-Jan-2013 08:50:35 +0100]: Aborted session 6crhp89j0i1bci3pj8mbep7r61; no valid session data found

Sessions in general seems to work on the webserver, because the installed wordpress is running without any problems. I don't know what to do and need some help.

Thank you very much!!

Edit: I also tried it on other computers with all common Browsers.

Edit 2: The timezone within the php.ini is "date.timezone = Europe/Berlin" as well as $rcmail_config['timezone'] = 'Europe/Berlin';
Title: Re: Session error - Session auth check failed for - Session authentication failed
Post by: myth on January 17, 2013, 03:16:31 AM
I tried around a lot more, but it seems to be useless. Maybe somebody could tell me if the lines:

[17-Jan-2013 09:13:43 +0100]: Session auth check failed for ; timeslot = 2013-01-17 09:13:00
[17-Jan-2013 09:13:43 +0100]: Session authentication failed for ; invalid auth cookie sent; timeslot = 2013-01-17 09:11:00

are missing something? Because of "...failed for ;" it seems that there should be something other than ";" or something in front of it?
Title: Re: Session error - Session auth check failed for - Session authentication failed
Post by: SKaero on January 17, 2013, 06:45:18 PM
Is there any way you could give me ftp access and a test account to take a look at the problem?
Title: Re: Session error - Session auth check failed for - Session authentication failed
Post by: myth on January 24, 2013, 08:52:19 AM
Yes, shall I send them in forum or by email?
Title: Re: Session error - Session auth check failed for - Session authentication failed
Post by: SKaero on January 24, 2013, 01:02:23 PM
You can send them to me by email to scott [at] skaero.com
Title: Re: Session error - Session auth check failed for - Session authentication failed
Post by: myth on January 25, 2013, 06:01:02 AM
You have mail. :)
Title: Re: Session error - Session auth check failed for - Session authentication failed
Post by: myth on February 08, 2013, 09:32:19 AM
Skaero told me that the problem might be based on the nginx/php-fpm combination which I have installed on my server.

Do other people also have problems with roundcube and nginx/php-fpm?
Title: Re: Session error - Session auth check failed for - Session authentication failed
Post by: SKaero on February 11, 2013, 12:39:55 PM
Sorry for not getting back to the problem, extremely busy right now but I should have time to look at it later this week. I have run RoundCube on Nginx & PHP-FPM before so I know it can be done.
Title: Re: Session error - Session auth check failed for - Session authentication failed
Post by: yoni5002 on February 11, 2013, 07:25:03 PM
Myth,

Try the following configuration... make sure to restart nginx and php-fpm after making the changes:

$rcmail_config['force_https'] = true;
$rcmail_config['use_https'] = false;
$rcmail_config['session_lifetime'] = 10;
$rcmail_config['session_domain'] = '';
$rcmail_config['session_name'] = null;
$rcmail_config['session_storage'] = 'db';
$rcmail_config['memcache_hosts'] = null;
$rcmail_config['ip_check'] = false;


service php-fpm restart
service nginx restart
Title: Re: Session error - Session auth check failed for - Session authentication failed
Post by: myth on February 14, 2013, 06:50:30 AM
Sorry for not getting back to the problem, extremely busy right now but I should have time to look at it later this week. I have run RoundCube on Nginx & PHP-FPM before so I know it can be done.

I didn't want to hurry you, just want to make sure that maybe there are some others with similar problems. But it doesn't seem so. :)

Myth,

Try the following configuration... make sure to restart nginx and php-fpm after making the changes:

$rcmail_config['force_https'] = true;
$rcmail_config['use_https'] = false;
$rcmail_config['session_lifetime'] = 10;
$rcmail_config['session_domain'] = '';
$rcmail_config['session_name'] = null;
$rcmail_config['session_storage'] = 'db';
$rcmail_config['memcache_hosts'] = null;
$rcmail_config['ip_check'] = false;


service php-fpm restart
service nginx restart

Tried it, but doesn't help either. :(

I use nginx 1.2.6,1 and php 5.3.20, maybe the problem lays inside this versions...
Title: Re: Session error - Session auth check failed for - Session authentication failed
Post by: lenada on February 25, 2013, 05:43:04 PM
I can confirm that problem with nginx-1.2.7_1,1  and php-fpm (5.4.11)
the session log says
[25-Feb-2013 20:24:04 +0100]: Session auth check failed for ; timeslot = 2013-02-25 20:20:00
[25-Feb-2013 20:24:04 +0100]: Session authentication failed for ; invalid auth cookie sent; timeslot = 2013-02-25 20:10:00

I had an older version of roundcube running with fpm and nginx for quite a while and never ran into these session/timeslot calculation issues.
Think I'll try to have a deeper look into https://github.com/roundcube/roundcubemail/blob/release-0.8/program/include/rcube_session.php#L589-L616

I just tried master and have the same issues there.
Title: Re: Session error - Session auth check failed for - Session authentication failed
Post by: myth on March 07, 2013, 09:53:05 AM
Any news here? :)
Title: Re: Session error - Session auth check failed for - Session authentication failed
Post by: myth on March 22, 2013, 02:17:34 PM
Can I help with this problem in any case?
Title: Re: Session error - Session auth check failed for - Session authentication failed
Post by: Drakon on October 14, 2013, 05:28:08 AM
Hi myth,
I have the same problem. I think that I have problems with datetime config on Apache or another service. Do you know I must change exactly?
Title: Re: Session error - Session auth check failed for - Session authentication failed
Post by: fenceposterr1r on November 15, 2013, 01:25:47 PM
Sorry to pull this one out of it's grave, but I'd like to know if there is a solution to this issue?
I'll happily provide you with any information you need!

-FencepostErr1r
Title: Re: Session error - Session auth check failed for - Session authentication failed
Post by: fenceposterr1r on September 28, 2014, 01:15:35 PM
Anyone?
Title: Re: Session error - Session auth check failed for - Session authentication failed
Post by: markc on January 02, 2015, 07:00:08 PM
Sorry I can't help you but after having roundcube running for 3 weeks with apache 2.4.10 (ubuntu 14.10) I suddenly got a call this morning and now I'm getting the dreaded "Loading..." message after logging in but nothing else happens, it just hangs.

I've turned up roundcube error logging and this is the only thing I can find that seems related, a LOT of these...
Code: [Select]
[03-Jan-2015 10:45:06 +1100]: <11npnocq> Session auth check failed for 11npnocqbunntmk46gbn2cv0v6; timeslot = 2015-01-03 10:45:00
[03-Jan-2015 10:45:06 +1100]: <11npnocq> Send new auth cookie for 11npnocqbunntmk46gbn2cv0v6: Se4501b2842a670bed1f5a1a34783e93d089b2339
[03-Jan-2015 10:45:18 +1100]: <6e1bodlt> Aborted session 6e1bodlt61a5anonpvkl1prih6; no valid session data found
[03-Jan-2015 10:46:08 +1100]: <11npnocq> Session auth check failed for 11npnocqbunntmk46gbn2cv0v6; timeslot = 2015-01-03 10:46:00
[03-Jan-2015 10:46:08 +1100]: <11npnocq> Send new auth cookie for 11npnocqbunntmk46gbn2cv0v6: S7e79142d5469db2eba2a34ba95db27359ce645cd
[03-Jan-2015 10:47:08 +1100]: <11npnocq> Session auth check failed for 11npnocqbunntmk46gbn2cv0v6; timeslot = 2015-01-03 10:47:00

I did restart the apache server yesterday about the time when this problem was first reported so obviously something changed in my settings or on the server (timezone had been tweaked a few weeks ago). The timezone in the above "session" log matches the server "date" command output. The logs, temp and /var/log/php (session store) folders are all chmod 1777. I'm not sure what to look for in the MySQL (mariadb actually) session table.

Any assistance appreciated, and some hint as to what log and config file snippets to provide if needed.

EDIT: my problem was solved by this post...

http://www.roundcubeforum.net/index.php/topic,21658.msg58470.html#msg58470

Sure enough I had added this to my apache config the previous day...

Code: [Select]
#### will not work with roundcube
#  Header                always set X-Frame-Options DENY
Title: Re: Session error - Session auth check failed for - Session authentication failed
Post by: Zilon on December 22, 2015, 04:14:32 PM
Hello,

I observer same behavior as Lenada with recent version of nginx, php-fpm and roundcube on FreeBSD 10.2. I already adjusted the timezone of my PHP setup to my local one and the one the server uses but the behavior does not change.

Any hints? Do you need further information?

Thanks
Zilon