How To Solve Issues Related to Log – The repository location is missing; it should point to a shared file system location that is available on all master and data nodes

Prevent ES settings related problems

Check if your ES issues are caused from misconfigured settings

Resolve Issue

Updated: Feb-20

In Page Navigation (click to jump) :
Troubleshooting Background       
Related Issues  
Log Context
About Opster

Opster Offer’s World-Class Elasticsearch Expertise In One Powerful Product
Try Our Free Check-Up   Prevent Incident

Troubleshooting background

To troubleshoot Elasticsearch log “The repository location is missing; it should point to a shared file system location that is available on all master and data nodes” it’s important to understand common problems related to Elasticsearch concepts: discovery-file, master, repositories, repository-azure. See detailed explanations below complete with common problems, examples and useful tips.

Repository in Elasticsearch

What it is

An Elasticsearch snapshot provides a backup mechanism that takes the current state and data in the cluster and saves it to a repository (read the Glossary term Snapshot for more information). The backup process requires a repository to be created first. The repository needs to be registered using the _snapshot endpoint, and multiple repositories per cluster can be created. The following repository types are supported. 

Repository Types:
Repository TypeConfiguration Type
Shared file systemType: “fs”
S3Type : “s3”
HDFSType :“hdfs”
AzureType: “azure”
Google Cloud StorageType : “gcs”
Examples

To register a repository of type fs:

PUT _snapshot/my_repo_01
{
"type": "fs",
"settings": {
"location": "/mnt/my_repo_dir"
  }
}
Notes and common problems
  • S3, HDFS , Azure and Google Cloud requires a relevant plugin to be installed before it can be used for a snapshot.
  • The setting, path.repo: /mnt/my_repo_dir needs to be added to elasticsearch.yml on all the nodes in case you are planning to use repo type of file system otherwise it will fail
  • In case of using remote repositories , the network bandwidth and repository storage throughput should be high enough to complete the snapshot operations normally , otherwise you will end up in partial snapshots.


To help troubleshoot related issues we have gathered selected Q&A from the community and issues from Github , please review the following for further information :

1 Issue Help Snapshot Creation Failur  

2 Github Issue Number 7980    


Log Context

Log ” the repository location is missing; it should point to a shared file system location that is available on all master and data nodes” classname is FsRepository.java
We have extracted the following from Elasticsearch source code to get an in-depth context :

     public FsRepository(RepositoryName name; RepositorySettings repositorySettings; IndexShardRepository indexShardRepository; Environment environment) throws IOException {
        super(name.getName(); repositorySettings; indexShardRepository);
        Path locationFile;
        String location = repositorySettings.settings().get("location"; settings.get("repositories.fs.location"));
        if (location == null) {
            logger.warn("the repository location is missing; it should point to a shared file system location that is available on all master and data nodes");
            throw new RepositoryException(name.name(); "missing location");
        }
        locationFile = environment.resolveRepoFile(location);
        if (locationFile == null) {
            if (environment.repoFiles().length > 0) {






About Opster

Incorporating deep knowledge and broad history of Elasticsearch issues. Opster’s solution identifies and predicts root causes of Elasticsearch problems, provides recommendations and can automatically perform various actions to manage, troubleshoot and prevent issues.

Learn more: Glossary | Blog| Troubleshooting guides | Error Repository

Need help with any Elasticsearch issue ? Contact Opster

Did this page help you?