Network Server Block empty

Network Server Block empty

by Frances Vevers -
Number of replies: 14

Hi all.

I've got a Mahara 1.4 and a Moodle 2.0.3 and I'm trying to set up SSO.  Everything has gone well and I got no errors but when it comes to putting the Network Servers Block on the Moodle the block is empty.

When I turned on debugging I got the message

"Users need the capability 'Roam to a remote application via MNet' to see the list of MNet network servers"

I'm logged in as an admin and have the roam permission set to allow.  When I tested it as a student with roam permission the Network Server block didn't appear at all.

Both Moodle and Mahara are on the same server.

Any ideas anyone? It feels like I've fallen at the final hurdle.

Average of ratings: -
In reply to Frances Vevers

Re: Network Server Block empty

by Dave Emsley -

Slightly different problem for me but similar - I cannot see the Network Server block unless in blocks editing mode.

I've followed the documentation I can find through but cannot see where I've gone wrong - I've done this before without a hitch and thought I'd done exactly the same.

Both Mahara 1.4 and Moodle 2.1 are on the same Ubuntu machine running 10.04.  Running on a MacMini.  As I say done exactly same before and it worked.

Puzzled!!?

 

In reply to Frances Vevers

Re: Network Server Block empty

by Andrea Gregory (Gordon) -

Hi Frances / Dave

Try editing the 'authenticated user' role. This will then allow any user who is logged in permission to roam.

Cheers smile

Andrea

Average of ratings: Useful (1)
In reply to Andrea Gregory (Gordon)

Re: Network Server Block empty

by Andrea Gregory (Gordon) -

Also Dave - make sure your services are set correctly in your peer settings as if your mahara has been set to allow users to roam *in* from there and not out from your Moodle, then the block will not show.

i.e

- Subscribe to this service to be able to enrol your students in courses on Home - Mahara

- publish sso identity

- subscribe sso service

Andrea

Average of ratings: Useful (1)
In reply to Andrea Gregory (Gordon)

Re: Network Server Block empty

by Dave Emsley -

Hi Andrea thanks - All that was right, according to the documentation.  I've completely deleted and reinstalled Moodle and Mahara.

The Moodle Network block shows up now but the link doesn't work.  If I log into Mahara afterwards as local admin I get 196 messages.  Most of which seem to want to do the same thing:

exception 'EmailException' with message 'Couldn't send email to Admin User (admin) with subject Mahara: User notification error was probably caused by your server configuration.. Error from phpmailer was: Could not instantiate mail function.' in /var/www/maha14/lib/user.php:457
Stack trace:
#0 /var/www/maha14/notification/email/lib.php(97): email_user(Object(stdClass), NULL, 'Mahara: User no...', 'You have been s...', NULL, NULL)
#1 [internal function]: PluginNotificationEmail::notify_user(Object(stdClass), Object(stdClass))
#2 /var/www/maha14/lib/mahara.php(1184): call_user_func_array(Array, Array)
#3 /var/www/maha14/lib/activity.php(462): call_static_method('PluginNotificat...', 'notify_user', Object(stdClass), Object(stdClass))
#4 /var/www/maha14/lib/activity.php(489): ActivityType->notify_user(Object(stdClass))
#5 /var/www/maha14/lib/activity.php(82): ActivityType->notify_users()

 

Which I'm thinking is related to the fact that the server has no email functionality.  Will this work if I can disable this?  Can I disable that smile?

 

Annoyingly I have another separate server which is working and I cannot for the life in me see any difference in configuration.

In reply to Dave Emsley

Re: Network Server Block empty

by Andrea Gregory (Gordon) -

Dave,

What's the error message you get when just clicking on the link from Moodle to Mahara?

The mail function shouldn't affect the above I wouldn't think smile

Thanks

Andrea

In reply to Andrea Gregory (Gordon)

Re: Network Server Block empty

by Dave Emsley -

Hi Andrea - no error messages whatsoever!  Nothing; just a hang.  I've taken a video using Jing and here's a link to it:

 http://www.emsley.org.uk/MahoodleMess.swf 

Thanks for your help so far, it really has me stumped.

Cheers

 

Dave

In reply to Dave Emsley

Re: Network Server Block empty

by Andrea Gregory (Gordon) -

There will definitely be a message in the server error logs Dave.

Have a look there and let me know what it shows.

If you let it tick over does it not produce an error eventually?

Andrea

In reply to Andrea Gregory (Gordon)

Re: Network Server Block empty

by Dave Emsley -

Hi Andrea,  Hope this makes sense - There's a very long and repetative /var/log/apache2/error.log which has:

sh: /usr/sbin/sendmail: not found
sh: /usr/sbin/sendmail: not found
sh: /usr/sbin/sendmail: not found
sh: /usr/sbin/sendmail: not found
[Fri Oct 21 09:55:39 2011] [error] [client 192.168.2.100] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 24 bytes) in /var/www/maha14/lib/phpmailer/class.phpmailer.php on line 686, referer: http://192.168.2.102/moodle2/
[Fri Oct 21 10:29:52 2011] [error] [client 192.168.2.100] File does not exist: /var/www/moodle
sh: /usr/sbin/sendmail: not found

The sendmail line repeats a large number of times interspersed with the error.

After a while the Moodle page changes to a complete blank page with the URL:
http://192.168.2.102/maha14/auth/xmlrpc/land.php?token=25d818992c73d16268f43bf9aa161c1f250878f5&idp=http://192.168.2.102/moodle2&wantsurl=

The page loading icons stops.  The error log then stops growing bigger and ends with:

sh: /usr/sbin/sendmail: not found
sh: /usr/sbin/sendmail: not found
[Fri Oct 21 12:05:41 2011] [error] [client 192.168.2.100] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 35 bytes) in /var/www/maha14/lib/phpmailer/class.phpmailer.php on line 686, referer: http://192.168.2.102/moodle2/


If I refresh the above page it give a Mahara page with:

Sorry, could not log you in sad
Sorry, we could not log you into Mahara at this time. Please try again shortly, and if the problem persists, contact your administrator

hope this makes sense to you as it's puzzling the heck out of me.

PS it *does* seem to have created the users in Mahara but they cannot log in

In reply to Dave Emsley

Re: Network Server Block empty

by Andrea Gregory (Gordon) -

Hi Dave,

Try increasing the memory limit (memory_limit ) in your php.ini file and restart apache.

memory_limit

Try this again after that and paste results again.

Thanks

Andrea

In reply to Andrea Gregory (Gordon)

Re: Network Server Block empty

by Dave Emsley -

Hi Andrea,

Increased memory_limit to 512Mb from 128Mb.

/var/log/apapche2/error.log has 328 lines of sh: /usr/sbin/sendmail: not found

Then:

[Mon Oct 24 14:23:20 2011] [error] [client 192.168.2.100] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/maha14/lib/phpmailer/class.phpmailer.php on line 686, referer: http://192.168.2.102/moodle2/
[Mon Oct 24 14:23:23 2011] [error] [client 192.168.2.100] File does not exist: /var/www/favicon.ico
[Mon Oct 24 14:24:16 2011] [error] [client 192.168.2.100] [WAR] 4d (api/xmlrpc/client.php:176) Unknown error occured: 2: Authorisation failed: the mnet session has timed out., referer: http://192.168.2.102/moodle2/
[Mon Oct 24 14:24:16 2011] [error] [client 192.168.2.100] Call stack (most recent first):, referer: http://192.168.2.102/moodle2/
[Mon Oct 24 14:24:16 2011] [error] [client 192.168.2.100]   * Client->send("http://192.168.2.102/moodle2") at /var/www/maha14/auth/xmlrpc/lib.php:118, referer: http://192.168.2.102/moodle2/
[Mon Oct 24 14:24:16 2011] [error] [client 192.168.2.100]   * AuthXmlrpc->request_user_authorise("7a8b3da92749ada806baf01e8eb8d751f087ff35", "http://192.168.2.102/moodle2") at /var/www/maha14/auth/xmlrpc/land.php:94, referer: http://192.168.2.102/moodle2/
[Mon Oct 24 14:24:16 2011] [error] [client 192.168.2.100] , referer: http://192.168.2.102/moodle2/

 

I hope this is making more sense to you than to me wink  I really appreciate you looking at this;

thanks again,


Dave

In reply to Dave Emsley

Re: Network Server Block empty

by Andrea Gregory (Gordon) -

Hi Dave,

Well for the sendmail error, make sure this is installed on your server. If it is ubuntu try:

apt-get install sendmail

Or contact someone who can install this for you..


On the other errors, increase the max execution time in your php.ini file as well:

max_execution_time = 30

Change this to a higher value, try 300 to begin with to see if that works, then restart apache.

Cheers

Andrea

In reply to Dave Emsley

Re: Network Server Block empty

by g rodriguez -

I have exactlly the same errors Dave has. I've been looking all around and nothing yet.

Im have windows server 2003 and windows 7, neither works.

XAMPP 1.7.1 / apache 2.2.11, php 5.2.9

If someone has come to a solution, I would appreciate your notes.

In reply to g rodriguez

Re: Network Server Block empty

by g rodriguez -

Hey!!! Finally it works!!

The problem was simply that I didn't had configured the email settings, so that mahara can send emails.

It seems like in the code there is something that gets the script in an infinite loop when it tries to do something with the email(i don't know what for it tries to use the email, but anyway) when you try to login.

So, all you have to do is configure your email settings in Mahara Site Administration, check that everything is correct (smtp user, pwd, port, smtp encryption, etc).

luck!

In reply to Andrea Gregory (Gordon)

Re: Network Server Block empty

by Frances Vevers -

Thanks for the tip Andrea. I had actually already done this but I went in to double check and the box was unchecked.  Oh well, it's working now.