Elastic Search Access denied exception

Hi,

I am using ES 2.4.

while indexing from MongoDb to elastic search by using mongoConnector i got some exception mention below. i am having around 16000 to 20000 records while pushing those records to elastic search after pushing 10000+ records i am getting exception. can any one help on it?

Error:

[2017-10-26 09:48:54,119][WARN ][indices.cluster          ] [Crimson Craig] [[botexecutiondetails][2]] marking and sending shard failed due to [failed to create shard]
[botexecutiondetails][[botexecutiondetails][2]] ElasticsearchException[failed to create shard]; nested: AccessDeniedException[E:\ILCM_PKGS\Elasticsearch\data\elasticsearch\nodes\0\indices\botexecutiondetails\2\index\_34u.fdt];
        at org.elasticsearch.index.IndexService.createShard(IndexService.java:371)
        at org.elasticsearch.indices.cluster.IndicesClusterStateService.applyInitializingShard(IndicesClusterStateService.java:620)
        at org.elasticsearch.indices.cluster.IndicesClusterStateService.applyNewOrUpdatedShards(IndicesClusterStateService.java:520)
        at org.elasticsearch.indices.cluster.IndicesClusterStateService.clusterChanged(IndicesClusterStateService.java:177)
        at org.elasticsearch.cluster.service.InternalClusterService.runTasksForExecutor(InternalClusterService.java:610)
        at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:772)
        at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:231)
        at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:194)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.nio.file.AccessDeniedException: E:\ILCM_PKGS\Elasticsearch\data\elasticsearch\nodes\0\indices\botexecutiondetails\2\index\_34u.fdt
        at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
        at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
        at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
        at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53)
        at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38)
        at sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:193)
        at java.nio.file.Files.readAttributes(Files.java:1737)
        at java.nio.file.Files.size(Files.java:2332)
        at org.apache.lucene.store.FSDirectory.fileLength(FSDirectory.java:210)
        at org.apache.lucene.store.FilterDirectory.fileLength(FilterDirectory.java:67)
        at org.apache.lucene.store.FilterDirectory.fileLength(FilterDirectory.java:67)
        at org.elasticsearch.index.store.Store$StoreStatsCache.estimateSize(Store.java:1541)
        at org.elasticsearch.index.store.Store$StoreStatsCache.<init>(Store.java:1522)
        at org.elasticsearch.index.store.Store.<init>(Store.java:127)
        at org.elasticsearch.index.store.Store.<init>(Store.java:118)
        at sun.reflect.GeneratedConstructorAccessor594.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:50)
        at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)
        at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:104)
        at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:47)
        at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:886)
        at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43)
        at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:59)
        at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:46)
        at org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
        at org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
        at org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
        at org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:104)
        at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:47)
        at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:886)
        at org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43)
        at org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:59)
        at org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:46)
        at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:201)
        at org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)
        at org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:879)
        at org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)
        at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)
        at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
        at org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:154)
        at org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:55)
        at org.elasticsearch.index.IndexService.createShard(IndexService.java:369)
        ... 10 more

Is your data dir on a remote file system ?

Hi Dadoonet,

Thanks for reply, data are in Local system only .

Apparently elasticsearch can not access E:\ILCM_PKGS\Elasticsearch\data\elasticsearch\nodes\0\indices\botexecutiondetails\2\index\_34u.fdt.

I don't know why this is happening. May be @jasontedor has an idea?

It is possible Because of Heap memory issues in ES?? because in 16000 records upto 14000 we didn't face this issue.

I don’t think so.

How about some Virus Protection/Security software?

This is usually the case. When this happens, you have to use a tool like Process Explorer to see what is holding a handle on the file. Of course, you should disable virus scanners on your Elasticsearch data directories.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.