# Setting up Elastic - Failed to allocate closure

**URL:** <https://discuss.elastic.co/t/setting-up-elastic-failed-to-allocate-closure/369379>\
**Category:** Elasticsearch\
**Created:** [October 24, 2024, 6:34pm UTC](https://discuss.elastic.co/t/setting-up-elastic-failed-to-allocate-closure/369379 "2024-10-24T18:34:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![greenmachine](https://avatars.discourse-cdn.com/v4/letter/g/58f4c7/32.png) [@greenmachine](https://discuss.elastic.co/u/greenmachine)\
**Post date:** [October 24, 2024, 6:34pm UTC](https://discuss.elastic.co/t/setting-up-elastic-failed-to-allocate-closure/369379/1 "2024-10-24T18:34:28Z")

</div>

Getting the Failed to allocate closure error when trying to start elasticsearch. We've added Environment=ES\_TMPDIR=/usr/share/elasticsearch/tmp to the services file, but still getting the same error.
