Mahara/Moodle integration using XML-RPC

Mahara/Moodle integration using XML-RPC

by Mario Gharib -
Number of replies: 4

Dear all,

I installed

  1. Moodle 2.9 (https://moodle.usj.edu.lband
  2. Mahara 15.4 (https://mahara.usj.edu.lb)

on two different Linux machines and managed to make them both secured (i.e. using SSL key) 

 

Now I want to integrate Mahara into Moodle (mahoodle) so:

 

  1. I turned on the network on Moodle,
  2. I turned on the network on Mahara,
  3. Add a new institution in order to add the XML-RPC authentication method

 

So what it keeps saying is the following:

An error occurred while retrieving the public key from the remote server.<br>Please ensure that the Application and WWW root fields are correct and that networking is enabled on the remote host.<br>404: Incorrect WWWRoot or Application: file not found.

And I extreme sure that I wrote the exact wwwroot as it is written in the moodle config.php file (Note that I managed to use https in wwwroot)

 

Your assistance will be a really great benefit for me.

Attachment faewfwe.PNG
Average of ratings: -
In reply to Mario Gharib

Re: Mahara/Moodle integration using XML-RPC

by Dave Perry -
Picture of Testers

Have you tried a basic check of 'can the mahara server see the moodle server' - on port 443?

Try curl from the terminal on the mahara server - curl https://moodle.usj.edu.lb/index.php

If that doesn't work, do you get an error message? If it mentions something about certificates/security, try this command:

curl -k https://moodle.usj.edu.lb/index.php

In reply to Dave Perry

Re: Mahara/Moodle integration using XML-RPC

by Mario Gharib -

Dear Dave,

I just checked it and, as you said, when I executed curl https://moodle.usj.edu.lb/index.php it returned:

fe

And then I executed curl -k https://moodle.usj.edu.lb/index.php and it returned:

faewfw

Therefore the mahara server is seeing the moodle server on port 443

Any other suggestion?

In reply to Mario Gharib

Re: Mahara/Moodle integration using XML-RPC

by Dave Perry -
Picture of Testers

That first error says that curl (the tool that mahara, so PHP, uses to try and access the content from other web pages/sites) can't load the certificate bundle which it uses to check if secure sites are safe or not. It may not be there, or you may not have permissions set correctly.

You need to figure out where the bundle file it's looking for is - run curl -v https://moodle.usj.edu.lb and it will tell you (whilst it's going along) what file(s) it's trying to open. If you can verify with the command line, that the file it's looking for exists where it says it's looking, then you need to sort the permissions out on it.

The permission change command you want is probably:
chmod 644 /path/to/certificate/file.pem

Which will give any account (ergo program) on that server the ability to read the file. But only the owner (/creator, probably root in this case) can change it.

(ignore the next bit if you know about checking file permissions/owners already)
To check who owns the file, go to the folder the file is in (e.g. /path/to/certificate/ in the above example) and type ls -l file.pem (where file.pem is the actual bundle file name) - it will tell you the owner and their group

EDIT - if the file it's looking for isn't there (or no file is set up) then you'll need to download it. See this page:
http://curl.haxx.se/docs/sslcerts.html
(Certificate Verifcation section, steps 2 onwards)

In reply to Dave Perry

Re: Mahara/Moodle integration using XML-RPC

by Mario Gharib -

I want to mention the following (I don't know if it has to do with the problem)

I can ping moodle from mahara

faew

but I can't ping mahara from moodle,

fafew

At first I thought mahara is unreachable, so I pinged mahara from different servers and it was reachable,

It seams that there is something with the moodle server that preventing from reaching mahara