Forums | Mahara Community

Support /
Error retrieving public key - Mahara in sub-domain, sub-directory


Reggie  Euser's profile picture
Posts: 14

16 March 2010, 17:39

grep'ing /etc/*:

rc.local:echo "Setting Port Forwarding Rules... 80 to 8080, 443 to 8443"
rc.local:iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to ###.###.###.###:8080
rc.local:iptables -A FORWARD -p tcp -s 0/0 --sport 1024:65535 -d ###.###.###.### --dport 8080 -j ACCEPT

(###=IP nums)

 

PS - I've gotta fly but will be checking later on this evening if you have any cheerie thoughts! Thanks again for your help!

anonymous profile picture
Account deleted
Posts: 228

17 March 2010, 3:16

argh, ip tables hurts my eyes!

I guess maybe the forwarding is only working for traffic coming from the external interface, which is why the local request to 80 isn't being forwarded to 8080? Is that something you can get whoever does have root access to fix?

Failing that I'm not really sure why putting the port into the mnet settings doesn't work :( I think that should work.

Can you trace through auth/xmlrpc/lib.php and lib/peer.php and see if the port is being stripped somewhere?  The closest place to check is in lib/peer.php around line 234 where get_public_key is called - try putting a log_debug($this->wwwroot) just before that call.  You'll need to make sure you have the log target for debugging going to your screen too - put this into your config.php:

$cfg->log_dbg_targets     = LOG_TARGET_ERRORLOG | LOG_TARGET_SCREEN;
Reggie  Euser's profile picture
Posts: 14

17 March 2010, 7:56

Thanks for the guidance Penny!  I'll take a shot at this later on today and let you know how it works out!

 PS - Just FWIW, I've got another instance of Mahara up and running with another school's Moodle on servers I control - works great!  Now if I can just get teachers & administrators to begin to understand the hows & whys of using it...

Thanks again!

Reggie  Euser's profile picture
Posts: 14

18 March 2010, 16:57

Sorry to be so long running this exercise - had a day at the doctor's office/hospital yesterday with my daughter (all ok as it turns out.)

In any case, I added the debug line to peer.lib and got these messages:

[DBG] fd (lib/peer.php:232) http://mysite.com
[X]
[DBG] fd (auth/xmlrpc/lib.php:844) Error retrieving public key, failed with error code 0: Curl error: 7: couldn't connect to host
 
Not sure this tells us anything new, but if you see a way forward, please let me know!
 
Also, I've gone back to the sysadmin to try to get them to address the port forwarding issue. We'll see whether that has any effect.
 
Also, we are looking at possibly acquiring a new server for Mahara & Moodle. It has been suggested that we consider using VMWare's ESX platform and wondered whether you might have any insights/comments about Mahara on a virtual machine generally?
 
Thanks again!
 

 

Reggie  Euser's profile picture
Posts: 14

18 March 2010, 17:55

Woo-hoo!

 Got thru to the sysadmin, he enabled 80 to 8080 forwarding locally and Huzzah! Mahara retrieved the public key like it was born to!

 Many, many thanks for your guidance, Penny - and if you do have any comments/thoughts about Mahara/Moodle on virtual servers, I'd love to hear them!

 Cheers!

15 results