I am getting the following Error: INSERT INTO endpoint_global (key, values) VALUES (‘legacyXML’, ‘Y’) – SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘legacyXML’ for key ‘key’::
I am trying to install the Endpoint Manager Module and I am unable to
I am running FreePBX 13.0.190.9 with Asterisk 11.7
Hi Roger,
I believe I have had the same issue as yourself, FreePBX 14.0.1.20
During updates the endpoint module never got past the “Checking Settings and Defaults…” line and has now caused the issue where we had to force the module removal but now cant install it again due to sql duplicate entries.
Did you ever get a resolution to this?
More details below,
Upgrading module ‘endpoint’ from 14.0.2.8 to 14.0.2.8
Downloading module 'endpoint’
Processing endpoint
Verifying local module download…Verified
Extracting…Done
Download completed in 2 seconds
Checking database tables…Done
Migrating tables as required…Done
Checking Settings and Defaults…
I have found another post that talks about deleting the key via sql commands but sql is something i am learning. Here are some commands I have used, hopefully someone can help.
mysql asterisk -e “DELETE FROM endpoint_global WHERE key = “legacyXML”;”
this command complains about
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’
I have tried
mysql asterisk -e “DELETE FROM endpoint_global WHERE ‘key = legacyXML’;”
which gives no error but I unfortunately I am still trying to learn sql a bit more.
Next steps - I have found a command to drop the whole endpoint_global table. might be a bit extreme but gets away from the previous error.
mysql asterisk
SHOW TABLES;
drop table if exists endpoint_global;
SHOW TABLES;
you will see the table has gone.
Now we can try installing endpoint again, however it just sits on the “Checking Settings and Defaults” line, so back to square one.
Try this:
cd /var/www/html/admin/modules/
rm -rf endpoint
fwconsole ma uninstall restart
mysqlcheck --repair --all-databases
fwconsole ma downloadinstall endpoint
fwconsole r
I had the same problem with FreePBX 14 and Asterisk 14 and End Point Manager 14.0.2.8.
While trying installing the module via fwconsole I got this error:
connect asterisk db via commandline: # mysql asterisk
SELECT * FROM endpoint_global
| key | values |
| legacyXML | Y |
1 row in set (0.00 sec)
This was the only entry in that table.
So I delete this entry with “DELETE FROM endpoint_global;”
After that I did “fwconsole ma downloadinstall endpoint”
After a while the End Point Manager was installed successfully.
Downloading module 'endpoint’
Processing endpoint
Verifying local module download…Verified
Extracting…Done
Download completed in 5 seconds
Checking database tables…Done
Migrating tables as required…Done
Checking Settings and Defaults…Done
Generating Configs…Done
Downloading Firmware…Done (Background)
Generating CSS…Done
Module endpoint successfully installed
Updating Hooks…Done
Enjoy