# Trouble getting Elasticsearch 7 to start with X-pack security enabled

**URL:** <https://discuss.elastic.co/t/trouble-getting-elasticsearch-7-to-start-with-x-pack-security-enabled/177850>\
**Category:** Elasticsearch\
**Created:** [April 22, 2019, 12:44pm UTC](https://discuss.elastic.co/t/trouble-getting-elasticsearch-7-to-start-with-x-pack-security-enabled/177850 "2019-04-22T12:44:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigdamhero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bigdamhero/32/34478_2.png) [@bigdamhero](https://discuss.elastic.co/u/bigdamhero)\
**Post date:** [April 22, 2019, 12:44pm UTC](https://discuss.elastic.co/t/trouble-getting-elasticsearch-7-to-start-with-x-pack-security-enabled/177850/1 "2019-04-22T12:44:02Z")

</div>

I feel like its something to do with the way the Java is bundled with the install. I have tried to find some doc on how to direct elasticsearch to use the java I have installed in the os. I try to start Elasticsearch and it fails about 2 seconds latter. it does not even create and elastic.log. I only get a gc.log. Any help or assistance would be welcome. Thanks.

---

<div class="post-metadata">

**Author:** ![bigdamhero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bigdamhero/32/34478_2.png) [@bigdamhero](https://discuss.elastic.co/u/bigdamhero)\
**Post date:** [April 22, 2019, 1:03pm UTC](https://discuss.elastic.co/t/trouble-getting-elasticsearch-7-to-start-with-x-pack-security-enabled/177850/2 "2019-04-22T13:03:26Z")

</div>

I uninstalled and reinstalled elasticsearch. I try to run the "sudo /bin/systemctl enable elasticsearch.service" command and recieve the error.  
"Synchronizing state of elasticsearch.service with SysV service script with /lib/systemd/systemd-sysv-install.  
Executing: /lib/systemd/systemd-sysv-install enable elasticsearch  
Failed to enable unit: File elasticsearch.service: Bad message"

Any clues?

---

<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:** [May 20, 2019, 1:03pm UTC](https://discuss.elastic.co/t/trouble-getting-elasticsearch-7-to-start-with-x-pack-security-enabled/177850/3 "2019-05-20T13:03:28Z")

</div>

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