Error when updating plugins

Error when updating plugins

by Darren Oakley -
Number of replies: 5

Hi,

I am relatively new at using Moodle, but have managed to get a site up and running by reading these forums and the documents. Most problems I have faced there has been a solution to, but now I am a bit stumped.

I am using 3.0+ (Build: 20151204) and for the last year I haven't had any problems. However, when I went to check my plugins for updates I got this error message.

Debug info: 403
Error code: err_response_http_code
Stack trace:
    • line 246 of /lib/classes/update/checker.php: core\update\checker_exception thrown
    • line 124 of /lib/classes/update/checker.php: call to core\update\checker->get_response()
    • line 740 of /admin/index.php: call to core\update\checker->fetch()
I have always updated plugins with no problems or errors. I noticed that the last time there was a check for updates was 27th September. I recently installed a new plugin H5P   https://moodle.org/plugins/mod_hvp. I uninstalled this plugin thinking it may help, but it hasn't helped.

I also get this output on the plugins overview page, not sure if it is helpful.

cURL: Unexpected response

    • line 239 of /lib/classes/update/api.php: call to debugging()
    • line 102 of /lib/classes/update/api.php: call to core\update\api->call_pluginfo_service()
    • line 1054 of /lib/classes/plugin_manager.php: call to core\update\api->get_plugin_info()
    • line 1560 of /lib/classes/plugin_manager.php: call to core_plugin_manager->get_remote_plugin_info()
    • line 1475 of /admin/renderer.php: call to core_plugin_manager->available_updates()
    • line 328 of /admin/renderer.php: call to core_admin_renderer->plugins_overview_panel()
    • line 216 of /admin/plugins.php: call to core_admin_renderer->plugin_management_page()
I am guessing that I can still update manually, but haven't tried yet. I would like to fix this underlying problem though.

Can anyone help?

Thanks

Average of ratings: -
In reply to Darren Oakley

Re: Error when updating plugins

by Ken Task -
Picture of Particularly helpful Moodlers

Errot 403 ... if an apache (assuming you are running apache) is an access denied code.  When checking updates your server checks wtih moodle.org servers for not only core versions but also any plugins you might have installed.

So ... check error logs of (apache) server.  If behind a firewall/filtering service ask the folks that manage/maintain those IF rules in the firewall/filtering service have changed OR if they can see blocks preventing your server from talking to Moodle.org.

Just about everything now wants to talk https ... is your sever talking https?  Certs good?  Certs expired? Moodle 'store' services would like to talk https.   You might have to acquire  cert mentioned:

https://docs.moodle.org/24/en/SSL_certificate_for_moodle.org

Also, the checking is done via curl calls IF I am not mistaken ... got php-curl and curl installed and functioning?  If a Linux server you could test the exchange of curl request from your server to moodle.org via command line curl - as root user curl -I URL for the Moodle server.

'spirit of sharing', Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: Error when updating plugins

by Darren Oakley -

Okay, thanks for your quick and detailed response. I have the Moodle installed on a hosting service and therefore this is not something I can change. I will contact them and see what they say. I'm guessing I will have to pay more for https. If I leave things as they are, will this have any effect on the functionality of my Moodle in the long run? I can update the plugins manually if necessary, but am worried that not fixing this may lead to other errors down the line. 

Thanks.

In reply to Darren Oakley

Re: Error when updating plugins

by Ken Task -
Picture of Particularly helpful Moodlers

Since you've now mentioned remotely hosted with some hosting provider, suggest contacting them about testing curl from the server upon which your Moodle resides.

Obviously, if you leave things status quo, mdeploy (updating of plugins the easy way) will continue to be a problem until resolved.    Then the questions might become other things one could do before that one cannot do now.    Sooooooo ...

As far as https ... that's not a requirement (yet), but many browser makers, other sites, etc. are leaning towards pushing it's adoption ... soooooo.

Yes, you have a purchase a certificate from a CA but maybe your hosting provider has something in place to help customers in this area.   They might have to install the cert for you.

Now, since it is remotely hosted, again check with hosting provider ...

That first line of debug relates to this:

$curlinfo = $curl->get_info();
  if ($curlinfo['http_code'] != 200) {
  throw new checker_exception('err_response_http_code', $curlinfo['http_code']);

If you can't do a curl check on your server, ask the hosting provider to do it for you.

'spirit of sharing', Ken


In reply to Ken Task

Re: Error when updating plugins

by Darren Oakley -

Thank you very much for your help and support. Moodle is a bit intimidating at times, but the support on this forum really makes it easier. 

In reply to Darren Oakley

Re: Error when updating plugins

by Ken Task -
Picture of Particularly helpful Moodlers

Welcome.  Hope provider can fix/find a solution.

Yes ... Moodle is and has always been a 'different beast' but that's really 'our' faults .... 'we' want it to do more ... requires more. ;)

'spirit of sharing', Ken