Setting up Elastic - Failed to allocate closure

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.