Forums | Mahara Community

Mahara/Moodle integration /
Problem with Configuring the XMLRPC plugin


anonymous profile picture
Account deleted
Posts: 64

09 February 2011, 8:00

I am reading http://wiki.mahara.org/@api/deki/files/196/=Mahoodle.pdf.

However when I try 'Configuring the XMLRPC plugin' page 13, I get the following error.

I have ensured the WWW root and networking is enabled in Moodle.

Moodle and Mahara are in the same hosting.

Could anyone help me please?

++++++++++

Error message

An error occurred while retrieving the public key from the remote server.
Please ensure that the Application and WWW Root fields are correct, and that networking is enabled on the remote host.
Error retrieving public key, failed with error code 0: Curl error: 28: connect() timed out!

Ruslan Kabalin's profile picture
Posts: 146

09 February 2011, 8:47

Hello shinokada,

That 'Curl error: 28: connect() timed out!' tells that your problem related to http connection to the remote host. If your server (where Mahara is run) requires proxy setting for http connection, please ensure it is specified at "Site settings".

If proxy is not the case, you may also ensure that the URL you use at 'WWW root' field is actually reachable from your browser and also from the server command line: 

wget http://your.remote.moodle.url

anonymous profile picture
Account deleted
Posts: 64

10 February 2011, 7:26

Thanks Ruslan,

We don't use proxy and I checked wwwroot is reachable by a browser and wget.

But it still give the same error.

Any help will be appreciated.

Iñaki Arenaza's profile picture
Posts: 253

13 February 2011, 15:56

When you say that Moodle and Mahara are in the same hosting, do yo mean they are hosted in the same hosting provider but at two different hosts? Or do you mean they are installed in the same host? (as subdomains, or even subdirectories of the main host domain)

Saludos.
Iñaki. 

anonymous profile picture
Account deleted
Posts: 64

14 February 2011, 1:02

My school has one server and both are hosted in this server.

The server is Ubuntu.

So we use http;//moodle.schoolname.org and http://eportfolios.schoolname.org

Regards,

Shin

 

Iñaki Arenaza's profile picture
Posts: 253

14 February 2011, 17:09

Can you check that your web server resolves the right IP for both names?

I remember one person having a similar problem due to name resolving issues. The names resolved to the external IP (the one assigned to the router/firewall external interface) instead of the local server address. So the connections timed out while trying to reach the external address.

As a last ressort, you could use /etc/hosts to map the server names to the local server addresses. Make sure you use the addresses configured in your web server's virtual hosts.

Saludos.
Iñaki. 

anonymous profile picture
Account deleted
Posts: 64

15 February 2011, 5:01

How can I find the local server address?

 

Iñaki Arenaza's profile picture
Posts: 253

16 February 2011, 5:19

You can put a new file (lets call it 'serveraddress.php') inside your Mahara directory with the following content:

<?php
define('INTERNAL', 1);
define('PUBLIC', 1);
require('init.php');
echo '<p>Mahara server address: '.$_SERVER['SERVER_ADDR'].'</p>';
?>

And then go to http://eportfolios.schoolname.org/serveraddress.php  and see what you get.

You can do the same with Moodle putting this into 'serveraddress.php' file:

<?php
define('MOODLE_INTERNAL', 1);
require('config.php');
echo '<p>Moodle server address: '.$_SERVER['SERVER_ADDR'].'</p>';
?>

and then go to http://moodle.schoolname.org/serveraddress.php and see what you get too.

Saludos.
Iñaki. 

anonymous profile picture
Account deleted
Posts: 64

16 February 2011, 6:43

I ge the followings.

For mahara,

Mahara server address: 192.168.11.2

for moodle

Notice: Constant MOODLE_INTERNAL already defined in /var/www/clients/client3/web3/web/lib/moodlelib.php on line 43

Moodle server address: 192.168.11.2

Both are hosted in our school server.

Thank you for your help.

Iñaki Arenaza's profile picture
Posts: 253

17 February 2011, 16:42

If you can log in into your school server and execute commands, execute the following ones:

ping -c 1 moodle.schoolname.org
ping -c 1 eportfolios.schoolname.org

if you don't get 192.168.11.2 on the output of both commands but a different IP address, then the resolver is using the DNS to get the IP address (probably the public/official one).

If you have root privileges on the machine, you can edit '/etc/hosts' file and add a couple of lines like these (in addition to what you already have there):

192.168.11.2   moodle.schoolname.org
192.168.11.2   eportfolios.schoolname.org

If your school server is not using the 'nscd' service (it depends on the distribution) changes will be effective immediately. If it is, changes will be effective after a few minutes (normally under 30 minutes).

Saludos.
Iñaki,. 

12 results