Cannot delete model as it is still referenced by ingest processors – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.6-7.15

Briefly, this error occurs when you try to delete a machine learning model in Elasticsearch that is still being used by ingest processors. The model cannot be deleted because it’s currently in use. To resolve this issue, you can either stop the ingest processors that are using the model or reconfigure them to use a different model. After doing so, you should be able to delete the model without encountering this error.

This guide will help you check for common problems that cause the log ” Cannot delete model [{}] as it is still referenced by ingest processors ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, delete.

Log Context

Log “Cannot delete model [{}] as it is still referenced by ingest processors” class name is TransportDeleteTrainedModelAction.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 String id = request.getId();
 IngestMetadata currentIngestMetadata = state.metadata().custom(IngestMetadata.TYPE);
 Set referencedModels = getReferencedModelKeys(currentIngestMetadata; ingestService);  if (referencedModels.contains(id)) {
 listener.onFailure(new ElasticsearchStatusException("Cannot delete model [{}] as it is still referenced by ingest processors";
 RestStatus.CONFLICT;
 id));
 return;
 }

 

 [ratemypost]

Opster
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.