# Uninstall elasticsearch completely on windows 7

**URL:** <https://discuss.elastic.co/t/uninstall-elasticsearch-completely-on-windows-7/138687>\
**Category:** Elasticsearch\
**Created:** [July 5, 2018, 10:24am UTC](https://discuss.elastic.co/t/uninstall-elasticsearch-completely-on-windows-7/138687 "2018-07-05T10:24:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![vivekranjan](https://avatars.discourse-cdn.com/v4/letter/v/7ea924/32.png) [@vivekranjan](https://discuss.elastic.co/u/vivekranjan)\
**Post date:** [July 5, 2018, 10:24am UTC](https://discuss.elastic.co/t/uninstall-elasticsearch-completely-on-windows-7/138687/1 "2018-07-05T10:24:20Z")

</div>

Hi, I have installed elasticsearch on my system and when I hit [http://localhost:9200](http://localhost:9200) on the browser I can see the output but when I try to run /bin/elasticsearch.bat from command prompt it gives me some error which I am not getting. I want to uninstall elasticsearch completely and want to reinstall it on my system.

**Below is the error which I am getting, I tried to understand the error and resolve it but not getting anything.**

\</[2018-07-05T15:39:11,241][INFO][o.e.n.Node] [my\_first\_node] init  
ializing ...  
[2018-07-05T15:39:11,427][WARN][o.e.b.ElasticsearchUncaughtExceptionHandler] [m  
y\_first\_node] uncaught exception in thread [main]  
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: f  
ailed to obtain node locks, tried [[C:\ProgramData\Elastic\Elasticsearch\data\el  
asticsearch]] with lock id [0]; maybe these locations are not writable or multip  
le nodes were started without increasing [node.max\_local\_storage\_nodes] (was [1]  
)?  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:140  
) ~[elasticsearch-6.3.0.jar:6.3.0]  
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:  
127) ~[elasticsearch-6.3.0.jar:6.3.0]  
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwar  
eCommand.java:86) ~[elasticsearch-6.3.0.jar:6.3.0]  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:1  
24) ~[elasticsearch-cli-6.3.0.jar:6.3.0]  
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-c  
li-6.3.0.jar:6.3.0]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93)  
~[elasticsearch-6.3.0.jar:6.3.0]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86)  
~[elasticsearch-6.3.0.jar:6.3.0]  
Caused by: java.lang.IllegalStateException: failed to obtain node locks, tried [  
[C:\ProgramData\Elastic\Elasticsearch\data\elasticsearch]] with lock id [0]; may  
be these locations are not writable or multiple nodes were started without incre  
asing [node.max\_local\_storage\_nodes] (was [1])?  
at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:243  
) ~[elasticsearch-6.3.0.jar:6.3.0]  
at org.elasticsearch.node.Node.(Node.java:270) ~[elasticsearch-6.3  
.0.jar:6.3.0]  
at org.elasticsearch.node.Node.(Node.java:252) ~[elasticsearch-6.3  
.0.jar:6.3.0]  
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:213) ~[  
elasticsearch-6.3.0.jar:6.3.0]  
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:213) ~[ela  
sticsearch-6.3.0.jar:6.3.0]  
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:326) ~[elas  
ticsearch-6.3.0.jar:6.3.0]  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136  
) ~[elasticsearch-6.3.0.jar:6.3.0]  
... 6 more

**Here is what I get when I hit the localhost url:-**  
{  
"name" : "my\_first\_node",  
"cluster\_name" : "elasticsearch",  
"cluster\_uuid" : "Gd\_3OnnORrO1l8hsCSQ1Bw",  
"version" : {  
"number" : "6.3.0",  
"build\_flavor" : "unknown",  
"build\_type" : "unknown",  
"build\_hash" : "424e937",  
"build\_date" : "2018-06-11T23:38:03.357887Z",  
"build\_snapshot" : false,  
"lucene\_version" : "7.3.1",  
"minimum\_wire\_compatibility\_version" : "5.6.0",  
"minimum\_index\_compatibility\_version" : "5.0.0"  
},  
"tagline" : "You Know, for Search"  
}

Kindly help.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 5, 2018, 12:30pm UTC](https://discuss.elastic.co/t/uninstall-elasticsearch-completely-on-windows-7/138687/2 "2018-07-05T12:30:40Z")

</div>

Your node is running apparently.

---

<div class="post-metadata">

**Author:** ![vivekranjan](https://avatars.discourse-cdn.com/v4/letter/v/7ea924/32.png) [@vivekranjan](https://discuss.elastic.co/u/vivekranjan)\
**Post date:** [July 5, 2018, 1:47pm UTC](https://discuss.elastic.co/t/uninstall-elasticsearch-completely-on-windows-7/138687/3 "2018-07-05T13:47:36Z")

</div>

Thanks. But now I want to communicate the saved data with Java API and it is not working so the issue is in Java code or in the elasticsearch?  
@dadoonet

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 5, 2018, 7:34pm UTC](https://discuss.elastic.co/t/uninstall-elasticsearch-completely-on-windows-7/138687/4 "2018-07-05T19:34:08Z")

</div>

Most likely your code but as I don't see it, I can't really tell.  
Hard to help without knowing exactly what you are doing. ie, does your code run on the same machine which is running your code? What are elasticsearch logs? How do you create a client? Are you using a TransportClient or a RestClient? What is the error you are getting on the client?

---

<div class="post-metadata">

**Author:** ![vivekranjan](https://avatars.discourse-cdn.com/v4/letter/v/7ea924/32.png) [@vivekranjan](https://discuss.elastic.co/u/vivekranjan)\
**Post date:** [July 9, 2018, 7:49am UTC](https://discuss.elastic.co/t/uninstall-elasticsearch-completely-on-windows-7/138687/5 "2018-07-09T07:49:28Z")

</div>

@dadoonet  
I am following **[https://dzone.com/articles/elasticsearch-java-api](https://dzone.com/articles/elasticsearch-java-api)** link and doing same in the same java file.  
**I am getting compile time error with red line in the following lines:**  
Node node = nodeBuilder().node();  
Client client = node.client();  
client.prepareIndex("kodcucom", "article", "1")  
.setSource(putJsonDocument("ElasticSearch: Java API",  
"ElasticSearch provides the Java API, all operations "  
+ "can be executed asynchronously using a client object.",  
new Date(),  
new String[]{"elasticsearch"},  
"Hüseyin Akdoğan")).execute().actionGet();  
node.close();  
**And the error in the first and almost every line is :**  
Multiple markers at this line  
- Syntax error on token "(", { expected after  
this token  
- Syntax error on token ")", delete this token  
- Syntax error on token ".", @ expected after  
this token

Also I am using spring tool suite IDE of Eclipse and I have created a Spring starter project for this. I am using elasticsearch version 6.3.0 and trying to do CRUD operation through java api.  
I have tried all possible way to resolve it but not getting any clue.  
Kindly help me.  
Thanks.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 9, 2018, 8:38am UTC](https://discuss.elastic.co/t/uninstall-elasticsearch-completely-on-windows-7/138687/6 "2018-07-09T08:38:46Z")

</div>

This article is from 2013! Outdated for sure.

Have a look at [https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/index.html](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/index.html) instead.

---

<div class="post-metadata">

**Author:** ![vivekranjan](https://avatars.discourse-cdn.com/v4/letter/v/7ea924/32.png) [@vivekranjan](https://discuss.elastic.co/u/vivekranjan)\
**Post date:** [July 9, 2018, 9:59am UTC](https://discuss.elastic.co/t/uninstall-elasticsearch-completely-on-windows-7/138687/7 "2018-07-09T09:59:44Z")

</div>

Thank you for sharing this link. I will go through them and understand the concept properly to complete my learning. 🙂  
@dadoonet

---

<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:** [August 6, 2018, 9:59am UTC](https://discuss.elastic.co/t/uninstall-elasticsearch-completely-on-windows-7/138687/8 "2018-08-06T09:59:52Z")

</div>

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