# Java.util.zip.ZipException

**URL:** <https://discuss.elastic.co/t/java-util-zip-zipexception/36427>\
**Category:** Elasticsearch\
**Created:** [December 4, 2015, 11:00pm UTC](https://discuss.elastic.co/t/java-util-zip-zipexception/36427 "2015-12-04T23:00:19Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pradeep\_Gowda](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@Pradeep\_Gowda](https://discuss.elastic.co/u/Pradeep_Gowda)\
**Post date:** [December 4, 2015, 11:00pm UTC](https://discuss.elastic.co/t/java-util-zip-zipexception/36427/1 "2015-12-04T23:00:19Z")

</div>

Hi All,

I am getting below exception while trying to bring up ES 2.1

```
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
	at java.util.zip.ZipFile.open(Native Method)
	at java.util.zip.ZipFile.<init>(ZipFile.java:220)
	at java.util.zip.ZipFile.<init>(ZipFile.java:150)
	at java.util.jar.JarFile.<init>(JarFile.java:166)
	at java.util.jar.JarFile.<init>(JarFile.java:103)
	at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:174)
	at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:87)
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:164)
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:285)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
Refer to the log for complete error details.

```

Did anyone face this problem?

---

<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:** [December 5, 2015, 2:15am UTC](https://discuss.elastic.co/t/java-util-zip-zipexception/36427/2 "2015-12-05T02:15:10Z")

</div>

Something else in logs?

May be you unzipped as root but run the process as a user? I mean you don't have enough rights.

May be you installed plugins?

Well you have to describe all the steps you did.

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [December 5, 2015, 1:53pm UTC](https://discuss.elastic.co/t/java-util-zip-zipexception/36427/3 "2015-12-05T13:53:49Z")

</div>

Check all jars on the classpath if they have the correct ownership and can be opened by ES process.

---

<div class="post-metadata">

**Author:** ![Pradeep\_Gowda](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@Pradeep\_Gowda](https://discuss.elastic.co/u/Pradeep_Gowda)\
**Post date:** [December 5, 2015, 6:23pm UTC](https://discuss.elastic.co/t/java-util-zip-zipexception/36427/4 "2015-12-05T18:23:49Z")

</div>

Hi David/Jorg,

Below are the steps which I followed.

1. Downloaded the tar on my mac.
2. SCP it into my unix box.
3. Untar (folder is elasticsearch)
4. chmod -R 755 elasticsearch
5. chown -R elasticuser:elasticuser elasticsearch
6. Start elasticsearch as a "elasticuser"

And there are no more logs in the log file other than this.

Thanks,

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [December 5, 2015, 9:05pm UTC](https://discuss.elastic.co/t/java-util-zip-zipexception/36427/5 "2015-12-05T21:05:38Z")

</div>

I can not reproduce.

Do the following steps:

1. Download elasticsearch-2.1.0.tar.gz
2. scp it to the Linux box e.g. to a private non-root account
3. log into Linux box
4. become root (to move elasticsearch-2.1.0.tar.gz to user elasticuser)
5. move elasticsearch-2.1.0.tar.gz to home of user elasticuser
6. untar to folder ~elasticuser/elasticsearch-2.1.0
7. chown -R elasticuser:elasticuser ~elasticuser/elasticsearch-2.1.0
8. become elasticuser
9. cd ~elasticuser/elasticsearch-2.1.0
10. ./bin/elasticsearch

---

<div class="post-metadata">

**Author:** ![mbertani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mbertani/32/11398_2.png) [@mbertani](https://discuss.elastic.co/u/mbertani)\
**Post date:** [June 7, 2016, 11:35am UTC](https://discuss.elastic.co/t/java-util-zip-zipexception/36427/6 "2016-06-07T11:35:05Z")

</div>

did you have any .\_\* type of files in your directory structure?

I faced the same problem today. I got a zipped version of elasticsearch for windows that someone had downloaded, unzipped, and zipped again via a mac (don't ask why). It seems that for each file in the zipped version, there was a corresponding .\_ kind of file. After deleting all these, elasticsearch startet to work again.

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [June 8, 2016, 6:59pm UTC](https://discuss.elastic.co/t/java-util-zip-zipexception/36427/7 "2016-06-08T18:59:11Z")

</div>

If you run tar or zip on Mac, you must not forget to set COPYFILE\_DISABLE variable by `export COPYFILE_DISABLE=true`

---

<div class="post-metadata">

**Author:** ![simo14](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@simo14](https://discuss.elastic.co/u/simo14)\
**Post date:** [June 11, 2016, 4:33pm UTC](https://discuss.elastic.co/t/java-util-zip-zipexception/36427/8 "2016-06-11T16:33:10Z")

</div>

Thank you so much. I didn't zip anything from Mac OS but I did start using elasticSearch in mac, and those files were everywhere! I would have never be able to find this out on my own, thank you again

---

<div class="post-metadata">

**Author:** ![automotola](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@automotola](https://discuss.elastic.co/u/automotola)\
**Post date:** [July 1, 2016, 2:05am UTC](https://discuss.elastic.co/t/java-util-zip-zipexception/36427/9 "2016-07-01T02:05:22Z")

</div>

This worked for me too! Thanks!

---

<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:** [July 5, 2017, 10:39pm UTC](https://discuss.elastic.co/t/java-util-zip-zipexception/36427/10 "2017-07-05T22:39:07Z")

</div>


