Modul Update problems

Hi all,
I have just install FreePbx iso (FreePBX-4.211.64-7-x86_64-Full-1379605000.iso).
All work great but I cant update modules.
When I try updating I get this error:
Unable to connect to servers from URLs provided: http://mirror1.freepbx.org/modules/release/2.11/asterisk-cli-2.11.0.0.tgz?installid=9fca235e82583a986c3333bfd1dc251a&brandid=freepbxdistro&astver=11.5.1&phpver=5.3.3&distro=unknown&distrover=unknown&ucount=1

I have an http proxy on my network but I set it on Linux, I’m able to download the above file trought wget or curl.

Someone can help me ?

Thanks
Alessandro

Read here: it might be helpful.

Try to set “Use wget For Module Admin” parameter to “True” (Default value: “False”): you can find it on the “Settings” -> “Advanced Settings” -> “GUI Behaviour” section.

Help Tips:

"Module Admin normally tries to get its online information through direct file open type calls to URLs that go back to the freepbx.org server. If it fails, typically because of content filters in firewalls that do not like the way PHP formats the requests, the code will fall back and try a wget to pull the information. This will often solve the problem. However, in such environment there can be a significant timeout before the failed file open calls to the URLs return and there are often 2-3 of these that occur. Setting this value will force FreePBX to avoid the attempt to open the URL and go straight to the wget calls.

Default Value: False
Internal Name: MODULEADMINWGET"

2 Likes

I’ve already tried what you wrote and also what is written in the post but without results.
Any idea ?

Thanks

Does a simple CLI “yum upgrade” works as expected?
Does a simple CLI “module_admin showupgrades” (or “module_admin install nameoftheFreePBXmodule”) works as expected behind the HTTP Proxy set on your FreePBX Distro?

Hi Parnassus,
yum update -> work
module_admin showupgrades -> work

But:
module_admin upgrade queues
The following error(s) occured:

Thanks
Alessandro

That URL appears to be quite OK (but the system from which I’m trying is not behind any Proxy).

What is the result of:

/var/lib/asterisk/bin/module_admin info queues

and then:

/var/lib/asterisk/bin/module_admin upgrade queues

Davide.

/var/lib/asterisk/bin/module_admin info queues
rawname: queues
repo: standard
name: Queues
version: 2.11.0.4
publisher: FreePBX
license: GPLv2+
category: Applications
description: Creates a queue where calls are placed on hold and answered on a first-in, first-out basis. Many options are available, including ring strategy for agents, caller announcements, max wait times, etc.
changelog:
2.11.0.4 #6333, adds advanced settings for default starting Queue Event values.
2.11.0.3 add gotodest splicing label
2.11.0.2 remove some dialplan warnings
2.11.0.1 #4767, #6084, #5895, #6092
2.11.0.0 #6051
2.10.0.6 #5844
2.10.0.5 #5680
2.10.0.4 #5596, #5271, #5360
2.10.0.3 #5456, #5563, #5564
2.10.0.2 re #5546 - re-add periodic annouce
2.10.0.1 #5456
2.10.0.0 new version changes
2.9.0.12 #5000
2.9.0.11 #4977

    depends: 
       version: 2.5.0alpha1
        module: recordings ge 3.3.8
        module: core ge 2.6.0beta1
  menuitems: 
        queues: Queues
   popovers: 
        queues: 
          display: queues
   location: release/2.11/queues-2.11.0.3.tgz
     md5sum: 0d88dfd4a493985c2819b7880f843b20
displayname: Queues
      items: 
        queues: 
             name: Queues
             type: setup
         category: Applications
             sort: 0
    needsenginedb: yes
     status: Enabled
  dbversion: 2.11.0.4

/var/lib/asterisk/bin/module_admin upgrade queues
The following error(s) occured:

Definitely would be an issue with Apache (httpd) and its export http_proxy and export ftp_proxy variables.

Are them yet provisioned?

Did you tried to export them via CLI by doing:

export http_proxy=http://proxyusername:proxypassword@proxyipaddress:proxyport/
export ftp_proxy=http://proxyusername:proxypassword@proxyipaddress:proxyport/

(eventually omitting proxyusername:proxypassword if you haven’t set them on the Proxy).

and then perform a module upgrade via GUI or via Shell through the usual module_admin command?

I cant use ftp but I put export http_proxy=[…] in /etc/profile and in /etc/bashrc also

Obviously relevant deamons (httpd in primis) were restarted yet? What about httpd logs and freepbx logs during those attempts?

I have restarted all, also the system.
No trace on httpd log, in asterisk dbuf log:
2000-Oct-17 13:00:25 /var/www/html/admin/functions.inc.php:506
[WARNING]: fsockopen(): unable to connect to mirror1.freepbx.org:80 (Connection timed out)

Year 2000?

Is NTP running or not?

I make a change on /var/www/html/admin/functions.inc.php line 506
Change:@$fp=fsockopen($host, $port, $errno, $errstr, 10);
In: @$fp=fsockopen(PROXYIP,PROXYPORT, $errno, $errstr, 10);

And all upgrades go on

Hi!
Anyone has found any solution for this problem?
I was installing updating my system without problems. Today I got the message that Queue has a new version, and I tried to install it. The same error:
Please wait while module actions are performed

Downloading queues Error(s) downloading queues:
Unable to connect to servers from URLs provided: http://mirror1.freepbx.org/modules/release/2.11/queues-2.11.0.10.tgz?installid=ac4e91d7dbf339c9a42c1fb28a351ee4&type=vmware&astver=11.5.0&phpver=5.3.3&distro=unknown&distrover=unknown&fpbxver=2.11.0&ucount=18,http://mirror2.freepbx.org/modules/release/2.11/queues-2.11.0.10.tgz?installid=ac4e91d7dbf339c9a42c1fb28a351ee4&type=vmware&astver=11.5.0&phpver=5.3.3&distro=unknown&distrover=unknown&fpbxver=2.11.0&ucount=18

I am not behind a proxy. My dns is okay. I can resolve mirror1.freepbx.org , etc.

Today, before a try to update this module, I just compile dahdi that was’t compiled. However, I still am reaching the internet. It is not my network broken.

This is my second centos 6.4 / Freepbx 2.11 / Asterisk 11 getting this problem.

Freepbx/Schmooze, any tip?

Thanks,
Denilson

I just ran this same update on the same versions as you with no problem, give it another try, could have been a glitch in the matrix, or an issue with one of the mirrors.

i had the same problems with a FreePBX behind a proxy.

First i added the line http_proxy = http://proxy.company.tld:1234/ to /etc/wgetrc, so wget is able to use the proxy.
Then i had to set MODULEADMINWGET to true, as parnassus described above.
But this did not work anymore, because in module.functions.php there is called a function get_headers_assoc() before downloading any updates. This function uses fsockopen and ignores any proxysettings.

As afferaz wrote in his post you have to edit the get_headers_assoc() in functions.inc.php and set the $host and $port to the proxy settings, so fsockopen queries the proxy instead of the webserver.
Unfortunately, this will be overwritten with the next framework update.
So it would be nice, if the developers would fix this bug and take care about proxysettings.

You can always file a bug http://issues.freepbx.org/browse/FREEPBX