I manage a collaborative Moodle site that uses MNet to connect to over two dozen Moodle installations in schools around the world. Until Monday, our trusted relationships worked perfectly. Since Monday, however, schools trying to connect to the collaborative Moodle are being met with a time gap error, such as:
RPC auth/mnet/user_authorise:Time gap with moodlename (16.5 seconds) is greater than the permitted maximum of 15 seconds ERROR 6:6:Time gap with moodlename (16.5 seconds) is greater than the permitted maximum of 15 seconds.
After some troubleshooting, I can confirm:
(a) multiple Moodle installations on the hosted server allow roaming between each other, without issue
(b) the Moodle installations on the hosted server allow roaming out to other, external Moodle installations
(c) when external Moodle installations try to roam to the hosted/collaborative Moodle, they get this error about the Time Gap.
I've read the few threads on this site that pertain to this, and have tried manually overriding the threshold limit to take it from 15 seconds to 60. No dice! The last time it worked was late Sunday evening, and since then I have made no changes on the admin side --- which suggests, of course, that the problem lies with the hosted server.
The hosting provider confirms that they have not upgraded or changed PHP builds recently, nor are there any issues with the server time that they are aware of. I'm out of ideas on how to troubleshoot this further, to be honest. Any thoughts would be very much appreciated!
Washington International School
This became more important when we trialled a virtual Mahara server (connected via MNet) where Windoes Server Something Or Other was the host. The time was slipping on it terribly, so much that we had to modify CRON to run once per hour on the virtual server. A pain, and shouldn't be necessary, but the end result is working a working Mahoodle.
TV stations can show several minutes' difference in time, so I suggest that it's not impossible for different Moodle installs, on different servers, to exist outside of 15 seconds syncronisation.
If yo have shell access to your servers, try:
ntpdate -d uk.pool.ntp.org
...or another time server to see how far off (or not) you are, and if possible, try the same thing from the 'incoming' servers too.
Hope that helps.
Thanks to all for your feedback and advice. I have had my provider ensure that the server time is manually set to a ntp source, as well as configure the ntpd service to run regularly to calibrate the time. Sadly, the issue persists and external Moodle installations are not able to connect to the collaborative Moodle. Everyone is still getting a time gap error of anywhere between 16.5 and 18 seconds. Moodle installations hosted on the same server as the collaborative one can connect to it just fine, however. The collaborative Moodle can connect "out" to other peer modules without issue, too.
I am still convinced that this is a time issue, but am not sure what else I can do to troubleshoot this. Are there any safe hacks to override this setting, behind the scenes? I have already hard-coded a value of 60 for the threshold in in mnet/xmlrpc/client.php, but that doesn't seem to have done the trick.
Any other ideas would be much appreciated!
Director of Information Services, Washington International School
Coordinator, Global Crossroads Project