Forums | Mahara Community
Mahoodle - Unable to SSO after a few days
10 May 2013, 3:01 AM
Hello! We are running Mahara 1.7 on Ubuntu v.12.1.0 and it is set up to accept SSO from our Moodle server which is RHEL v.6.3.
Everything works great - users go to our Moodle site and click the link and are automatically logged into the Mahara server. After a few days however this connection is severed and users get an error message that the system could not log them in at this time. If I restart the Mahara server it starts working again.
I have checked logs on both servers and I don't see anything jumping out at me. When users cannot login to Mahara, they can still log into Moodle (LDAP authentication with Active Directory) with no problem. I can also still login to the Mahara server with the local admin account and everything looks good.
Any ideas on what could be causing this or where I could look for more information?
Thanks so much!
13 May 2013, 10:02 AM
Please try to log in from Moodle into Mahara and check the error logs on both sides immediately upon failure and note down the error. Without an error message from the log there is not much we can do as the problem could be a number of different things.
14 May 2013, 12:48 AM
Thank you, I will check this next time I notice the error. I've checked a few areas for Mahara logs, which log file would I want to look at to see any pertinent error messages? Do you know the default location for this log file?
Thanks so much,
15 May 2013, 4:45 PM
Please check your config file for the location of the error log. I found the following comment in htdocs/lib/config-defaults.php
// If you use LOG_TARGET_FILE, this is the file that errors will be logged to.
// By default, it will write to the file 'error.log' under dataroot. If you
// change this in config.php, make sure you use a folder which is writable by
// the webserver.
// $cfg->log_file = '/path/to/dataroot/error.log';
Hope that helps
21 May 2013, 3:48 PM
I'd recommend checking your PHP error logs, on the Moodle and Mahara sides. The location of these can vary depending on your server config. In Ubuntu they get printed into the Apache error logs, for which the default location is /var/log/apache2/error.log.
If I recall correctly, in order for Moodle to record anything there, you'll need to go to "Site administration->Development->Debugging" and set "Debug Messages" to "Developer" or "All". (You can leave "Display debug messages" unticked.)
24 May 2013, 1:08 AM
[Thu May 23 09:01:06 2013] [error] [client 10.51.1.174] * AuthXmlrpc->request_user_authorise("822b9dbc642ddc806362fa3b2a0169a2d0578e23", "http://moodle.*******.edu") at /srv/www/eportfolio/htdocs/auth/xmlrpc/land.php:94, referer: http://moodle.*******./
[Thu May 23 09:01:06 2013] [error] [client 10.51.1.174] , referer: http://moodle.*******./
[Thu May 23 09:01:08 2013] [error] [client 10.51.1.174] Call stack (most recent first):, referer: http://moodle.*******./
Thanks, everyone! Looks like it was the time drift. 20 seconds!? that's pretty tight. We set up a cron job to update the time on each server every 5 minutes so hopefully this will prevent the problem from recurring.
Thank you all so much!
24 May 2013, 11:45 AM
Always good to see a problem solved!
Looking at the code, I see Mahara has a config setting, $cfg->xmlrpcmaxservertimedifference , which you can use to increase the accepted time drift. If it's not set, it defaults to 15 seconds.
09 June 2013, 6:10 PM
We've had time drift issues before if I recall and pretty much the only thing that helped was to restart the Moodle server as we did not want to set the acceptable drift too high.