Cannot update modules - the saga continues

22 posts / 0 new
Last post
helpdesk@island...
helpdesk@islandwood.org's picture
Cannot update modules - the saga continues

Good day,

With a fresh install of 2.3 running on top of Asterisk 1.2 on Ubuntu 6.061, Check for updates online returns

Warning: Cannot connect to online repository (mirror.freepbx.org). Online modules are not available.

after considerable conversation between my box and 69.41.162.148 as observed by tcpdump (here's way more than you might want to see)

09:17:48.771614 IP phone.host.47671 > 69.41.162.148.www: S 2176121871:2176121871(0) win 5840
09:17:48.871341 IP 69.41.162.148.www > phone.host.47671: S 228913540:228913540(0) ack 2176121872 win 5792
09:17:48.871402 IP phone.host.47671 > 69.41.162.148.www: . ack 1 win 1460
09:17:48.871529 IP phone.host.47671 > 69.41.162.148.www: P 1:32(31) ack 1 win 1460
09:17:49.170845 IP phone.host.47671 > 69.41.162.148.www: P 1:32(31) ack 1 win 1460
09:17:49.770872 IP phone.host.47671 > 69.41.162.148.www: P 1:32(31) ack 1 win 1460
09:17:50.970946 IP phone.host.47671 > 69.41.162.148.www: P 1:32(31) ack 1 win 1460
09:17:53.030233 IP 69.41.162.148.www > phone.host.47671: S 228913540:228913540(0) ack 2176121872 win 5792
09:17:53.030282 IP phone.host.47671 > 69.41.162.148.www: . ack 1 win 1460
09:17:53.371077 IP phone.host.47671 > 69.41.162.148.www: P 1:32(31) ack 1 win 1460
09:17:58.171346 IP phone.host.47671 > 69.41.162.148.www: P 1:32(31) ack 1 win 1460
09:18:07.771880 IP phone.host.47671 > 69.41.162.148.www: P 1:32(31) ack 1 win 1460
09:18:26.972938 IP phone.host.47671 > 69.41.162.148.www: P 1:32(31) ack 1 win 1460
09:19:05.365066 IP phone.host.47671 > 69.41.162.148.www: P 1:32(31) ack 1 win 1460
09:19:48.887505 IP phone.host.47671 > 69.41.162.148.www: FP 32:60(28) ack 1 win 1460
09:19:48.945903 IP 69.41.162.148.www > phone.host.47671: . ack 1 win 46
09:19:53.073958 IP 69.41.162.148.www > phone.host.47671: F 1:1(0) ack 1 win 46
09:19:53.074013 IP phone.host.47671 > 69.41.162.148.www: . ack 2 win 1460

Any suggestions about where to look?

Thanks,

helpdesk@island...
helpdesk@islandwood.org's picture
Possibly useful additional information

Please excuse my replying to my own post. On the FreePBX System Status page, under FreePBX Notices it says "Cronmanager encountered 1 Errors"

The following commands failed with the listed error
/var/lib/asterisk/bin/module_admin listonline (255)
Added 10 hours, 35 minutes ago
(cron_manager.EXECFAIL)

running /var/lib/asterisk/bin/module_admin listonline by hand returns

Fatal error: Unsupported operand types in /var/lib/asterisk/bin/module_admin on line 140

David

gregmac
gregmac's picture
What version of php do you

What version of php do you have? (run php -v)

---
Greg MacLellan - Core FreePBX Developer
http//freepbx.org - irc.freenode.net #freepbx

---
Greg MacLellan - Core FreePBX Developer
http//freepbx.org - irc.freenode.net #freepbx

helpdesk@island...
helpdesk@islandwood.org's picture
PHP 5.1.2

davidm@ernestine:~$ php -v
PHP 5.1.2 (cli) (built: Jul 17 2007 17:32:48)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologie

helpdesk@island...
helpdesk@islandwood.org's picture
Any further ideas about module updates?

I used the "Install Process for Ubuntu 6.06" instructions from the freepbx.org site, up to the reference to getting the freepbx source from svn:

root@rob-laptop:/usr/src# svn co https://svn.sourceforge.net/svnroot/amportal/freepbx/branches/2.2 freepbx-2.2

Since the above URL isn't alive I downloaded 2.3 from the site and used it. After the install the module update link wouldn't work, and so I manually downloaded the most recent of each module from http://mirror.freepbx.org/modules/release/2.3/ and installed them with the "upload module" option. FreePBX identifies itself as version 2.3.0.3 and there are two issues, 1) the inability to check for updates online and 2) a bug preventing the Recordings tab from working (cf my other thread in this forum) which Phillippe says should be fixed.

Clearly I've done something wrong but I'm at a loss as to where to look. I'll appreciate any advice.

David

Rohan Odendaal
Rohan Odendaal's picture
Cronmanager error

Hi There

I received the following error on my FreePBX asterisk server and have no idea why this error was generated. Could anyone offer me advice on how to resolve this error?

Error: Cronmanager encountered 1 Errors

The following commands failed with the listed error
/var/lib/asterisk/bin/module_admin listonline (255)
Added 5 hours, 11 minutes ago
(cron_manager.EXECFAIL)

p_lindheimer
p_lindheimer's picture
For FreePBX to automatically

For FreePBX to automatically check for module updates it runs that command. That command simply reads the online repository which has the resulting effect of populating and notifications if there are updates available. So for some reason the command failed. You can run the command manually and see what it says. It could have been an internet problem. If you can't updated modules online for some reason then it is related to that.
------------------------------------
Philippe Lindheimer - FreePBX Project Lead
http//freepbx.org - IRC #freepbx

tomm3h
tomm3h's picture
Hi all, Apologies for

Hi all,

Apologies for resurrecting a dead thread, but this is all Google can find for me :)

I'm receiving a similar error above. FreePBX is reporting that, 'Cronmanager encountered 1 errors'. Here it is expanded:

The following commands failed with the listed error
/var/lib/asterisk/bin/module_admin listonline (255)
Added 12 minutes ago
(cron_manager.EXECFAIL)

I'm receiving an e-mail from cron every hour giving me a failure message, but here's a paste of the output of /var/lib/asterisk/bin/module_admin listonline, ran as asterisk:

asterisk@asterisk ~ $ /var/lib/asterisk/bin/module_admin listonline

Fatal error: Unsupported operand types in /var/lib/asterisk/bin/module_admin on line 142

My limited knowledge of coding PHP brought me to inspecting line 142, so here's the particular snippet:

<?php
function showList($online = false) {
$modules_local = module_getinfo();
$modules = $modules_local;
if ($online) {
$modules_online = module_getonlinexml();
$modules += $modules_online; /* line 142 */
}
ksort($modules);
?>

When adding a print $modules, and print $modules_online between lines 141 and 142, I get this output:

asterisk@asterisk ~ $ /var/lib/asterisk/bin/module_admin listonline

Array
Fatal error: Unsupported operand types in /var/lib/asterisk/bin/module_admin on line 145

Which is where I'm stuck: += as an operator expects numerics, and it's not getting them. Is anyone aware of how this might happen? FreePBX runs from Apache2 (ran as asterisk:asterisk) and the /etc/ampuser, /etc/asterisk/manager.conf passwords are all set correctly. I've checked and checked and checked chown/chmod permissions, with no clue as to why this is failing.

FreePBX is version 2.4.1.0.


asterisk@asterisk ~ $ php -v
PHP 5.2.6RC4-pl0-gentoo (cli) (built: May 27 2008 14:28:33)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

asterisk ~ # asterisk -r
Asterisk 1.2.21.1, Copyright (C) 1999 - 2007 Digium, Inc. and others.

(Yes, an old version of Asterisk, but I need to retain it for compatibility - plus, portage has been hugely behind with 1.4 until only recently.)

Any help will be greatly appreciated. :)

Thanks,

Tom

p_lindheimer
p_lindheimer's picture
tomm3h,

tomm3h,
the line:



&lt;?php
$modules += $modules_online;  /* line 142 */
&lt;?

Is a union operator on the two arrays, see:

http://www.php.net/manual/en/language.operators.array.php

tomm3h
tomm3h's picture
Well, thanks for pointing

Well, thanks for pointing out my mistake. Though I'd hasten to add that I (logically) came to this page, first..

Still, whatever the operator does, the script is still failing, as it's not being given what it expects (one variable looks null, as far as I can tell.)

After some odd fiddling, I moved /var/lib/asterisk/bin/retrieve_conf to another location, I was then asked to reload by FreePBX (failed of course) and so I moved the file back. After a reload, calling module_admin listonline worked perfectly.. Once. And thereafter it's back to being broken, with lovely cron errors each hour :)

Any idea? I'll try to give as much help as I can :)

motorbikes
motorbikes's picture
same problem here.

did you find an answer?

netechsys
netechsys's picture
Yet another one of these errors....

Hello. I have a new install of FreePBX that was working fine untill the latest round of updates. I am now getting the same error as notated above. The following commands failed with the listed error /var/lib/asterisk/bin/module_admin listonline (255). When I run from a command line, I get the same error in line 142. I now go back to my original FreePBX box, and run the same command, and it works fine. (Different computer, we are in the process of doing a hardware change. Same configuration, but different Servers.) I can get onto the internet, but this error is there.

Any ideas? I geatly appreciate it!

Terry

netechsys
netechsys's picture
One addition...

One thing I did do to troubleshoot this a bit.. I did a comp between the MODULE_ADMIN from the original box and the current box, and they are the same, so the problem is elsewhere. Sorry for the double post!

Terry

mickecarlsson
mickecarlsson's picture
netechsys What versions of

netechsys
What versions of php are you running on those two boxes?
Do a 'php -v' in a shell on each box and post the outcome here.

Mikael Carlsson
(I am off-line, tinkering with my Chevy and my radios, don't know when I will be back)

netechsys
netechsys's picture
PHP Version

I am running PHP Version 5.1.6 with the Zend Engine of 2.1.0.

mickecarlsson
mickecarlsson's picture
If you run

If you run /var/lib/asterisk/bin/module_admin list
do you get any errors?

Mikael Carlsson
(I am off-line, tinkering with my Chevy and my radios, don't know when I will be back)

netechsys
netechsys's picture
Not now...

I did try the module_admin listonline yesterday, and got the error above. Now, I do not get the error. I will wait and see if the error happens again when CRON runs tonight.

jnewell123
jnewell123's picture
I am having the exact same problem

[trixbox1.localdomain ~]# /var/lib/asterisk/bin/module_admin listonline

Fatal error: Unsupported operand types in /var/lib/asterisk/bin/module_admin on line 142

[trixbox1.localdomain ~]# php -v
PHP 5.2.2 (cli) (built: Oct 15 2007 16:22:11)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

thanks

johnc
johnc's picture
Try this patch

Works for me on Ubuntu Intrepid with php 5.2.6-2ubuntu4. The union operator doesn't handle null operands.

--- module_admin.old 2009-01-29 11:20:53.000000000 +1100
+++ module_admin 2009-01-29 11:21:59.000000000 +1100
@@ -139,7 +139,7 @@
$modules = $modules_local;
if ($online) {
$modules_online = module_getonlinexml();
- $modules += $modules_online;
+ if (isset($modules_online)) $modules += $modules_online;
}
ksort($modules);

bhdamon
bhdamon's picture
Hi All, I'm having the same

Hi All,

I'm having the same problem.

PHP Fatal error: Unsupported operand types in /var/lib/asterisk/bin/module_admin on line 142

PHP 5.1.6 (cli) (built: Jan 21 2009 01:40:08)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

Asterisk 1.4.24

A fresh install by a very fresh admin

johnc - I added your patch, the "+ if (isset...." line, to module-admin and got the below error. If there is anything else I should include, no matter how basic and obvious, please let me know.

PHP Parse error: syntax error, unexpected T_IF in /var/lib/asterisk/bin/module_admin on line 143

The system can ping outside IPs and make test calls, so I don't think it's a connection problem.

Help from anyone is greatly appreciated.

Thanks,

Ben

johnc
johnc's picture
Did you apply the patch correctly?

Ben, sorry for the late reply; I've been away.

It's not clear from your post whether you've applied the patch correctly. After patching, you should have:


$modules = $modules_local;
if ($online) {
$modules_online = module_getonlinexml();
if (isset($modules_online)) $modules += $modules_online;
}
ksort($modules);

i.e. you delete the line that starts with '-' and add the line that starts with '+'.

John

p_lindheimer
p_lindheimer's picture
this issue has already been

this issue has already been fixed in one of the recent framework updates, #3658.