Why are plugins not being properly loaded?

Subject 

How to address an issue where user plugins are not properly loaded, corrupted, or need to be permanently removed

Affected Versions

5.11.x and below

Description

A known issue in Artifactory can result in Artifactory not propagating user plugins and/or dependencies correctly.  Loading a plugin on a primary node involves committing the contents of $ARTIFACTORY_HOME/etc/plugins to the database, where it is deployed to the secondary nodes.  A missed delete event means that the objects still reside in the database, where the plugin will continue to be loaded despite being "deleted".  Corruption while the files are being extracted from the database can cause the Plugins on the secondary nodes to fail.

These are some symptoms of these issues:

  • reload plugin API does not appear to have effect on secondary nodes
  • Deleting a plugin on the primary node does not appear to propagate the change to the secondary node.
  • Attempting to execute a plugin on a secondary fails while the primary works.
  • Running sha1sum on plugin files and comparing the results between the primary and secondary nodes return different checksums

Resolution

Deleting the plugin
In order to permanently delete the plugins you must remove the plugin from both the plugins folder which is under Art_home/etc/plugins and from the Artifactory instance database.
In the database of your Artifactory instance go to: Apps → Tables → Configs 

 


Delete the related files in this table and reload the plugins on each node. For example, if your plugin generated files with cat in the name then you may find and delete all of those like
delete from configs where CONFIG_NAME like '%cat%';

You may need to delete it using upper case, too
delete from configs where CONFIG_NAME like '%Cat%';

Corrupted Plugin Dependencies
If the checksums of the plugin dependencies do not match between the primary and secondary node, the delete above may not resolve your issue.

The workaround for this is to manually redeploy dependencies $ARTIFACTORY_HOME/etc/plugins/libs under a different name. Do not delete the original corrupted dependencies

  • Make a copy of the original plugin dependencies
  • Rename these dependencies to to something different
  • move these renamed files to each secondary node's $ARTIFACTORY_HOME/etc/plugins/libs
  • Do not delete the original corrupted dependencies