EPM 2.11.0.1.11 update (pending) to 2.11.0.1.12 (SOLVED) after an amportal restart and a 2nd try (PHP Fatal Error in between)

I report something strange happened today when updating EPM from 2.11.0.1.11 to 2.11.0.1.12.

Usually I update each Module via CLI, this time the CLI command (module_admin upgrade endpoint) gave me:

[[email protected] ~]# /var/lib/asterisk/bin/module_admin upgrade endpoint Downloading 1010139 of 1010139 (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
[[email protected] ~]#

Then the EPM 2.11.0.1.11 was automatically Disabled (module_admin list) on the system:

endpoint 2.11.0.1.11 Disabled; Pending upgrade to 2.11.0.1.12

And two new FreePBX Notices appeared about two Modules (restapi and restapps) which weren’t locally installed (nor enabled) on the system:

The following new modules are available for download. Click delete icon on the right to remove this notice. restapi (2.11.0.1) restapps (2.11.0.2)

I forced an amportal restart and then I forced the EPM update once again through the usual CLI command (module_admin upgrade endpoint), this time the update completed:

[[email protected] ~]# /var/lib/asterisk/bin/module_admin upgrade endpoint
Downloading 1010139 of 1010139 (100%)
Downloading 1010139 of 1010139 (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

Re-Writing Templates

Templates Rebuilt

Module endpoint successfully installed

SETTING FILE PERMISSIONS
Permissions OK

and, just after another amportal restart, it appears to be finally enabled and updated as should be:

endpoint 2.11.0.1.12 Enabled

I must observe if FreePBX Notice will show something strange again (I acknowledged by deletion the one about restapi/restapps reported above).

parnassus,
We pushed a new version of endpoint, which should resolve the issue you experienced. Can you test the latest module which should be 2.11.0.1.14?

I’m updating now both sysadmin (from 2.11.0.29 to the new 2.11.0.32, I updated the relevant RPM yesterday from 2.6.1-166 to 2.6.1-167 just to be sure the module had the latest RPM installed) and the endpoint (from 2.11.01.12 to the new 2.11.0.1.14) as requested and I confirm the strange behaviour reported yesterday has gone with the wind (the update ended flawlessly and no FreePBX’s notices regarding restapi/restapps appeared):

[[email protected] ~]# /var/lib/asterisk/bin/module_admin upgrade endpoint Downloading 1010229 of 1010229 (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

Re-Writing Templates

Templates Rebuilt

Module endpoint successfully installed

SETTING FILE PERMISSIONS
Permissions OK

P.S.
Is not possible to get rid of the huge amount of log lines:

[PHP-WARNING] (/var/www/html/admin/libraries/xml2Array.class.php:59) - array_push(): Cannot add element to the array as the next element is already occupied

generated into freepbx.log each time a Modules’ update check (via GUI or via CLI, doesn’t matter) is performed?

I ask this to improve Log evaluation/reading and lowering the freepbx.log grow.

At this time it is not a high priority to get rid of those messages.

Yes, I noticed.