Forums | Mahara Community

Support /
Mahoodle - Unable to SSO after a few days


anonymous profile picture
Deleted user
Posts: 3

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!

Kristina Hoeppner's profile picture
Posts: 3601

13 May 2013, 10:02 AM

Hello Brad,

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.

Cheers

Kristina

 

anonymous profile picture
Deleted user
Posts: 3

14 May 2013, 12:48 AM

Kristina,

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,

Brad

Kristina Hoeppner's profile picture
Posts: 3601

15 May 2013, 4:45 PM

Hello Brad,

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
.

Cheers

Kristina

 

Aaron Wells's profile picture
Posts: 896

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.)

Cheers,
Aaron

anonymous profile picture
Deleted user
Posts: 3

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] [WAR] 50 (api/xmlrpc/client.php:138) Time drift (0, 24) is too large., referer: http://moodle.*******./

[Thu May 23 09:01:08 2013] [error] [client 10.51.1.174] Call stack (most recent first):, referer: http://moodle.*******./

[Thu May 23 09:01:08 2013] [error] [client 10.51.1.174]   * Client->send("http://moodle.*******.") at /srv/www/eportfolio/htdocs/auth/xmlrpc/lib.php:119, 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!

Brad

 

Aaron Wells's profile picture
Posts: 896

24 May 2013, 11:45 AM

Always good to see a problem solved! Smile

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.

Cheers,
Aaron

Kristina Hoeppner's profile picture
Posts: 3601

09 June 2013, 6:10 PM

Hello Brad,

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.

Cheers

Kristina

 

8 results