# Access Denied while starting elastic search

**URL:** <https://discuss.elastic.co/t/access-denied-while-starting-elastic-search/164550>\
**Category:** Elasticsearch\
**Created:** [January 16, 2019, 10:55pm UTC](https://discuss.elastic.co/t/access-denied-while-starting-elastic-search/164550 "2019-01-16T22:55:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsunish](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsunish/32/39861_2.png) [@jsunish](https://discuss.elastic.co/u/jsunish)\
**Post date:** [January 16, 2019, 10:55pm UTC](https://discuss.elastic.co/t/access-denied-while-starting-elastic-search/164550/1 "2019-01-16T22:55:06Z")

</div>

Hi,  
My elasticsearch-6.4.2 instance was running successfully on Windows 7, until yesterday before I shutdown the windows without shutting down the elastic search instance that was running. Now I am getting 'Access is denied' while trying to start elastic search by running elasticsearch.bat. I am fairly new to it. Any help will be appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 17, 2019, 12:15am UTC](https://discuss.elastic.co/t/access-denied-while-starting-elastic-search/164550/2 "2019-01-17T00:15:29Z")

</div>

Posting the full error, in text, would be ideal.

---

<div class="post-metadata">

**Author:** ![jsunish](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsunish/32/39861_2.png) [@jsunish](https://discuss.elastic.co/u/jsunish)\
**Post date:** [January 17, 2019, 12:35pm UTC](https://discuss.elastic.co/t/access-denied-while-starting-elastic-search/164550/3 "2019-01-17T12:35:11Z")

</div>

This is what I can find from the bitdefender which is blocking the running  
On-Access scanning has detected an execution of a malicious command line. The process  
C:\Program Files\Java\jdk1.8.0\_101\bin\java.exe was blocked because of the execution of a malicious command line  
-Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75  
-XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true  
-XX:-OmitStackTraceInFastThrow  
-Dio.netty.noUnsafe=true  
-Dio.netty.noKeySetOptimization=true  
-Dio.netty.recycler.maxCapacityPerThread=0  
-Dlog4j.shutdownHookEnabled=false  
-Dlog4j2.disable.jmx=true  
-Djava.io.tmpdir=C:\Users\<user\_name\>\AppData\Local\Temp\elasticsearch  
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=data  
-XX:ErrorFile=logs/hs\_err\_pid%p.log -XX:+PrintGCDetails  
-XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution  
-XX:+PrintGCApplicationStoppedTime -Xloggc:logs/gc.log  
-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=32  
-XX:GCLogFileSize=64m  
-Delasticsearch  
-Des.path.home="C:\elasticsearch-6.4.2"  
-Des.path.conf="C:\elasticsearch-6.4.2\config"  
-Des.distribution.flavor="default"  
-Des.distribution.type="zip"  
-cp "C:\elasticsearch-6.4.2\lib\*" "org.elasticsearch.bootstrap.Elasticsearc

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [January 17, 2019, 2:30pm UTC](https://discuss.elastic.co/t/access-denied-while-starting-elastic-search/164550/4 "2019-01-17T14:30:30Z")

</div>

> [@jsunish](#):
>
> This is what I can find from the bitdefender which is blocking the running

It sounds like this is a problem with your Bitdefender installation. You should configure it to permit Elasticsearch to run.

---

<div class="post-metadata">

**Author:** ![jsunish](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsunish/32/39861_2.png) [@jsunish](https://discuss.elastic.co/u/jsunish)\
**Post date:** [January 18, 2019, 12:53pm UTC](https://discuss.elastic.co/t/access-denied-while-starting-elastic-search/164550/5 "2019-01-18T12:53:29Z")

</div>

Digging deeper I found bitdefender is blocking the running of elastic search due the system property  
-Dio.netty.recycler.maxCapacityPerThread=0  
So I had to comment it on jvm.options under the config folder to make it to run.  
is there any severe impact on commenting this property?  
Thanks

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [January 18, 2019, 3:17pm UTC](https://discuss.elastic.co/t/access-denied-while-starting-elastic-search/164550/6 "2019-01-18T15:17:02Z")

</div>

> [@jsunish](#):
>
> is there any severe impact on commenting this property?

It does not sound like a good idea. Your cluster stability may suffer. We do not test this configuration, so it isn't supported. I have linked the discussion around why it was introduced below. The correct thing to do is to fix bitdefender to permit this setting.

> <https://github.com/elastic/elasticsearch/pull/22452>
>
> Netty plays a lot of games with recycling byte buffers in thread local
> caches.
> …
> 
> The recycler in particular appears to be fraught with peril. It appears
> that there are circumstances where the recycler does not recycle quickly
> enough and can exceed its capacity leading to heap exhaustion and out of
> memory errors. If you spend a few minutes reading the history of the
> recycler on the Netty GitHub issues, it appears it has been nothing but
> a source of trouble, and the project itself has an open issue that
> proposes disabling by default and possibly even removing the recycler.
> 
> We are seeing users struggle with issues in 5.x that I think are largely
> driven by some of the problems here with Netty.
> 
> This change proposes to disable the recycler. I think that disabling
> this feature will return some of the stablity that this feature appears
> to be losing us.
> 
> I have done performance testing on my workstation with disabling this
> and I do not see a difference in performance. I propose that we make
> this change in master and let some nightly benchmarks run to confirm
> that there is not a difference in performance. If we are comfortable
> with the performance changes, I propose backporting this to all active
> branches.
> 
> Relates netty/netty#5904, #22406, #22360, #22189

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 15, 2019, 3:17pm UTC](https://discuss.elastic.co/t/access-denied-while-starting-elastic-search/164550/7 "2019-02-15T15:17:10Z")

</div>

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