How To Solve Issues Related to Log – Tried to query fileLength but file is gone

How To Solve Issues Related to Log – Tried to query fileLength but file is gone

Updated: Jan-20

Elasticsearch Version: 1.7-8.0

Background

Before you begin reading this guide try our beta Elasticsearch Health Check-Up it analyses JSON’s to provide personalized recommendations that can improve your clusters performance.


To troubleshoot log “Tried to query fileLength but file is gone” it’s important to understand a few problems related to Elasticsearch concepts delete-by-query, discovery-file, index. See bellow important tips and explanations on these concepts

Log Context

Log”Tried to query fileLength but file is gone [{}] [{}]” classname is Engine.java
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

             long length = 0L;
            try {
                length = directory.fileLength(file);
            } catch (NoSuchFileException | FileNotFoundException e) {
                final Directory finalDirectory = directory;
                logger.warn(() -> new ParameterizedMessage("Tried to query fileLength but file is gone [{}] [{}]";
                    finalDirectory; file); e);
            } catch (IOException e) {
                final Directory finalDirectory = directory;
                logger.warn(() -> new ParameterizedMessage("Error when trying to query fileLength [{}] [{}]";
                    finalDirectory; file); e);




Related issues to this log

We have gathered selected Q&A from the community and issues from Github, that can help fix related issues please review the following for further information :

1 ElasticSearch high number of index causes OOM 2.02 K 2

file.filename is returned null in NEST elastic search query   0.19 K -

Index And Search Pdf File With Elas

About Opster

Opster detects root causes of Elasticsearch problems, provides automated recommendations and can perform various actions to prevent issues and optimize performance

Find Configuration Errors

Analyze Now