localhost mnet networking: problem retrieving the public key.

localhost mnet networking: problem retrieving the public key.

by tony chesney -
Number of replies: 3
I'm attempting to network 2 moodle installs (1.9) both on localhost.

Both display (different) certificates when I go to

Admin->Networking->Settings

On one, I can add the other as a Peer using

Admin->Networking->Peers, Add a new host.

On the other, it says, "There was a problem retrieving the public key."

I've read a number of threads on this, but only one that described this situation exactly (maybe not localhosts), and that was unresolved.

Are there any special circumstances that apply to networking 2 installs on the same IP (localhost)?
In reply to tony chesney

Re: localhost mnet networking: problem retrieving the public key.

by Hubert Chathi -
No, there are no special circumstances that apply to localhost -- I have several test sites that use localhost. One thing that you can check, though, is that the host URL that you enter in the Peers screen has to match exactly the $CFG->wwwroot setting on the site you are connecting to (and should not have a trailing slash).
In reply to Hubert Chathi

Re: localhost mnet networking: problem retrieving the public key.

by tony chesney -

Thanks:  I checked that the host URL in the Peers screen matched the $CFG->wwwroot setting (which doesn't have a trailing slash) and it did. 

To anticipate another config file issue, both config files have the $CFG->opensslcnf set to point to openssl.cnf (this may be obvious from the fact that both installs find their own public key when you look under Admin->Networking->Settings.)

a slight tangent:  when you see the message:  "There was a problem retrieving the public key." , where is the public key actually stored (XP, if that's relevant)? 

In reply to tony chesney

Re: localhost mnet networking: problem retrieving the public key.

by Hubert Chathi -
The public keys are stored in the database, in the mdl_mnet_host table.

If you turn on debugging, you may get more information about why it was unable to retrieve the key.

And, of course, make sure that Networking is actually turned on (that happened to me the other day...).