Context
Problem
When starting Trino (or Starburst) with the Aerospike connector, the server logs show multiple versions of the trino-aerospike connector being loaded.
For example:
grep -i trino-aerospike server.log
2023-06-07T14:35:56.503-0400 DEBUG main io.trino.server.PluginManager /var/lib/starburst/plugin/aerospike/trino-aerospike-4.2.1-391-services.jar
2023-06-07T14:35:56.503-0400 DEBUG main io.trino.server.PluginManager /var/lib/starburst/plugin/aerospike/trino-aerospike-4.2.1-391.jar
2023-06-07T14:35:56.503-0400 DEBUG main io.trino.server.PluginManager /var/lib/starburst/plugin/aerospike/trino-aerospike-4.2.2-391-services.jar
2023-06-07T14:35:56.503-0400 DEBUG main io.trino.server.PluginManager /var/lib/starburst/plugin/aerospike/trino-aerospike-4.2.2-391.jar
2023-06-07T14:35:56.503-0400 DEBUG main io.trino.server.PluginManager /var/lib/starburst/plugin/aerospike/trino-aerospike-4.3.0-391-services.jar
2023-06-07T14:35:56.503-0400 DEBUG main io.trino.server.PluginManager /var/lib/starburst/plugin/aerospike/trino-aerospike-4.3.0-391.jar
Method
Explanation
Trino loads plugins by scanning the plugin directory and loading all JAR files found within each plugin folder.
If multiple versions of the Aerospike connector JAR files exist in the plugin directory, Trino may attempt to load more than one version of the connector.
This can lead to unexpected behavior, dependency conflicts, or connector initialization failures.
To ensure proper operation, only a single version of the Aerospike connector should be present in the plugin directory.
Resolution
Verify the contents of the Aerospike plugin directory:
ls -l /var/lib/starburst/plugin/aerospike/
If multiple versions of the connector are present, remove the older versions and keep only the desired version.
For example:
rm /var/lib/starburst/plugin/aerospike/trino-aerospike-4.2*
rm /var/lib/starburst/plugin/aerospike/trino-aerospike-4.3*
If all are removed, reinstall the desired connector version into the plugin directory.
After confirming a single connector version is installed, restart the Trino or Starburst server.
Verify that only one version of the connector is visible in the logs after startup, for example:
grep -i trino-aerospike server.log
2023-06-07T14:35:56.503-0400 DEBUG main io.trino.server.PluginManager /var/lib/starburst/plugin/aerospike/trino-aerospike-4.3.0-391.jar