# Esrally - Couldn't find a tar.gz distribution when building from sources

**URL:** <https://discuss.elastic.co/t/esrally-couldnt-find-a-tar-gz-distribution-when-building-from-sources/55966>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [July 20, 2016, 10:46am UTC](https://discuss.elastic.co/t/esrally-couldnt-find-a-tar-gz-distribution-when-building-from-sources/55966 "2016-07-20T10:46:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elastico123](https://avatars.discourse-cdn.com/v4/letter/e/bcef8e/32.png) [@elastico123](https://discuss.elastic.co/u/elastico123)\
**Post date:** [July 20, 2016, 10:46am UTC](https://discuss.elastic.co/t/esrally-couldnt-find-a-tar-gz-distribution-when-building-from-sources/55966/1 "2016-07-20T10:46:30Z")

</div>

Hello, I have problem in building esrally. After executing command `esrally` following error output is in terminal:

```
`Preparing for race (might take a few moments) ...
  Building from sources ...

ERROR: Cannot run benchmark

Reason: Couldn't find a tar.gz distribution.`

```

Any ideas?

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [July 20, 2016, 11:03am UTC](https://discuss.elastic.co/t/esrally-couldnt-find-a-tar-gz-distribution-when-building-from-sources/55966/2 "2016-07-20T11:03:55Z")

</div>

Hi @elastico123,

this happens when Gradle fails to build Elasticsearch. There are two things you should check:

- Do you have _exactly_ Gradle 2.13? (verify with `gradle -version`). There is an open [ticket in the Elasticsearch repo describing why Gradle 2.14 does not work](https://github.com/elastic/elasticsearch/issues/18935)
- The second problem that occurs often is that you did not set JAVA\_HOME. Can you please check the output of `echo $JAVA_HOME`? It should point to the home directory of your JDK 8 installation. If not, please set it (ideally in your shell startup file (e.g. `.bashrc`, `.zshrc`)

You can also look in Rally's log directory for this race. There should be a build log indicating the problem.

Daniel

---

<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:34pm UTC](https://discuss.elastic.co/t/esrally-couldnt-find-a-tar-gz-distribution-when-building-from-sources/55966/3 "2017-07-05T22:34:05Z")

</div>


