Commercial Endpoint Manager will not update

Evening/Morning All,

while doing a batch of updates this evening, I got “stuck” trying to update the endpoint manager. The webGUI will download and untar the file, but then the screen pop just says “Listen 80” and nothing else happens, even after 1 hour.

SO I tried again, via CLI, and now I get:

[root@pbx ~]# /var/lib/asterisk/bin/module_admin upgrade endpoint
Downloading 1096769 of 1096769 (100%)

Untaring…Done
Module endpoint successfully downloaded
PHP Fatal error: Cannot redeclare endpoint_systype() (previously declared in /var/www/html/admin/modules/endpoint/functions.inc/functions_license.php:5) in /var/www/html/admin/modules/endpoint/functions.inc/functions_license.php on line 0

Luckily, all of my phones are currently provisioned, so it is not pressing, but I dislike seeing the constant reminder that there is a pending update…

Thoughts?

Thanks for the info Parnassus. I tried like you stated, but now I am getting a different error:

[root@pbx bin]# ./module_admin -f upgrade endpoint
WARNING: “force” is enabled, it is possible to create problems
Downloading 1097126 of 1097126 (100%)

Untaring…Done
Module endpoint successfully downloaded
/bin/mkdir: cannot create directory /tftpboot/images': File exists /bin/mkdir: cannot create directory/tftpboot/images/originals’: File exists
/bin/mkdir: cannot create directory /tftpboot/images/formatted': File exists /bin/mkdir: cannot create directory/tftpboot/firmwaredownloads’: File exists
PHP Fatal error: Allowed memory size of 104857600 bytes exhausted (tried to allocate 118 bytes) in /var/www/html/admin/modules/endpoint/install/basefilefix.php on line 11

I highly doubt it is a real memory issue, as this machine has 72Gb RAM, and only using 10% of it…

Thoughts?

PHP memory limit I guess? Clearly it’s not a system’s RAM limit.

Is your memory_limit = 128M in /etc/php.ini?

I think that value (128M) it’s the FreePBX Distro PHP 5.3.3’s classic default.

I don’t know if other PHP parameters like (e.g.) realpath_cache_ttl (= 120) and realpath_cache_size (= 16k) could (or should) be adapted/tweaked in your case.

Looking at /etc/php.ini of FreePBX Distro 5.211.65-6 (I speak for my system) they’re commented out.

Regards.

Happened to me too (endpoint 2.11.0.1.36 -> 2.11.0.1.37) on FreePBX Distro 5.211.65-5.

A glitch?

[root@freepbx ~]# /var/lib/asterisk/bin/module_admin upgrade endpoint Downloading 1096769 of 1096769 (100%)

Untaring…Done
Module endpoint successfully downloaded
PHP Fatal error: Cannot redeclare endpoint_systype() (previously declared in /var/www/html/admin/modules/endpoint/functions.inc/functions_license.php:5) in /var/www/html/admin/modules/endpoint/functions.inc/functions_license.php on line 0

If I check upgrades through CLI (showupgrades) the system doesn’t show any pending one despite that EPM’s PHP fatal error message.

If I force the upgrade of endpoint once again (after “amportal chown” and “amportal a r”) it upgrades itself without any PHP fatal error message and the FreePBX EPM web page looks good as usual.

Editing the file /etc/php.d/freepbx.ini and changing the value memory_limit from 100 to 256 fixed this issue in my installation. Had to restart apache, but then it worked.

No (that) freepbx.ini on FreePBX Distro.