Article ID: 122844, created on Sep 10, 2014, last review on Sep 10, 2014

  • Applies to:
  • Business Automation 5.5

Symptoms

New custom plug-in PLUGIN was installed in PBA. During configure.pl execution following error appears:

[Wed Sep 10 15:30:29 2014] Updating privileges for PLUGIN
Could not parse ./update_perms.pl: DBD::Pg::st execute failed: ERROR:  duplicate key value violates unique constraint "MethodToPrivilege_PK"
DETAIL:  Key ("MethodID", "PrivilegeID")=(4666, 1212) already exists. at ./update_perms.pl line 101.
Could not do ./update_perms.pl:  at /usr/local/bm/tools/configure.pl line 189.
Could not run ./update_perms.pl at /usr/local/bm/tools/configure.pl line 190.
DBD::Pg::st execute failed: ERROR:  duplicate key value violates unique constraint "MethodToPrivilege_PK"
DETAIL:  Key ("MethodID", "PrivilegeID")=(4666, 1212) already exists. at ./update_perms.pl line 101.
        ...propagated at /usr/local/bm/tools/configure.pl line 191.

Cause

There are dublicate records in /usr/local/bm/conf/PLUGIN.methods.list file.

Resolution

In PBA Home> System> Settings> Security> Privileges add ID column to the list and find privilege with ID from error, in provided example it is:

1212    MANAGE_OWN_DOMAINS_C    Allowes to register, transfer and renew domains. 

Search for reconds with this privilege in PLUGIN.methods.list file, find duplicates:

[root@pba conf]# grep  MANAGE_OWN_DOMAINS_C PLUGIN.methods.list
...
PLUGIN PluginConf TestConnection MANAGE_OWN_DOMAINS_C
PLUGIN PluginConf TestConnection MANAGE_OWN_DOMAINS_C
...

Remove one of duplicate records, so that all records in file are unique and rerun configure.pl.

During PBA updates methods.list files are rewritten, so there might be an error in PLUGIN code that will cause the same issue during its reinstallation. Please, review the code to avoid issue in future.

198398b282069eaf2d94a6af87dcb3ff caea8340e2d186a540518d08602aa065 801221f8cd76fba7300d1e6817c8e08b 92711db0799e8aefe8e51f12dace0496 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF