Upgrading/Installing Endpoint Manager crashes FreePBX every time

During a routine upgarde of the endpoint manager the installation process would hang up at the following location in the update window that pops up when you process module updates:

Installing endpoint
Untarring…Done
Checking database table…Done
Migrating tables as required…Done
Checking Settings and Defaults…

At this point the update process freezes, I can’t go back into the UI, and I have to reboot the server.

What might be going on and what log file would I look through to find out where the problem is?

Upgrade from the cli and just wait until it finishes. You can use the GUI in the interim:

fwconsole ma upgrade endpoint

There’s no need to reboot the server. Your php session is locked. If you went to another browser it would work and if you clear your cookies for the server it would also work.

However the way to fix it is upgrade endpoint from edge.

I had removed the epm module since it kept messing up. When attempting to download it I get the following error on the console:

[root@freepbx ~]# fwconsole ma download epm
No repos specified, using: [standard,commercial] from last GUI settings

Downloading module ‘epm’
The following error(s) occured:

  • Retrieved Module XML Was Empty

It then spits me back out to the prompt. What’s going on here?

You can’t just make up commands and expect them to work. The raw name of the commercial Endpoint Manager is endpoint.

1 Like

That would certainly help.

I downloaded it in the console then attempted to install it via the console as well. Here is the error it sent me:

[root@freepbx ~]# fwconsole ma install endpoint
Checking database tables…Done
Migrating tables as required…Done
Checking Settings and Defaults…
In utility.functions.php line 207:

INSERT INTO endpoint_global (key, values) VALUES (‘legacyXML’, ‘Y’) –
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘lega
cyXML’ for key ‘key’::

How do I go about correcting this error?

You have a couple of choices:
The first (and simplest) is for you to delete the entry in the database. I think there’s a database access module now, which can help you get rid of that entry in the table.

If you are SQL savvy, you can delete the entry yourself by logging into the console as ‘root’ and connecting to the database with “mysql -u root asterisk”. Once in, you can type:

delete from endpoint_global where `key` = ‘legacyXML’;

The tick marks around ‘key’ are important because key is a reserved word in MySQL and MariaDB. Restart the install and wait for the next error (if there is one). Since you uninstalled the endpoint module, you could also the the endpoint_global table altogether and let the install program recreate it.

The second is to submit an issues ticket so that the developers can try to get rid of the problem permanently (by using ‘replace’ instead of ‘insert’ or by deleting the table on a new install).

I tried doing it through SQL and got the following error about syntax. I’m not SQL savvy but tried it anyway as I couldn’t find where to edit it in the GUI.

MariaDB [asterisk]> delete from endpoint_global where key = ‘legacyXML’;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘key = ‘legacyXML’’ at line 1

Following as I am having the same issue form moving from FreePBX 13 to SNG7 running asterisks 14

“key” is a protected word

delete from endpoint_global where `key` = ‘legacyXML’;
1 Like

I have the same issue. The SQL command doesn’t seem to work. Any Ideas?

Thanks

If you are having the same issue, the solution should have solved it. That leads me to believe you are, in fact, having a different problem. Standard rules, therefore, apply: Logs and screen shots.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.