Failed to install Elasticsearch via Maven

If library dependencies are already installed, it can result in a library installation failure.

Written by ankitha.vijayanandana

Last published at: March 17th, 2023

Problem

You are trying to install Elasticsearch via Maven when you get a DRIVER_LIBRARY_INSTALLATION_FAILURE error message saying that the library resolution failed.

Error Code: DRIVER_LIBRARY_INSTALLATION_FAILURE. Error Message: Library resolution failed. Cause: java.lang.RuntimeException: org.slf4j:slf4j-api download failed.

Cause

The Elasticsearch library is trying to install dependencies that are already installed, resulting in a conflict.

Solution

This can be resolved by excluding the dependencies before starting the install.

  1. Select Compute from the left side menu.
  2. Click on the name of the cluster you want to modify.
  3. Click Libraries.
  4. Click Install new.
  5. Click Maven.
  6. Enter org.elasticsearch:elasticsearch-spark-30_2.12:7.17.6 in the Coordinates text box.
  7. Enter commons-logging:commons-logging,org.slf4j:slf4j-api,com.google.protobuf:protobuf-java,javax.xml.bind:jaxb-api in the Exclusions text box.Maven install library screen with Elasticsearch and the necessary exclusions entered.
  8. Click Install.

You should now be able to start your cluster and successfully complete the Elasticsearch install.

Was this article helpful?