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 <mss 1460,sackOK,timestamp 24526276 0,nop,wscale 2>
09:17:48.871341 IP 69.41.162.148.www > phone.host.47671: S 228913540:228913540(0) ack 2176121872 win 5792 <mss 1460,sackOK,timestamp 3033402596 24526276,nop,wscale 7>
09:17:48.871402 IP phone.host.47671 > 69.41.162.148.www: . ack 1 win 1460 <nop,nop,timestamp 24526286 3033402596>
09:17:48.871529 IP phone.host.47671 > 69.41.162.148.www: P 1:32(31) ack 1 win 1460 <nop,nop,timestamp 24526286 3033402596>
09:17:49.170845 IP phone.host.47671 > 69.41.162.148.www: P 1:32(31) ack 1 win 1460 <nop,nop,timestamp 24526316 3033402596>
09:17:49.770872 IP phone.host.47671 > 69.41.162.148.www: P 1:32(31) ack 1 win 1460 <nop,nop,timestamp 24526376 3033402596>
09:17:50.970946 IP phone.host.47671 > 69.41.162.148.www: P 1:32(31) ack 1 win 1460 <nop,nop,timestamp 24526496 3033402596>
09:17:53.030233 IP 69.41.162.148.www > phone.host.47671: S 228913540:228913540(0) ack 2176121872 win 5792 <mss 1460,sackOK,timestamp 3033406796 24526286,nop,wscale 7>
09:17:53.030282 IP phone.host.47671 > 69.41.162.148.www: . ack 1 win 1460 <nop,nop,timestamp 24526702 3033406796,nop,nop,sack 1 {0:1}>
09:17:53.371077 IP phone.host.47671 > 69.41.162.148.www: P 1:32(31) ack 1 win 1460 <nop,nop,timestamp 24526736 3033406796>
09:17:58.171346 IP phone.host.47671 > 69.41.162.148.www: P 1:32(31) ack 1 win 1460 <nop,nop,timestamp 24527216 3033406796>
09:18:07.771880 IP phone.host.47671 > 69.41.162.148.www: P 1:32(31) ack 1 win 1460 <nop,nop,timestamp 24528176 3033406796>
09:18:26.972938 IP phone.host.47671 > 69.41.162.148.www: P 1:32(31) ack 1 win 1460 <nop,nop,timestamp 24530096 3033406796>
09:19:05.365066 IP phone.host.47671 > 69.41.162.148.www: P 1:32(31) ack 1 win 1460 <nop,nop,timestamp 24533936 3033406796>
09:19:48.887505 IP phone.host.47671 > 69.41.162.148.www: FP 32:60(28) ack 1 win 1460 <nop,nop,timestamp 24538288 3033406796>
09:19:48.945903 IP 69.41.162.148.www > phone.host.47671: . ack 1 win 46 <nop,nop,timestamp 3033522726 24526286,nop,nop,sack 1 {32:61}>
09:19:53.073958 IP 69.41.162.148.www > phone.host.47671: F 1:1(0) ack 1 win 46 <nop,nop,timestamp 3033526854 24526286,nop,nop,sack 1 {32:61}>
09:19:53.074013 IP phone.host.47671 > 69.41.162.148.www: . ack 2 win 1460 <nop,nop,timestamp 24538706 3033526854>

Any suggestions about where to look?

Thanks,

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

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


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

[email protected]:~$ php -v
PHP 5.1.2 (cli) (built: Jul 17 2007 17:32:48)
Copyright © 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright © 1998-2006 Zend Technologie

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:

[email protected]:/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

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)

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

Hi all,

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

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:

[email protected] ~ $ /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:

[email protected] ~ $ /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.

[email protected] ~ $ 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 © 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. :slight_smile:

Thanks,

Tom

tomm3h,
the line:
[php]

<?php $modules += $modules_online; /* line 142 */ <? [/php] Is a union operator on the two arrays, see: http://www.php.net/manual/en/language.operators.array.php

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 :slight_smile:

Any idea? I’ll try to give as much help as I can :slight_smile:

did you find an answer?

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

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

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.

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

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

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.

[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 © 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright © 1998-2007 Zend Technologies

thanks

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);

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 © 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright © 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