error updating plugins

error updating plugins

by Yong Ra -
Number of replies: 11

I am trying to upgrade plugins from "plugins overview" page, but getting error. This particular one is for a theme. Here is the debug error message.

Debugging output enabled
cURL request for "https://moodle.org/plugins/download.php/10165/theme_academi_moodle30_2015122500.zip" failed, HTTP response code: HTTP/1.1 403 Forbidden

Anyone know why this might happen?


Thank you,


Ra

Average of ratings: -
In reply to Yong Ra

Re: error updating plugins

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Are you behind a firewall that may be blocking this connection?

It just worked for me, so perhaps try again now. 

In reply to Howard Miller

Re: error updating plugins with 3.0.1

by Yong Ra -

I am behind a firewall. My school uses proxy server for all http and https access. I do have the correct web proxy setting entered under server. It used to work before 3.0.1.


Thank you,


(Edited by Mary Cooch  to change the title- original submission Wednesday, 6 January 2016, 2:14 PM)

In reply to Yong Ra

Re: error updating plugins with 3.0.1

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Just following up on this on behalf of Yong - do we presume the fact that his organisation is behind a proxy server is what is preventing him updating plugins? And is there a reason why that should have worked previously and not now with 3.0.1?

Yong - are your sites registered with Moodle? (so I can check if they are accessible)

In reply to Yong Ra

Re: error updating plugins with 3.0.1

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

I would double check the settings.  There should be no reason just from the upgrade unless 3.0 brought in some additional settings for proxies.

Are you sure that nothing changed on the network? 

In reply to Emma Richardson

Re: error updating plugins with 3.0.1

by Yong Ra -

That is what I thought at first. 

But if it was firewall issue (proxy), I should not be able to install other part using the GUI. But, I am able to install language packs. I do have the proxy server setting under http section and double checked it. I also have version 2.9 running and that has no problem getting the updates behind same proxy server. It is only the 3.0.x versions that I have running have the problem installing plug-ins from the manage plugins page.

In reply to Yong Ra

Re: error updating plugins

by Joël Schmid -

I got the same error after upgrading from version 2.7 to 3.1. Disabling the operating system's firewall and opening up all ports to the internet didn't solve the issue. I'm able to run the curl command on the command line (cent os) but using Moodle it's not working. Any ideas what could cause this error?

In reply to Joël Schmid

Re: error updating plugins

by Ken Task -
Picture of Particularly helpful Moodlers

I don't re-call the details, but an update to curl in CentOS was a frapped.   Did affect apache/php related curl. Solution at the time was to use yum to downgrade it until a proper fix made available.   An update was available later and things are back to 'normal'.   

So have you updated your CentOS?

'spirit of sharing', Ken

In reply to Ken Task

Re: error updating plugins

by Joël Schmid -

Hey Ken,

Thank you for the information. We have CentOS up to date running version 7.2. 

However I figured out that Updating Plugins works after the second or third try... I have no idea what is causing this behaviour but after two/three times pressing the "Install this Update" button, it works... big grin We had this behaviour on Moodle 2.7 as well as on Moodle 3.1. 

In reply to Joël Schmid

Re: error updating plugins

by Ken Task -
Picture of Particularly helpful Moodlers

I have had the same behavior from time to time.   Like you, as long as it eventually works, don't worry about it ... but ...

If your server was a 2.7 and upgraded to a 3.1, the updates server at Moodle might not have updated what it tracks for your server's version and if your server is running https:// now or not - same page where the install button is on downloads at moodle.org there is a gear icon that let's you edit your server info (I have multiple servers and have to select the right one so Moodle knows which box it's headed back to).

Also, CloudFlare sits in front of Moodle.org.   Ever get the 'Oops! ... blah, blah, blah ... something wrong with the Internet' error screen?    That one coming from ClouldFlare ... not Moodle.   As I understand CloudFlare there are 'rays' for different segments of the globe ... where I come from (USA) in on is a 'clouldflare ray' for NorthAmerica.   Sometimes there are hickups with that.   You don't see errors, just failures with no indication of what the issue is.   However, next time you have to go after an update, before you do turn on debugging and see what shows up.

A long time ago there was an issue with exchange of certificates ... I have servers that are still not running https.    Had to acquire the Moodle.org cert offered by Moodle to place in the root of the data directory to facilitate an https server (theirs) talking to a http server (the one I was installing/upgrading plugins upon.   That has helped.

So .... ????

'spirit of sharing', Ken

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

Re: error updating plugins

by Joël Schmid -

Thank you for the information. 

As I said, most of the time it's working after the second try, you just have to know that and give it another try, otherwise you can loose hours in researching the issue... smile Debugging was turned on but it doesn't help a lot. All of our servers are running https. 


In reply to Yong Ra

Re: error updating plugins

by Paul F -

I've been experiencing this issue - it's due to SSL peer verification.

If you edit the file /lib/filelib.php and comment out the line that sets CURLOPT_SSL_VERIFYPEER then this should resolve the issue like so:

    if ($skipcertverify) {
        $options['CURLOPT_SSL_VERIFYPEER'] = false;
    } else {
//        $options['CURLOPT_SSL_VERIFYPEER'] = true;
    }

The reason it's intermittently working is probably due to multiple server nodes being used to host the plugins.  If you get one with an SSL certificate that CURL likes, then it will work.  If you get one with a problem cert, then you get the error.

I suppose really we should set $skipcertverify in the function definition of the file, but the outcome is the same.

function download_file_content($url, $headers=null, $postdata=null, $fullresponse=false, $timeout=300, $connecttimeout=20, $skipcertverify=true, $tofile=NULL, $calctimeout=false) {
    global $CFG;
Average of ratings: Useful (2)